Moving stacks in the DB

Permalink
HI I want to assign a number of blocks to stacks, the reason for this is that i have upgraded from 5.4 to 5.6 and with the loss of the scrapbook, to recreate all the forms, and blocks that i have could take me weeks.. (100's)

I can find:

Blocks
Stacks
btCoreStackDisplay

i presumed that if i ensured the bID's and stID's all matched up that's id be able to see it in the dashboard stack, but nope...

anyone able to tell me what other tables i need to bring line?

Thanks in advance

Ben

BHWW
 
mhawke replied on at Permalink Reply
mhawke
I think it's a monumental task to do what you are trying to do. If it was easy, someone would have done it already because this change caused quite a stink. Stacks don't act exactly like the old scrapbook items so I don't think your client will be able to use them the same way as in 5.4. Version 5.6 uses GlobalAreas hard-coded into the template file to automatically create stacks that are 'global' like the old global scrapbook items used to be.

Is there a reason you need to upgrade the site to 5.6?
BHWW replied on at Permalink Reply
BHWW
there are many issues that affect a larger site that have been resolved in 5.6 that weren't in 5.4, on this basis we are having some stability issues that will be resolved in the upgrade.

Thanks
BHWW replied on at Permalink Best Answer Reply
BHWW
Got it! Just needed a good nights sleep :)

For anyone that wants to try this... I warn you you'll be fiddling with your database so be sure your happy to do this...

You need to ensure that you have created the correct stacks and have the stack numbers from 'Stacks' stID also you'll need to note down the cID

From 'Blocks' find the appropriate bIDs for the blocks you want to move from scrapbooks to stacks

Then from 'CollectionVersions' get the current cvID for your cID

Now go into 'btCoreStackDisplay' insert as many rows as you need with the bID and stID of the block you want to display

Finally go into 'CollectionVersionBlocks' insert the same number of rows and use the cID, cvID, bID you cot previously and use the default area name (probably 'Main'), pop a 1 in the isOriginal value and the rest can stay as '0'

I can't guarantee i've not done anything awful, but seems to work for me, hope it helps someone!

Ben