Welcome to Geeklog, Anonymous Saturday, September 07 2024 @ 09:50 pm EDT
Geeklog Forums
Call to a member function on a non-object
Eddy
Anonymous
Hi guys
I've posted this at the bottom of the thread relating to the Ratings system, but thought it might be worth posting in a new thread as there's nothing remotely similar to this problem anywhere else on the site (atleast, nothing comes up in a search). This error has been found a few times on different plugins, but there never seems to be an answer given in the threads.
-- RATINGS SYSTEM --
Think I've followed the installation instructions to a T, but am getting the following error :
Fatal error: Call to a member function on a non-object in /home/edwardtumath/public_html/sixhundred/system/lib-story.php on line 445
Wonder if anyone has a solution. Can't for one minute think what the problem could be.
Thanks
I've posted this at the bottom of the thread relating to the Ratings system, but thought it might be worth posting in a new thread as there's nothing remotely similar to this problem anywhere else on the site (atleast, nothing comes up in a search). This error has been found a few times on different plugins, but there never seems to be an answer given in the threads.
-- RATINGS SYSTEM --
Think I've followed the installation instructions to a T, but am getting the following error :
Fatal error: Call to a member function on a non-object in /home/edwardtumath/public_html/sixhundred/system/lib-story.php on line 445
Wonder if anyone has a solution. Can't for one minute think what the problem could be.
Thanks
6
7
Quote
Eddy
Anonymous
Quote by Dirk: Since you've modified lib-story.php, we can not now what's line 445 for you now. So please quote a relevant portion of the code around that line.
bye, Dirk
bye, Dirk
Cheers, Dirk.
// RATINGS //
if (function_exists('RATING_return_form'))
{
$article->set_var( 'rating', RATING_return_form($A['sid'], 'story', 1, 5 ) ); }
//RATINGS //
9
8
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
I'm not familiar with that hack, so I don't know what else it changes, but that line itself looks okay. $article is supposed to be a template, so that line should work. Unless $article is overwritten with something else (that's not a template) before that line ...
bye, Dirk
bye, Dirk
5
7
Quote
Eddy
Anonymous
Quote by Dirk: I'm not familiar with that hack, so I don't know what else it changes, but that line itself looks okay. $article is supposed to be a template, so that line should work. Unless $article is overwritten with something else (that's not a template) before that line ...
bye, Dirk
bye, Dirk
Thanks Dirk
There's nothing else in that file that's been changed..... $article appears all over the place, as I'm sure you will see from your own version of the same file, but I haven't made any other changes than to insert those four lines.
6
5
Quote
Status: Banned
machinari
Forum User
Full Member
Registered: 03/22/04
Posts: 1512
Excuse my nose, but did you install the plugin prior to modifying the core as per the comment here? It shouldn't make a difference in this case, but it's worth considering.
...And I'm curious what version you're installing because the code you posted is a bit different than what I just downloaded.
...And I'm curious what version you're installing because the code you posted is a bit different than what I just downloaded.
5
5
Quote
Eddy
Anonymous
Quote by machinari: Excuse my nose, but did you install the plugin prior to modifying the core as per the comment here? It shouldn't make a difference in this case, but it's worth considering.
...And I'm curious what version you're installing because the code you posted is a bit different than what I just downloaded.
...And I'm curious what version you're installing because the code you posted is a bit different than what I just downloaded.
Evening, M (or it is here in Scotland)
I've downloaded 1.0 beta, I think. Is that not the latest?
I'm installing to GL v. 1.3.11
What code have you got? Fancy posting it so I can try that instead?
Fairly desperate to get this problem fixed before I head off on vacation in, ooooh, six hours time (must get some sleep) so any help is GREATLY appreciated .
Cheers
9
6
Quote
Eddy
Anonymous
Forgive me, I'm using 2.0beta with 1.3.11cr
6
11
Quote
Status: Banned
machinari
Forum User
Full Member
Registered: 03/22/04
Posts: 1512
well, I don't recall if 1.3.11 supports autotags or not, but if this error can't be resolved, then I would suggest using the autotag support in the story itself rather than worrying about the template--at least until after your vacation.
I copied this code from the readme file included with 2.0b. The difference shouldn't make a difference
but since you asked, here it is:
if (function_exists('RATING_display_rating'))
{
$article->set_var( 'rating', RATING_display_rating($A['sid'], 'story', 1, 5,
CONST_FLAG_DEFAULT_RATING ) );
}
/* end rating code */
Also note that this code is meant for, as per the readme, line 439ish of GL version 1.4.0sr2, not 1.3.11. Placement may be significant...
I copied this code from the readme file included with 2.0b. The difference shouldn't make a difference
![Wink Wink](http://www.geeklog.net/images/smiles/icon_wink.gif)
Text Formatted Code
/* start rating code */if (function_exists('RATING_display_rating'))
{
$article->set_var( 'rating', RATING_display_rating($A['sid'], 'story', 1, 5,
CONST_FLAG_DEFAULT_RATING ) );
}
/* end rating code */
Also note that this code is meant for, as per the readme, line 439ish of GL version 1.4.0sr2, not 1.3.11. Placement may be significant...
Quote by readme:The call is something like (add the following code to lib-story.php around line 439 (on geeklog ver. 1.4.0sr2):
8
8
Quote
Eddy
Anonymous
Thanks for this!
I'm going to try and update GL to the latest version. I hope it works, for my site is quite heavily altered and making these changes will take a while..... Wish me luck.
E
I'm going to try and update GL to the latest version. I hope it works, for my site is quite heavily altered and making these changes will take a while..... Wish me luck.
E
3
7
Quote
All times are EDT. The time is now 09:50 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content