CMS Made Simple Forums
https://forum.cmsmadesimple.org/

[open] Template error after upgrade
https://forum.cmsmadesimple.org/viewtopic.php?f=82&t=70842
Page 2 of 2

Author:  archeo [ Wed Jan 28, 2015 7:57 am ]
Post subject:  Re: [open] Template error after upgrade

Try an update from 1.11.12 to beta after uninstalling all the modules except those of the core.

Author:  oliver341 [ Thu Feb 19, 2015 7:48 pm ]
Post subject:  Re: [open] Template error after upgrade

archeo \archeo:
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:


\$1:
[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.

Author:  Jo Morg [ Thu Feb 19, 2015 9:07 pm ]
Post subject:  Re: Template error after upgrade

calguy1000 \calguy1000:
Care to share the template?
That would have helped some... If you can...

Author:  oliver341 [ Thu Feb 19, 2015 11:21 pm ]
Post subject:  Re: [open] Template error after upgrade

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.

Author:  oliver341 [ Thu Feb 19, 2015 11:52 pm ]
Post subject:  Re: [open] Template error after upgrade

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.

Author:  calguy1000 [ Sat Apr 04, 2015 5:36 pm ]
Post subject:  Re: [open] Template error after upgrade

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.

Page 2 of 2 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/