block missing...

I was testing some stuff on the blocks page. I have this block in “All pages” and it listed everywhere. But then I was moving it around on the products tab after messing with the class names in FireBug. Well, after I picked it up to drag it, it wouldn’t let it be placed. So I let go, and it disappeared from the Products block page… never to be seen again.



I have looked through the block tables in the db, but I can’t find anything that talks about position. The system remembers where each blocks position is on every page, so it stores that somewhere. Thing is, I can’t find it; I have to be missing something somewhere.



Anyone know?

Odd, it isn’t stored in the db at all. I checked fn_save_block_location.



There is a folder:

skins//customer/blocks/locations/

That stores it as a folder tree. The files only contain the block id’s template and wrapper in the order shown on the page. Why wouldn’t that be stored in a db? It could be a cached later on. Seems wierd to store it in the file system…

[QUOTE] Why wouldn’t that be stored in a db? It could be a cached later on. Seems wierd to store it in the file system…[/QUOTE]



I agree, and this also explains why all of my blocks were lost & now must be re-created after re-installing my skin last night… :confused:

I guess that it stores it there so the block config goes with the skin. Otherwise no skin could have it’s own block config.



I had an issue where I was using the demo mode to check two different templates back and forth quickly. Then one of them started having errors while the other didn’t It turned out to be an issue with different block settings in the db and the other expecting something else.

Now I realize the demo mode wasn’t meant to be used like that. I can only assume that when you actually switch the skin in the admin area, it reloads or updates something from those files. Though much more info is needed for blocks than what is in those files.



The only better solution to that issue that I can think of would be to add a blocks_positions_pages table and store the info along with skin info. The skins would need unique id’s though. Someone might also simply want to keep the same block info between skins too. Guess there isn’t a cut and dry solution, but the one they have doesn’t work great, and can glitch sometimes.

Yeah, the blocks details should definately be stored somehow in the database.

[quote name=‘phazei’]

Now I realize the demo mode wasn’t meant to be used like that. I can only assume that when you actually switch the skin in the admin area, it reloads or updates something from those files. Though much more info is needed for blocks than what is in those files.[/QUOTE]

This is correct. Each time you change the skin in the skin selector, the TPLs in /skins/YOURSKIN/customer/blocks/locations are rebuilt.



I am pretty sure the developers worked on the block movement issues for the next release. Of course, that does not mean they have been completely fixed.



Bob