
Migration Documentation
Reported by Peter | March 15th, 2015 @ 10:11 AM
I am planning to migrate a 0.9x site to the latest version of Exponent. Before working on the live site, I have created a sub-domain to test the process and copied all of the 0.9x files across, creating a copy of the database too. The sub-domain throws a load of errors, I have searched for the old documentation but the site oldsite.exponentcms.org has disappeared. Your web page http://exponentcms.org/exponent-documentation.htm suggests it should still exist. Please advise. I tried to run the install file but that also drops back to index.php with the same errors. The errors start as follows:
Warning: Creating default object from empty value in /home/linweb37/d/devel.britishtrolley.org.uk/user/htdocs/subsystems/sessions.php on line 170
Strict Standards: Non-static method navigationmodule::levelTemplate() should not be called statically in /home/linweb37/d/devel.britishtrolley.org.uk/user/htdocs/subsystems/core.php on line 65
Strict Standards: Non-static method navigationmodule::levelTemplate() should not be called statically in /home/linweb37/d/devel.britishtrolley.org.uk/user/htdocs/modules/navigationmodule/class.php on line 342
Then a whole lot of similar errors, presumably trying to build the menus, followed by what's in the attached screen shot.
Really sorry to bother you with 0.9x stuff, but without any docs I don't know where to start, and I dare not try migration without testing and understanding the process fully.
Thank you.
Peter.
Comments and changes to this ticket
-
Peter March 15th, 2015 @ 02:19 PM
Hi Dave. I've worked out the major problem is the PHP version - it's 5.4 on the test server and needs 5.3 Have installed a local server and now working. So please ignore references to errors above.
I've tried running the upgrade install but it says the site is down for maintenance, the database is off-line, and offers a log in option, which I can't presumably because the database isn't connected. Your migration documentation tells me to point at the 0.9x database, but I can't see where to do that, there's no config file that I can see in the install folder.
I think the migration documentation seems to start a stage or two ahead of where I think I'm at. Am I right in assuming that I need to put the contents of Exponent 2.3.3 download into the Install folder of the site to be upgraded? Then where in the install files do I give it the database info?
Thanks.
Peter. -
Peter March 15th, 2015 @ 03:47 PM
After a lot of messing about, I worked out that the documentation should have told me that migration doesn't start with the existing site, but that you have to remove the old site and install a clean copy of the latest Exponent. Then as part of the installation process you do the migration from the database etc. (My logic was that if you are migrating you start with what you have and work from there). I know it's easy to get so close to something you assume it's obvious, but please can you add this pointer to the documentation to save others the problems.
I found a bug in framework\modules\migration\views\migration\manage_files.tpl. Line 22 is missing a } at the end of the line, which throws an error - see attached.
When the migration process finished, I was taken to 'the home page' which was completely without any CSS formatting. During migration I selected the simple theme, although this now need considerable updating to bring the site back to where it is now at 0.9x. After a while the CSS magically returned, but I now find that the content migration process did not work, none of the pages has been populated.
-
dleffler March 16th, 2015 @ 10:35 AM
- Title changed from Documentation to Migration Documentation
- Tag set to migration
- Assigned user changed from expNinja to dleffler
- Milestone set to User issues
Sorry for the confusion. Yes, PHP v5.4 (and later) added a 'strict' feature which throws up tons of 'warnings' for 'possible' coding issues.
I've updated the documentation for migration. I know I've written several places about what you had to learn the hard way, but apparently it wasn't on the docs site, my bad.
Thanks for pointing out the issue with the migration module. I rarely actually run it any more, but realize there are still a number of old 0.9x sites up and running...(the actual problem is an opening brace a little earlier on the line before the 'text=...')
Concerning the site css/content. The migration process does NOT transfer the theme, but the content should appear. You might try clearing the site and browser caches (or re-migrating the content) which should then display the pages. The theme may not work as-is within 2.0, but you can use this guide (http://docs.exponentcms.org/docs/2.3.3/theme_update) to help update it. We've removed most of the 0.9x theme compatibility in the newer versions of Exponent, but in v2.3.3 and newer, you can add this line to the theme's config.php file to activate the old theme compatibility.
define('OLD_THEME_COMPATIBLE', 1);
-
dleffler March 16th, 2015 @ 10:51 AM
I've added a theme migration help doc here http://docs.exponentcms.org/docs/2.3.3/updating-your-custom-theme
-
Peter March 16th, 2015 @ 11:03 AM
Thanks Dave. I re-ran the migration and page content is now there. I did find the theme migration page, I fear it may be more complicated than that. My site has the menu down the left hand side, repositioning seems OK moving the menu statement in index.php. I tried some of the alternative tpl files in the index file, ending up with "YUI Side Nav" as producing a left hand menu of broadly the right shape. However the CSS is defeating me, I can't seem to find what is controlling the format of the menu. I have found by experiment a number of CSS tags that affect this menu, but there must be more as it still doesn't do what I want. Where can I find a full list of the yuimenuitem tags used by Exponent that need to be modified? So far I have:
.yuimenuitemlabel.yuimenuitemlabel-hassubmenu, .yuimenuitem.yuimenuitemlabel, .yuimenuitemlabel.yuimenuitemlabel { padding: 0 5px; }
.yuimenuitemlabel.current, .yuimenuitemlabel {padding: 0 5px; background-color: #880b00; }
Another one I do on a voluntary basis as well!
Peter.
-
dleffler March 17th, 2015 @ 10:18 AM
That's a YUI v2 navbar...v2 has been deprecated for quite some time, however here is their skinning guide which might help you: http://yui.github.io/yui2/docs/yui_2.9.0_full/menu/index.html#skinref
-
Peter March 17th, 2015 @ 12:00 PM
Thanks Dave. That's helped so far but there's still a stubborn refusal to do what I want on a Visited link... The black text on the attached capture are the visited links. I think I may need to scrap this and build my own left hand menu, before I go insane! I couldn't find an alternative one in Exponent's various options.
Postscript:
I've now imbedded my own menu, works fine. Sorry to have bothered you on that one!
-
Peter March 22nd, 2015 @ 01:37 PM
- Tag changed from migration to migration, smarty
Dave. Please can you help me with the logic that builds a menu from the Exponent pages. I'm almost there but one thing refuses to cooperate.
I have modified the "showall_YUI Side Nav.tpl" file to use the menu structure and CSS from the 0.9x site. Very simply, if a menu item has no children the class is "navlink" and if it has children the class is "navlink haschildren". If there are children, the background image in the menu has a right arrow, if not then no arrow.
This is working fine, until you get to the last menu item in a children or grandchildren sub-menu. Although this may have no children, it always has an arrow is displayed.
The tpl file is attached, together with a screen shot which shows the values on the menu of the two variables "$sections[$nextkey]->depth" and "$section->depth" which are used to increment and select the correct class. My assumption was that if $sections[$nextkey]->depth == $section->depth then that was the last one in the list, but looking at the screen shot the last item in the child and grandchild menus, the variable "$sections[$nextkey]->depth" is decremented by 1, thus screwing up my logic.
Please can you explain why the last item is different to the rest. I need to be able to prevent the 'haschildren' there except where there is a further menu.
Thank you.
-
-
dleffler March 23rd, 2015 @ 12:57 AM
Real quick answer (guess) is there's NO item after the last item to check the depth against, so the logic breaks??? Not sure of the template you attached...it's missing the correct ids/styles to work as a yui2 menu?
-
Peter March 23rd, 2015 @ 08:33 AM
Thanks Dave. My work-around does seem to work fine. Here's my CSS, it also picks up the yui stuff as if I hadn't made my own changes... Peter.
-
-
-
dleffler January 1st, 2016 @ 01:49 PM
- Assigned user cleared.
- Milestone changed from 2.3.8 to User issues
-
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.