Register Members List Search Today's Posts Mark Forums Read

Reply
 
Article Options
Fast Plugin Error Detection
Revan
Join Date: Jan 2004
Posts: 1,671

Started doing my first if...else chain in 2004, and released my first major vBulletin modification in August 2004 with the first version of the RPG Integration Hack.

Norway
by Revan Revan is offline 05 Jun 2006

So you have a lot of plugins, you don't know exactly what code runs in each of them, and your showthread suddenly starts spewing errors in eval()'d code.
Disabling hooks in general fixed it, so you are certain it's a hack. But which one? You now face the long task of disabling possibly 50+ products in order to see which one it is. Even by looking at hook locations, there could be any number of products.
That's where this tutorial comes in the picture. Follow these steps and you will be able to locate what product it is within minutes.
  1. Examine the error message
    Here's an example error message that Robert in IRC had yesterday:

    Block Disabled:      (Update License Status)  
    Suspended or Unlicensed Members Cannot View Code.

    Okay, this tells you a number of things, marked in italics and underline.
    It tells you what file the hook is located, and also where in the file the hook is located.
    This enables us to move on to step 2.
  2. Determine the hook name
    This is the part where we open up /includes/class_postbit.php and go to line 279, and discover the hook name is postbit_display_complete.
    Based on this information and the one we found in Step #1, we can now move on to the next step.
  3. Query for the product
    Run the following query either in the AdminCP or in phpMyAdmin:

    Block Disabled:      (Update License Status)  
    Suspended or Unlicensed Members Cannot View Code.

    Replace TABLEPREFIX with your actual table prefix.
    What you are doing here is taking a small bit of the error message, the relevant bit ("array_merge") and searching for it in all the plugins that appear in the hook called in the line you saw in the error in step #1.
    This will turn up a nice set of results: The hook name, and plugin/product titles.
    You should then move on to the support thread of the hack in question, and look for a fix. If none exists, post a post with the result of the query and the hack author will fix it as soon as possible.
The italics/underlined parts are the parts that will vary from error to error. You must "replace" them with the error you are recieving in order for it to "work" for you.
Views: 1900
Reply With Quote
Comments
  #2  
Old 05 Jun 2006, 14:16
TTG's Avatar
TTG TTG is offline
 
Join Date: May 2004
Very useful .. one to add to the favourites.
Thanks Revan
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Article Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 06:06.

Layout Options | Width: Wide Color: