Jump to content
trevorcr

Hooker has crashed

Recommended Posts

trevorcr    0
trevorcr

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.hookcode267.php

Share this post


Link to post
Share on other sites
Simon    247
Simon

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.

Share this post


Link to post
Share on other sites
trevorcr    0
trevorcr

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.

Share this post


Link to post
Share on other sites
Simon    247
Simon

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'

Share this post


Link to post
Share on other sites
Simon    247
Simon

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

Share this post


Link to post
Share on other sites
trevorcr    0
trevorcr

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

Share this post


Link to post
Share on other sites
Nicholas Kyriakides+    2
Nicholas Kyriakides

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!

Share this post


Link to post
Share on other sites
Simon    247
Simon

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 ) ) {

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Similar Content

    • webmktco
      By webmktco+
      I'm getting the following errors when trying to add hooks:

      Here's the debug info: http://www.stackdental.com/?pldebug=1
      Core, themes, and plugins are up to date.
       
       
       
    • art23130
      By art23130+
      We had a very nice shortcodes library and hooker in the previous version of the platform. But in the version 5 they are missing. 
      So are you going to improve it again in future or no they are not supported anymore? 
      and one more question, what do you suggest for sharing bar which we had in DMS2 ?
      Thanks for your effort 
    • dreamsight
      By dreamsight+
      We add phone number to the top right of sites using hooker (example http://hub.theasap.org.uk/) but it's not responsive. Is there a better way to add here, which would be responsive?
    • kellid
      By kellid
      Hello, 
      I'm in a dramatic situation.  I have a live site that is totally screwed up and I'm in desperate need to fix it asap.  The site was originally build with Pagelines but have made several upgrades through the years.  With the latest WP upgrade, somehow the action loop I was using on my homepage came through dramatically wrong and not sure how to fix the problem.  I have the Hooker plugin and in need of finding the action map to figure out where to implement the loop and fix the problem.  I found the action map plugin stored on an old hardrive but when activated, I got an error so I quickly deleted it.  I can't find a download or instructions on this anywhere, only broken links and no documentation.   
      Can you please direct me to the action map to use the hooker that I already have or show me the documentation to use this product?  
      Thank you
    • ipitts
      By ipitts+
      To whom it may concern:
      I am developing a website for a client using the PageLines DMS2 theme and am having an issue getting a custom jQuery function to work using your Hooker plugin. I have used Hooker to add HTML and PHP to the wp_head hook successfully, so I do not understand where the issue exists – I am using the pageslines_after_footer hook to place my jQuery at the bottom of the document (alongside the many other scripts that come with the theme and various other plugins). I checked the document HEAD section and know that jQuery is enabled, and after enabling my custom hook saw that my script was loaded into the footer (as hoped for), but it is not working.
      I am trying to make a simple, custom back-to-top button that appears after a user has scrolled the page a certain distance, as calculated in jQuery. After an hour, I decided to troubleshoot my script on a test WordPress site on my localhost (using jQuery version 1.11.3) and it works exactly as intended. I would like to avoid writing any code within the DMS2 theme files if possible.
      I have also tried the wp_head, wp_footer and pagelines_before_footer hooks to no avail. Am I using the wrong hook(s)? What else can I try?
      My code:
      HTML
      <a href="#"><div id="bttb-cont" style="">Hello</div></a>
       
      jQuery (within the Hooker plugin)
      <script type="text/javascript">
                      $(document).scroll(function() {
                                      var windowHeight = $(window).height() / 7;
                                      var scroll = $(window).scrollTop();
                                      
                                      if (scroll > windowHeight) {
                                                      $('#bttb-cont').fadeIn();
                                      } else {
                                                      $('#bttb-cont').fadeOut();
                                      };
                      });
      </script>
       
      As you can see, it is a very simple script.. Any help on this matter will be greatly appreciated.
       
×