PDA

View Full Version : Getting an error..


N-0p3rz
09-04-2008, 11:51 AM
When you click on direct links to post, such as;

website.com/community/showthread.php?p=295293#post295293

The error given is;

Fatal error: Cannot use object of type vB_Session as array in /home/directory/public_html/community/showthread.php(2149) : eval()'d code on line 33


I viewed those two lines (2149 and 33) and on them is;

Line 33:
'bbcodecache',


Line 2149:

($hook = vBulletinHook::fetch_hook('showthread_complete')) ? eval($hook) : false;

Anyone got a clue what could be causing this? I checked out the bbcode manager and made sure all the custom ones we had were fine, and they seemed fine. We just moved from a dedicated server to a shared (which I'm starting to think may play a role), this is the [only] backup and we provided it to the host and they loaded it.

Marco van Herwaarden
09-04-2008, 11:54 AM
Your problem is with line 33 of the plugin that is executed on the showthread_complete hook location.

N-0p3rz
09-04-2008, 12:03 PM
Your problem is with line 33 of the plugin that is executed on the showthread_complete hook location.

How do I find that?

Marco van Herwaarden
09-04-2008, 12:09 PM
You will find the plugin in the Plugin Manager. You will need to delete/disable the plugin and correct the coding or contact the author for a solution.

N-0p3rz
09-04-2008, 12:25 PM
I don't know what plugin is causing it..

Opserty
09-04-2008, 12:30 PM
Disable them one by one till your error goes away, then you which one is causing it...

Marco van Herwaarden
09-04-2008, 12:37 PM
How many plugins do you have at the showthread_complete hook location?

N-0p3rz
09-04-2008, 12:42 PM
I looked at the little download/upload plugins area and the only 2 plugins that use the showthread_complete hook are;

Who Viewed This Thread (which is vBulletin itself)
and
Display Thread Readers which is with the Who Has Read a Thread plugin.

I disabled it in options and plugin manager, but, nothing.

Marco van Herwaarden
09-04-2008, 12:45 PM
Not sure what you mean with "which is vBulletin itself". Default vBulletin does not use any plugins.

Disable these 2 plugins (you can try 1 at a time) and see if the problem is solved.

N-0p3rz
09-04-2008, 12:50 PM
Not sure what you mean with "which is vBulletin itself". Default vBulletin does not use any plugins.

Disable these 2 plugins (you can try 1 at a time) and see if the problem is solved.

I don't know, it has vBulletin to the right of it as the other one has "Who Has Read a Thread" to the right of it. Here's a screenshot of that; http://img58.imageshack.us/img58/2519/screenshotxg9.png .

I'll try disabling the other one, though. If I can find it.

Marco van Herwaarden
09-04-2008, 12:52 PM
The "vBulletin" only means that it is not associated with a product and uses the default "product" named vBulletin. It is not a Jelsoft supplied default plugin.

N-0p3rz
09-04-2008, 01:28 PM
Ok^^.. Still looking for that other one.

Marco van Herwaarden
09-04-2008, 01:37 PM
Which other one?

Both plugins at that hook location are listed on your screenshot.

N-0p3rz
09-04-2008, 02:01 PM
I just deleted the Who Read a Thread... But, the problem is still happening. The "Who Viewed This Thread?" is still listed in the download / upload plugins area. But, I can't find it listed anywhere in the manager.. This is odd.

--------------- Added 1220545097 at 1220545097 ---------------

I downloaded that one plugin (that I can't find in manager to delete or disable) and the query it runs is;

// Get who has already viewed this thread
$currentthread = $db->query_first("SELECT whoviewed FROM ".TABLE_PREFIX."thread WHERE threadid = $threadid");
$vieweduserids = explode(" ", $currentthread['whoviewed']);

$userinfo = fetch_userinfo($vbulletin->userinfo['userid']);

if (!$userinfo['invisible'] OR $showinvisible)
{
if (!empty($currentthread['whoviewed']))
{
if (!in_array($vbulletin->userinfo['userid'], $vieweduserids))
{
$db->query_write("UPDATE ".TABLE_PREFIX."thread SET whoviewed = CONCAT(whoviewed, \" \", \"" .$vbulletin->userinfo['userid'] . "\") WHERE threadid = $threadid");
}
}
else
{
$db->query_write("UPDATE ".TABLE_PREFIX."thread SET whoviewed = \"" . $vbulletin->userinfo['userid'] . "\" WHERE threadid = $threadid");
}
}

// Who has viewed this thread?
if (empty($currentthread['whoviewed']))
{
$thread['viewers'] = '('.strtolower($vbphrase['none']).')';
}
else
{
$result = $db->query_read("SELECT userid, username FROM ".TABLE_PREFIX."user WHERE userid IN (" . implode(", ", $vieweduserids) . ")");
$viewers = array();
while ($user = $db->fetch_array($result))
{
array_push($viewers, "<a target=\"_blank\" href=\"member.php?".$vbulletin->session['sessionurl'] . "u=".$user['userid'] . "\">" . htmlspecialchars($user['username']) . "</a>");
}
$thread['viewers'] = implode(", ", $viewers);
}

--------------- Added 1220550920 at 1220550920 ---------------

Disable them one by one till your error goes away, then you which one is causing it...

Just did, that.. I don't know what the hell is up with this thing. Disabling all hooks fixes it, but, when I disabled every one, one by one, nothing was fixed. Could it be two combining and making a problem? :confused::mad:

--------------- Added 1220573787 at 1220573787 ---------------

Anyone???