Page 1 of 1

[Solved] Fatal error after 1.10 upgrade

Posted: Sat Oct 29, 2011 9:53 am
by janaf
After updating 1.9.4.3, to 1.10 (rel Oct 22, 2011 downloaded today) when I run /install/upgrade.php, first and only thing I see is;
Fatal error: Call to undefined method ContentOperations::get_instance() in /..../lib/classes/class.CmsObject.php on line 281
Lycky, it's a test site for testing upgrading 8) but I have an identical site I do want to update.

I have made clean 1.10 installs on this box without problems.

What can I do?

Re: Fatal error after 1.10 upgrade

Posted: Sat Oct 29, 2011 1:35 pm
by janaf
Hi again, I forgot to give some facts:

It is a LAMP running
UBUNTU 10.04 server
Apache v2.2.14
MySQL 5.1.41

Lightly loaded server, 4GB RAM, typically running on 1GB

And I DO want that site up running as it is a test copy of the main site that I want o update from 1.9.4.3 to 1.10...

I have re-done the install a few times, and it always works fine with 1.9.3.x but not with 1.10

Is there any for of debugging I can submit to help?

Re: Fatal error after 1.10 upgrade

Posted: Sat Oct 29, 2011 2:04 pm
by janaf
Addng more;

I can simply copy back the 1.9.x files and the site runs again.

Now, I disabled every module I could, without un-installing them, but I still have the same problem after 1.10 update. Would it help to uninstall all modules?

A bit time consuming as I have around 20 installed...

Re: Fatal error after 1.10 upgrade

Posted: Sat Oct 29, 2011 2:56 pm
by calguy1000
Fatal error: Call to undefined method ContentOperations::get_instance() in /..../lib/classes/class.CmsObject.php on line 281
I looked at this line of code, which is in a one line function. It's job is to load and return the ContentOperations class instance (singleton). This class is loaded via the autoloader.

Since nobody else appears to be experiencing exactly this problem, I would suspect that it is once again either a module issue, or a file integrity issue.

Do a system verification of your 1.10 files, please tell us your php version information, turn on debug mode to enable displaying error messages, and if nothing pops up.. could you please put this code:

Code: Select all

stack_trace(); echo '<br/><br/>'; 
into the code in that file at that line (pushing the other line down).. and reload the page. It should output some call stack information that you can easily copy and paste into here.

Thanks.

Re: Fatal error after 1.10 upgrade

Posted: Sat Oct 29, 2011 7:12 pm
by janaf
First the easy part; PHP is 2.6.32-34-server.
wownloaded a fresh copy of the 1.10 package from cmsmadesimple.org
I do

With the stack_trace code, I get this:

Code: Select all

/var/www/retiro3/lib/autoloader.php:82 - GetContentOperations
- cms_autoloader
/var/www/retiro3/lib/classes/class.CmsObject.php:391 - spl_autoload_call
/var/www/retiro3/include.php:161 - GetSmarty
/var/www/retiro3/install/upgrade.php:22 - require_once


Fatal error: Call to undefined method ContentOperations::get_instance() in /var/www/retiro3/lib/classes/class.CmsObject.php on line 282
The error message is with the same with / without php error reporting on.

I could do further debugging but need fairly specific instructions as I am not very familiar with php debugging.

Would disabling all modules make a difference or would I need to uninstall them all? (by first reinstalling 1.9.x)

Thanks

Re: Fatal error after 1.10 upgrade

Posted: Sat Oct 29, 2011 7:32 pm
by calguy1000
okay, I still think you have a file corruption issue.

Please re-copy all of the CMSMS 1.10 files into the destination directory. If you are using FTP to transfer files pay attention to the log, and make sure you are transferring in BINARY mode. Filezilla is a decent FTP client.

Re: Fatal error after 1.10 upgrade

Posted: Sat Oct 29, 2011 7:39 pm
by janaf
I just installed 1.9.3.x again and uninstalled all modules. Still same prob.

How many tables should there be in MySQL? I have seen before that all tabels have not been restored from backup. I will try restoring them again.....

Downloadig; using the browser like I have done many times before from the cmsms site...

The problem verifying files is that the update script does not get to that point whwre I could run that on the site.

So I'd have to install a new site just to verify code?

Re: Fatal error after 1.10 upgrade

Posted: Sun Oct 30, 2011 1:09 pm
by janaf
I guess I am stupid but how do I use the checksums file? I did a fresh 1.10 install.

I downloaded it and uploaded in the install process first stage when asked to. I get error messages on every line
/www/.../ is a directory
Anyway, I skipped that step and the fresh install works.

Re: Fatal error after 1.10 upgrade

Posted: Sun Oct 30, 2011 3:49 pm
by calguy1000
I just downloaded and installed fresh copy of CMSMS 1.9.4.3 - Faanui into a fresh database.

Then I downloaded CMSMS 1.10 (full) and the full-checksum.dat files.

I expanded the 1.10 - full.tar.gz overtop of my CMSMS 1.9.4.3 install, and went to install/upgrade.php. On step 1 of the upgrade process I uploaded the full-checksum.dat file and got this screen capture.

I suggest you re-upload your 1.10 files overtop of your (completely backed up) 1.9.4.3 installation and repeat the file verification. However, since it is an existing site you will not receive the same message, however you should be able to 'explain' all of the errors that it reports (either some of the modules you have installed in your 1.9.4.3 install are not core, and/or they are your uploaded images, pdf files etc). Pay special attention to any .php files that are in error.

If you can't explain errors in (core) php files, re-upload those files and repeat the test until those errors go away.

Also, check your PHP version (not your linux kernel version).

Re: Fatal error after 1.10 upgrade

Posted: Sun Oct 30, 2011 5:47 pm
by janaf
Calguy1000 thanks for taking time with this.

Now tested:
- Fresh 1.9.4.3 install
- Copied over the 1.10 files
- File verification / checksum pass. OK
- Upgarde to 1.10 is OK.

However when I try the same thing with (a working copy) of my site, copying over the same 1.10 files.

Then the very first thig I see when running /install/upgrade.php is
Fatal error: Call to undefined method ContentOperations::get_instance() in /var/www/retiro3/lib/classes/class.CmsObject.php on line 281
:(

Tried this several times....

- I tried unistalling all modules before updating but got the same error.
- I have run MySQL database rapair on the tables.

Could this be caused by smarty tags in the template? (edit; no because the error is on the admin pages...)

What can I do?

Re: Fatal error after 1.10 upgrade

Posted: Thu Nov 03, 2011 10:28 am
by janaf
I am still stuck on this :-\ and still need some help on:

* how to fix the error when upgrading 1.9.4.3 to 1.10. I have tried everything I can think of.
OR
* how to copy 1.9.4.3 page content and structure to a new 1.10 site. In that case, I would re-build the rest of the site from scratch.

Please?!

Re: Fatal error after 1.10 upgrade

Posted: Mon Nov 07, 2011 10:14 pm
by janaf
OMG finally found the problem. When I copied my old site and changed the paths, there was one that remained to the original site:

Code: Select all

#Path to document root. This should be the directory this file is in.
$config['root_path'] = '/var/www/oldsite'
Embarrased, not my fault :-[

OK, I messed up. Code is not foolproof...