View Full Version : Error message - any ideas?
Morrus
11-02-2014, 05:13 PM
I'm hoping this is something simple. This error occurs when clicking in a CMS category or article author using vBulletin 4.2.2. My Google-fu failed me!
Call to a member function isSection() on a non-object in /var/www/virtual/enworld/forum/packages/vbcms/content/article.php(460) : eval()'d code on line 3
Is this something I can easily fix?
It looks like it's coming from an add-on product. If you can figure out which one it is, you should ask in the thread for that mod. You can try turning off products one at a time, but you might be able to guess which one it is, if you have someting installed that has to do with cms articles.
Morrus
11-02-2014, 06:02 PM
It looks like it's coming from an add-on product. If you can figure out which one it is, you should ask in the thread for that mod. You can try turning off products one at a time, but you might be able to guess which one it is, if you have someting installed that has to do with cms articles.
Sadly, the whole "turn off products" advice doesn't work for a busy site which relies on them (and we have many, many mods - which could be the problem!)
I was hoping there was an obvious thing in the error message (I don't speak code) that I could fix. Hoping I don't have to pay someone to diagnose and fix it!
ForceHSS
11-02-2014, 06:12 PM
($hook = vBulletinHook::fetch_hook('vbcms_article_populate_ start')) ? eval($hook) : false;
check all plugins being used for cms
Morrus
11-02-2014, 06:22 PM
($hook = vBulletinHook::fetch_hook('vbcms_article_populate_ start')) ? eval($hook) : false;
check all plugins being used for cms
I don't know what that means. Would you be so kind as to explain?
If you go to the Plugin Manager, you can look at the Hook Location column and look for a plugin using that hook. You can also sort by hook by clicking on Hook Location.
ForceHSS
11-02-2014, 07:26 PM
I don't know what that means. Would you be so kind as to explain?
Sorry I should of explained I forget sometimes not everyone knows all about vbulletin. Do what kh99 said
Morrus
11-02-2014, 08:16 PM
If you go to the Plugin Manager, you can look at the Hook Location column and look for a plugin using that hook. You can also sort by hook by clicking on Hook Location.
Using what hook? The word doesn't mean anything to me. :)
And assuming I am able to look a list of plugins and determine they are using said hook, what do I do about that?
ozzy47
11-02-2014, 08:18 PM
vbcms_article_populate_start is the hook location. Disable each one one at a time till you find the culprit.
Using what hook? The word doesn't mean anything to me. :)
As mentioned above, vbcms_article_populate_start.
And assuming I am able to look a list of plugins and determine they are using said hook, what do I do about that?
Hopefully it will tell you which product is causing the error message. The message is coming from a plugin using that hook location, so if there happens to be only one plugin using that hook, then you'll know. Then you can ask in the thread for that product (assuming it's a prouct you downloaded from here).
Otherwise we don't know how to help you (unless someone else happens to recognize the error).
Morrus
11-03-2014, 10:05 AM
Thanks, guys! That was really useful. I think that has helped me narrow it down to two possible culprits.
The bad news is that both were mods written by people in the paid work section here at vBulletin.org, and almost without exception, 100% of people hired there flake out and disappear. Which leaves me in something of a pickle...
What would you advise I do next? Try to hire someone to look at those two mods and see if they can figure out the issue?
Edit - confirmed; deactivating one of the two culprits fixes the issue, so at least is has been identified! The plugin itself is pretty short. Is it likely that the error is there in that short plugin, or will someone have to examine the entire mod?
ozzy47
11-03-2014, 10:09 AM
What was the code in the offending plugin?
Morrus
11-03-2014, 10:12 AM
What was the code in the offending plugin?
Here we go. Hopefully this will display OK. It's part of aa mod which counts the number of times an article is viewed in preview mode, since I always use full article display in sections.
if (self::VIEW_PREVIEW == $viewtype) {
if ($increment_count) {
if (PreviewViewCount::$content->isSection() && PreviewViewCount::display()) {
ExtendedDatabases_Query::write(array(
'query' => 'UPDATE `%1$scms_nodeinfo`
SET `preview_view_list` = `preview_view_list` + 1
WHERE `nodeid` = %2$d',
'params' => $this->content->getNodeId()
));
if (!defined('PREVIEW_COUNT_FIRST')) {
ExtendedDatabases_Query::write(array(
'query' => 'UPDATE `%1$scms_nodeinfo`
SET `preview_view_first` = `preview_view_first` + 1
WHERE `nodeid` = %2$d',
'params' => $this->content->getNodeId()
));
define('PREVIEW_COUNT_FIRST', true);
}
}
}
}
Unfortunately that doesn't help a lot. It must be that PreviewViewCount::$content is not an object, but we'd have to see more of the code to have any chance of knowing why that is. You might be able to change the third line to something like:
if (is_object(PreviewViewCount::$content) && PreviewViewCount::$content->isSection() && PreviewViewCount::display()) {
(the part in red is added), and it might make the error message go away, but without understanding more of the code I can't tell you what effect that would have on the preview counting.
Morrus
11-03-2014, 05:50 PM
Thank you! That may have worked! I'll keep an eye on it, but at first glance it looks like the preview counts are still incrementing and the category links are now working.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.