Page 1 of 1

Error when adding or deleting a new page!!! Could be serious??? (SOLVED!)

Posted: Mon Apr 02, 2007 8:44 am
by HooverDST
So far my 'testing' site (installed with 1.0.4, PHP 4.4.4, MySQL 4.1.21) has been going swimmingly.  No problems and CMSMS has been perfect.

But recently, when I attempt to add new pages and content, things start playing up. 

For example: If I add a 'pictures' page in the pages admin area, it adds it to my list of pages.  However when I click on 'View Site' I get this error within the content area:

Fatal error: Call to a member function on a non-object in /usr/home/xpatadmin/www/htdocs/primetest/lib/content.functions.php on line 497

So after that error, I decided to delete the 'Pictures' page in the Pages Admin section.  But when I click on delete, the page fades away (the ajax feature on the Pages page) but it pops back up again and won't delete.  So then I thought I might 'Deactivate' the page but then this pop-up occurs:

Error: the XML response that was returned from the server was invalid.
Received:

Fatal Error: Call to a member function on a non-object in usr/home/xpatadmin/www/htdocs/primetest/admin/listcontent.php on line 497


The strange this is, I can edit EXISTING pages and content but as soon as I add pages the system plays up. 

A few other things to note:
- I also reordered my pages on the Page Admin section before this error occurred but did not change any content within those pages.
- I am using pretty URLs

Finally, I went into phpMyAdmin to check the 'cms_content' table and the new page appears in there but the 'content_id' is set to '0' unlike the other pages which have id's of '51', '52', '53', '54', etc...  I even changed the new page to the next id in that sequence but it didn't show up at all back on the site.

Anybody got an ideas why this might be happening?  I'd like to solve this issue in the 'testing' stage before potentially having to deal with it again on a live site so any contributions would be most helpful.

Cheers  ;)

Re: Error when adding or deleting a new page!!! Could be serious???

Posted: Mon Apr 02, 2007 5:05 pm
by Nullig
I've seen this type of error when the php memory limit is too low (8M).

If you don't have access to the php.ini file, you could try adding:

Code: Select all

ini_set( 'memory_limit', '16M' );
to your config.php file to see if it helps.

Nullig

Re: Error when adding or deleting a new page!!! Could be serious???

Posted: Tue Apr 03, 2007 4:46 am
by HooverDST
Hi Nullig,

Thanks heaps for that.  I don't have access to the php.ini file so I attempted:

Code: Select all

ini_set( 'memory_limit', '16M' );
in the config.php file.  It didn't seem to fix the issue though.  I am getting the server guys to add more memory for php so will get back to you and keep things updated.  But I wasn't adding in huge amounts of data or processing the CMS that much originally, so I don't think it will be this issue. 

Guess time will tell.

Re: Error when adding or deleting a new page!!! Could be serious???

Posted: Tue Apr 03, 2007 3:50 pm
by Nullig
Perhaps if you give us a link to the site, someone might be able to spot any errors there might be.

Nullig

Re: Error when adding or deleting a new page!!! Could be serious??? (SOLVED)

Posted: Wed Apr 04, 2007 2:32 pm
by HooverDST
Found out the issue. It was the PHP memory limit which the server guys set to 16M.

Cheers!  :D