Jump to content


Photo
Hooker

Hooker has crashed



Best Answer trevorcr , 20 January 2013 - 02:25 AM

It worked!  I'll take your suggestion to echo the html and just have a single php tag.

Go to the full post


  • Please log in to reply
7 replies to this topic

#1 trevorcr

trevorcr

    Member

  • Members
  • 14 posts
  • LocationSan Jose, CA
  • Framework Version:2.4
  • Country: Country Flag

Posted 19 January 2013 - 10:31 PM

Hi Team, the hooker plugin has crashed on my site.  Hook code showing outside edit box.

  • Cannot add any more hooks
  • Cannot delete hooks (hook at page id 267 caused the crash)
  • Existing hooks are working
  • Hook added at “pagelines_loop_before_post_content”
  • Disabling and enabling plugin does not help

hooker1.png

 

The current state of the hooker page is now showing multiple selections;

hooker2.png

 

The code that caused the crash is attached.  Help! Please.Attached File hookcode267.php   4.53KB  1 downloads



#2 Simon_P

Simon_P

    Messer

  • Administrators
  • 8388607 posts
  • LocationDevon
  • Framework Version:2.0
  • Country: Country Flag

Posted 19 January 2013 - 10:46 PM

Think the problem here is your 'hook' is breaking in and out of php tags multiple times, you have html echoed then raw html and ultimately it just breaks the form.

 

The flugin was never designed for huge amounts of pasted code like that.

 

If you put all your html into echo/print statements it would probably work fine.

 

PHP mode is meant for php, not switching between php and html about 20 times.



#3 trevorcr

trevorcr

    Member

  • Members
  • 14 posts
  • LocationSan Jose, CA
  • Framework Version:2.4
  • Country: Country Flag

Posted 20 January 2013 - 01:47 AM

Thanks for the feedback.  How can I recover?  I cannot delete the "bad" hook.  I have a hookers.pimp file saved.  If I delete the "bad" hook from that file and import would that work?  Looking for ideas.



#4 Simon_P

Simon_P

    Messer

  • Administrators
  • 8388607 posts
  • LocationDevon
  • Framework Version:2.0
  • Country: Country Flag

Posted 20 January 2013 - 01:56 AM

it *might* work, hadnt thought of that...the data in pimp file is JSON, pretty easy to figure out what to delete.

 

If that fails, then the other way is to delete/empty the hook options in the database. They are contained in the wp_options table under a row called 'pl_hooks_editor'



#5 Simon_P

Simon_P

    Messer

  • Administrators
  • 8388607 posts
  • LocationDevon
  • Framework Version:2.0
  • Country: Country Flag

Posted 20 January 2013 - 01:59 AM

Just tested, editing the export file will work, so you dont ave to delete all the hooks.



#6 trevorcr

trevorcr

    Member

  • Members
  • 14 posts
  • LocationSan Jose, CA
  • Framework Version:2.4
  • Country: Country Flag

Posted 20 January 2013 - 02:25 AM   Best Answer

It worked!  I'll take your suggestion to echo the html and just have a single php tag.



#7 shillos

shillos

    Member

  • Members

  • 10 posts
  • LocationLarnaca
  • Framework Version:DMS v.2.0
  • Country: Country Flag

Posted 02 February 2013 - 08:20 PM

Hey! Don't know if this is a crash either I got a message while testing with P3 (Plugin Performance Profiler) to test if any plugin is taking up resources, just this came out to show up on a red notification ribbon: A fatal error occurred during profiling: Call to a member function add_menu() on a non-object in file /home/content/S/u/p/SuperClubRadio/html/wp-content/plugins/hooker/hooker.php on line 44 

 

Can't understand what's gone wrong on line 44. Working on Wordpress 3.5.1! Just thought I might report this!



#8 Simon_P

Simon_P

    Messer

  • Administrators
  • 8388607 posts
  • LocationDevon
  • Framework Version:2.0
  • Country: Country Flag

Posted 02 February 2013 - 08:33 PM

Shillos

1. Please do not just jump in on an already answered question, the OP has already accepted the answer and will have got a notification that you have replied, and could see this as spamming.

2. edit hooker.php line 42 to read: if ( current_user_can('edit_theme_options') && is_object( $wp_admin_bar ) ) {