Fixing a misnamed area

Permalink 1 user found helpful
I have a deployed theme in which I used 'main content' instead of 'main'. I now would like to fix this error. However, there is content already in place on the web site. Is there a relatively easy way to fix the existing content so that when I fix the theme, the content will appear where it is suppose to?

Smittie
 
Mainio replied on at Permalink Reply
Mainio
You can resolve it with few SQL commands I think:
UPDATE Areas SET arHandle = 'Main' WHERE arHandle = 'Main Content';
UPDATE CollectionVersionAreaLayouts SET arHandle = 'Main' WHERE arHandle = 'Main Content';
UPDATE CollectionVersionAreaStyles SET arHandle = 'Main' WHERE arHandle = 'Main Content';
UPDATE CollectionVersionBlocks SET arHandle = 'Main' WHERE arHandle = 'Main Content';
UPDATE CollectionVersionBlockStyles SET arHandle = 'Main' WHERE arHandle = 'Main Content';


TAKE A BACKUP OF YOUR DATABASE before doing anything! This might also break something if some tables are left out.

Br,
Antti / Mainio
JohntheFish replied on at Permalink Reply
JohntheFish
Packaging this up into a small addon 'rename page area' could help many when they switch themes from/to a theme that does not follow the normal conventions.
Mainio replied on at Permalink Reply
Mainio
Totally agree +1

I'm not personally keen on developing more packages currently because of the 5.5 release. Also, we've had few packages in the PRB for like 2 weeks now with no action...