Page 1 of 1

Can't upgrade - server error 500/503 after upgrade to 2.2.15

Posted: Thu Sep 16, 2021 9:31 pm
by Andrew87
Hi.

I hava an old webisite, probably on v2.1.1.
The problem is my hosting provider cut support for old PHP's. First idea? No problem, just update CMS.

Well...it would be too simple :)

1. upgrading to 2.2.15 show at the end: "Could not find template type identified by __CODE__::page". After that, website show server error 503.
2. I thought it was too big a leap to update. Sure, i will update step-by-step from 2.1.1 to modern version. And...it would be too simple ::)
3. trying to antything lower than 2.6.8 shows (going to next step is impossible, white screen is browser):
  • "Warning: session_cache_limiter(): Cannot change cache limiter when session is active in phar://my_website_is_here/cmsms-2.1.1-install.php/app/class.cms_install.php on line 303"
  • Warning: Cannot modify header information - headers already sent by (output started at phar:///my_website_is_herel/cmsms-2.1.1-install.php/app/class.cms_install.php:303) in phar:///my_website_is_here/cmsms-2.1.1-install.php/app/class.cms_install.php on line 306
I'm not a PHP developer. I'm just trying to update my webiste to working at least on PHP7 (supported by host provider). I don't know why I can't update or what can I do with it. Sure, I can byu a service to support old PHP's on server, but...it's not a long term solution. ::)

In basic words...Help. Why i can do? I have CMS 2.1.1 and just trying to update to higher versions. But without luck.

Re: Can't upgrade - server error 500/503 after upgrade to 2.2.15

Posted: Thu Sep 16, 2021 11:41 pm
by DIGI3
You shouldn't need to go in steps for any 2.x version, so I'd suggest focusing on the issue you encounter when going straight to 2.2.15. We'll probably need some more information though, what third-party modules you have at the very least.

It looks like the forum stripped out part of the error message so I can't tell what template type is missing, it could be from a module or it could be something has gone wrong in the upgrade process (or a previous upgrade or original install) and the core template types didn't register.

It may be hard to diagnose in forum posts - you may want to discuss in slack with some screenshots, or hire a dev to help with the upgrade.

Re: Can't upgrade - server error 500/503 after upgrade to 2.2.15

Posted: Fri Sep 17, 2021 12:21 am
by Andrew87
Hi,

many thanks for your response. It's hard to tell, it was a simple website, created by outsourced webdeveloper. I've had probably a custom theme (or just styled by CSS, i really don't remeber ::) ). But it was simple website, probably without plugins or something. I don't recall any of it.

Basically - only versions where i don't have errors about "Warning: session_cache_limiter()" and "Cannot modify header information - headers already sent by" is from 2.2.8 to 2.2.15.

Upgrade seems to work OK and on steps 8 is error about "Could not find template type identified by __CODE__::page" (screenshot: https://imgur.com/a/ZZKbU16). On the next step installer tells that everything OK, i may go to admin page etc. But in reality i have server error 503.

The core of problem is that my website went down, when provider cut support for older PHP's. It wasn't working because on the front i've had:
  • Warning: count(): Parameter must be an array or an object that implements Countable in www.my_website_here.com/lib/classes/class.CmsLayoutTemplate.php on line 1116
  • trying to get into admin: Warning: count(): Parameter must be an array or an object that implements Countable in www.my_website_here.com/lib/tasks/class.GatherNotifications.task.php on line 82


Can't use old version, can't update to newer version. Impasse :)

Re: Can't upgrade - server error 500/503 after upgrade to 2.2.15

Posted: Fri Sep 17, 2021 5:01 am
by DIGI3
The "__CODE__::page" was throwing me - but now I see in your screenshot it's actually CORE that clarifies it a bit. I suspect that a template type got deleted or replaced on the old version, but it could be something else. I don't think I've run into it before.

It's possible there's an easy fix but without testing a bunch of things I wouldn't be able to walk you through it. If the site is fairly simple, what about just exporting the design from Design Manager, then doing a clean install of 2.2.15 and reimporting the them. Then you can either recreate the pages if there's not too many, copy & pasting the content, or if there's a lot you can try using CGContentUtilities to export & import.

If the site is too complex to rebuild you can dm me and send me the files & db on dropbox to try to see if I can recreate the issue on my server. You might not have permission to dm on the forum yet but you can find me on Slack or my email is on the website's Dev Team directory.

Re: Can't upgrade - server error 500/503 after upgrade to 2.2.15

Posted: Fri Sep 17, 2021 8:44 am
by Andrew87
Hi,

Thank You - i will try to contact you via e-mail or slack.

I'm affraid i can't export design from Design Manager. I can't do anything. Site not working at all. I have backup of files and database, but on v2.1.1 have just white screen with error on front:
  • Warning: count(): Parameter must be an array or an object that implements Countable in www.my_website_here.com/lib/classes/class.CmsLayoutTemplate.php on line 1116
Can't login to admin as well, because of white screen and another error:
  • Warning: count(): Parameter must be an array or an object that implements Countable in www.my_website_here.com/lib/tasks/class.GatherNotifications.task.php on line 82
I'm not a PHP developer so i can't fix the code on those lines :-[ And errors are because my hosting using PHP7 and not PHP5 anymore. To be honest my primary goal is to run my website again (it's not private webiste). And nobody physically around with knowledge about CMS Made Simple, because company who made my website years ago...does not exist anymore :'( Updates can wait...just the website may working again ::)