Page 2 of 2

Re: [open] Template error after upgrade

Posted: Wed Jan 28, 2015 7:57 am
by archeo
Try an update from 1.11.12 to beta after uninstalling all the modules except those of the core.

Re: [open] Template error after upgrade

Posted: Thu Feb 19, 2015 7:48 pm
by oliver341
archeo wrote:Try an update from 1.11.12 to beta after uninstalling all the modules except those of the core.
I have just done this, I downloaded 1.11.12 and extracted it so I could see which modules were listed in the modules directory, and I uninstalled and removed all the modules from my own CMSMS installation which were not in core.

But the error remains post-upgrade:

Code: Select all

[Thu Feb 19 19:43:45 2015] [error] [client 192.168.1.3] PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 130968 bytes) in /var/www/lib/classes/class.cms_config.php on line 496
So it appears it's not a third party module issue, but something else.

Re: Template error after upgrade

Posted: Thu Feb 19, 2015 9:07 pm
by Jo Morg
calguy1000 wrote:Care to share the template?
That would have helped some... If you can...

Re: [open] Template error after upgrade

Posted: Thu Feb 19, 2015 11:21 pm
by oliver341
I started randomly deleting tags in the template until the page started working, it's the menu tag causing issues, because when I deleted both my menu tags, the page loaded again. I will switch the menu tags to navigator and mess around with attributes to see if I can find anything more out.

Re: [open] Template error after upgrade

Posted: Thu Feb 19, 2015 11:52 pm
by oliver341
Solved!

On my 1.11 installation, my site template and menu template had the same name. Post-upgrade to 2.0, the menu broke and the site failed to load. Perhaps the menu template was trying to load the site template instead of the menu template, which would have loaded the menu template in a recursive loop. That would certainly account for the memory being exhausted.

I have now given my menu template in 1.11 a different name. I performed another upgrade to 2.0 and it worked fine.

Hope that helps.

Re: [open] Template error after upgrade

Posted: Sat Apr 04, 2015 5:36 pm
by calguy1000
Yes. If you have duplicately named templates you will have problems with upgrading.

i.e: If your page template is named 'Foo' and inside that page template you call {menu template='Foo'} there will be problems.

The upgrade routine will rename your MenuManager templates to something like 'MM-Foo' and your News templates to 'News-Summary-Foo', etc. so your templates will not be lost. The upgrade routine will also attempt to warn you that there may be difficulties, because it had to rename some templates.

However, because 'a template is just a template' and the template type stuff is just a loose association. the {menu template='Foo'} tag would re-load the page template and cause infinite recursion. This could result in either a timeout, or out of memory, or stack overflow issues, or a bunch of other things when rendering the page.

There is no good way to solve this issue. Because we do not (as a matter of policy) touch your template's content on upgrade. And even if we did, it would be error prone.

Not every site will upgrade cleanly.