Page 1 of 1

Fatal error: Call to a member function on a non-object

Posted: Wed Jun 07, 2006 3:05 am
by wesyah234
I went to delete a "news" item and got the following error:

Fatal error: Call to a member function on a non-object in /home/mydomain/public_html/admin/moduleinterface.php on line 45

I'm using .13 final (upgraded from a previous version)

Here's the url it was using:
http://www.mydomain.com/admin/moduleint ... ticleid=10

same error when I try to edit the "news" item.

Please help, I can't delete or expire my news items and customer wants them off the website...

Update:
same error when trying to add new news item, and also doing anything with calendar entries...

Re: Fatal error: Call to a member function on a non-object (fixed)

Posted: Wed Jun 07, 2006 3:27 am
by wesyah234
I fixed it...

Somehow I ended up with 2 admin directories and one was the oder version that I had upgraded from. I was trying to use an alternate name for the admin dir.  I think based on this bug:
http://trac.cmsmadesimple.org/cgi-bin/t ... ticket/133
It was getting into my /admin directory instead of my alternately named /admin1234 directory

I know this is confusing, but it's working now, and I'm not exactly sure how it got messed up.

Re: Fatal error: Call to a member function on a non-object

Posted: Wed Jun 07, 2006 3:42 am
by wesyah234
I wondered really what happened, so I went back and renamed my admin directory to "admin2" and configured the admin directory location in config.php to be "admin2".

got the following error in listcontent.php:

Code: Select all

Warning: showheader(/home/katydids/public_html/lib/classes/../../admin/lang/en_US/admin.inc.php): failed to open stream: No such file or directory in /home/katydids/public_html/lib/classes/class.admintheme.inc.php on line 1359

Warning: showheader(/home/katydids/public_html/lib/classes/../../admin/lang/en_US/admin.inc.php): failed to open stream: No such file or directory in /home/katydids/public_html/lib/classes/class.admintheme.inc.php on line 1359

Warning: showheader(): Failed opening '/home/katydids/public_html/lib/classes/../../admin/lang/en_US/admin.inc.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/katydids/public_html/lib/classes/class.admintheme.inc.php on line 1359
seems that my above referenced bug is still an issue.

I added a followup to that bug.  Basically, the offending line of code does:
include($dirname.'/../../admin/lang/en_US/admin.inc.php');

.. using the hard coded "admin" directory name, when it should be using the configured admin dir location: $config['admin_dir']

Can anyone shed some light on this?  I reopened the bug, but maybe I'm missing something here... let me know if I'm doing something wrong.

Thanks

Re: Fatal error: Call to a member function on a non-object

Posted: Wed Jun 07, 2006 4:07 am
by calguy1000
Okay, so I did this:

a) mv admin admin_test
    renamed my admin directory

b) changed the $config['admin_dir'] entry in the config.php appropriately

I was able to add and delete news articles without difficulty.  I'm using the latest and greatest, hot off the presses SVN version of News and the core.  so it looks like this issue has been fixed.

Re: Fatal error: Call to a member function on a non-object

Posted: Wed Jun 07, 2006 1:30 pm
by wesyah234
calguy1000 wrote: I'm using the latest and greatest, hot off the presses SVN version of News and the core.  so it looks like this issue has been fixed.
Yeah, I see it was fixed in this:
http://viewsvn.cmsmadesimple.org/viewsv ... 4&view=rev
revision of class.admintheme.inc.php on May 30, 2006

Time to start using the subversion copy of the code I guess!  only problem is I have an existing site that would need to be upgraded...

Does the upgrade functionality work if you're moving from .13 to a newer svn copy??