Jump to content


Photo
- - - - -

Hooker

hooker remove action ad action customize functions.php

Best Answer Simon_P , 14 January 2013 - 01:08 AM

Actually after some google, seems PHP will crash with this error if there is php comments that are left open:

 

/* this is open tag

* still a comment

*/ this is the close tag.

 

If any file is missing the close tag, php will crash.

Go to the full post


  • Please log in to reply
11 replies to this topic

#1 suzyo

suzyo

    Super Member

  • Members
  • 105 posts
  • Country: Country Flag

Posted 14 January 2013 - 12:08 AM

Okay, so, this is a WP question of sorts, but it also applies to PL, because I think it's related to the Hooker. Undoubtedly my fault.

 

So, here goes: 

 

 

PHP Warning: call_user_func_array() [<a href='function.call-user-func-array'>function.call-user-func-array</a>]: First argument is expected to be a valid callback, 'google_leaderboard_ad' was given in /home1/suzytest/public_html/wp-includes/plugin.php on line 406

 

line 406

call_user_func_array($the_['function'], array_slice($args, 0, (int) $the_['accepted_args']));

 

after digging around, i found that it is calling 

 

wp-content/plugins/pagelines-customize/functions.php

 

*/

add_action('pagelines_inside_top_branding', 'google_leaderboard_ad');

 

 

i know that this is the problem, but when i try to remove the above i can't access site. 

 

which part of the above do i remove?

 

also, this is weird because i used hooker to put that in, and i used hooker to remove it. but, apparently, hooker did not remove it, although it seems as if it did on my admin.

 

from the codex: "It is also worth noting that you may need to prioritise the removal of the action to a hook that occurs after the action is added. You cannot successfully remove the action before it has been added."

 

apparently removing this action calls for more than just deleting that line in the customize/functions.php am i on the right track, and can you guide me through? thank you.



#2 suzyo

suzyo

    Super Member

  • Members
  • 105 posts
  • Country: Country Flag

Posted 14 January 2013 - 12:44 AM

forgot to add this:

 

when i removed "*/

add_action('pagelines_inside_top_branding', 'google_leaderboard_ad');

 

i got this:

 

PHP Fatal error: fatal flex scanner internal error--end of buffer missed in /home1

 

finally, i'm pretty sure that i didn't write "add_action" anywhere, since i never heard of it until today!



#3 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts
  • LocationDevon
  • Framework Version:2.1.1
  • Country: Country Flag

Posted 14 January 2013 - 12:51 AM

pagelines-customize has nothing to do with the hooker plugin.

 

You can safely disable the customize plugin that will stop the framework from looking in the functions.php, or just delete the contents of the file.



#4 suzyo

suzyo

    Super Member

  • Members
  • 105 posts
  • Country: Country Flag

Posted 14 January 2013 - 12:56 AM

Hey, thanks for getting back so quickly, Simon! Please be gentle w me, I'm trying.

 

This shows the content of the file: 

 

I don't want to lose the customize plugin.  What part of the contents (show in the imgur file) shall I delete?

 

Thanks.



#5 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts
  • LocationDevon
  • Framework Version:2.1.1
  • Country: Country Flag

Posted 14 January 2013 - 12:58 AM

remove add_action('pagelines_inside_top_branding', 'google_leaderboard_ad'); or place // in front of it.



#6 suzyo

suzyo

    Super Member

  • Members
  • 105 posts
  • Country: Country Flag

Posted 14 January 2013 - 12:59 AM

I just noticed your OMG avatar. Laughing my ass off.



#7 suzyo

suzyo

    Super Member

  • Members
  • 105 posts
  • Country: Country Flag

Posted 14 January 2013 - 01:00 AM

Yes, Simon, I did that, and got the fatal php error! (see my first post above)



#8 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts
  • LocationDevon
  • Framework Version:2.1.1
  • Country: Country Flag

Posted 14 January 2013 - 01:03 AM

Then deactivate the customize plugin.

 

I have absolutely no idea what 'fatal flex scanner' is.



#9 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts
  • LocationDevon
  • Framework Version:2.1.1
  • Country: Country Flag

Posted 14 January 2013 - 01:08 AM   Best Answer

Actually after some google, seems PHP will crash with this error if there is php comments that are left open:

 

/* this is open tag

* still a comment

*/ this is the close tag.

 

If any file is missing the close tag, php will crash.



#10 suzyo

suzyo

    Super Member

  • Members
  • 105 posts
  • Country: Country Flag

Posted 14 January 2013 - 01:19 AM

Yeah, but I actually did close that tag, still got the crash. Now I've deactivated the Customize plug in, and...BRB.

 

So, yeah, that error is gone. STILL have a freaking unbelievable 7 second load time on my empty site. 

 

I can delete Customize plugin and re-install, right? Thanks for all your help!



#11 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts
  • LocationDevon
  • Framework Version:2.1.1
  • Country: Country Flag

Posted 14 January 2013 - 01:25 AM

 can delete Customize plugin and re-install, right? Thanks for all your help!

Yes you can.



#12 suzyo

suzyo

    Super Member

  • Members
  • 105 posts
  • Country: Country Flag

Posted 14 January 2013 - 01:27 AM

YAY!  Go raibh maith agat!  







Also tagged with one or more of these keywords: hooker, remove action, ad action, customize functions.php