wppizza_add_category_hidden_field

WPPizza – A Restaurant Plugin for WordPress Support General Support wppizza_add_category_hidden_field

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #9671
    Mick Levin
    Participant

      Hello,

      Recently I noticed that the error_log on one of my websites balooned.I looked into it, and it contains the same 3 lines repeating again and again, about 20 times per second (or rather I assume – per visit).

      What could that be about?!

      PHP Warning: Missing argument 2 for WPPIZZA_ACTIONS::wppizza_add_category_hidden_field() in /home4/xxx/public_html/wp-content/plugins/wppizza/classes/wppizza.actions.inc.php on line 3114
      PHP Warning: Missing argument 3 for WPPIZZA_ACTIONS::wppizza_add_category_hidden_field() in /home4/xxx/public_html/wp-content/plugins/wppizza/classes/wppizza.actions.inc.php on line 3114
      PHP Warning: Missing argument 4 for WPPIZZA_ACTIONS::wppizza_add_category_hidden_field() in /home4/xxx/public_html/wp-content/plugins/wppizza/classes/wppizza.actions.inc.php on line 3114

      It just keeps coming 🙁

      Mick.

      #9676
      Olly
      Admin & Mod

        you are (probably) using quite on old and customized version of the loop template in your themes directory. (before october 2014)
        may that be wppizza-loop.php or wppizza-loop-responsive.php

        if that is the case (let me know if it is not) you will find in that template (approx line 227 or so i would think, or possibly approx line 302, depending on version)

        a line that reads :

        
        do_action('wppizza_loop_inside_after_content', $postId);
        

        or similar.

        change/amend it to read the following

        
        do_action('wppizza_loop_inside_after_content', $postId, $options, $termSlug, $categoryId);
        

        i.e add the missing 3 arguments

        and you should be fine (it’s just a php notice but annoying i know. just could not be helped at the time)

        #9677
        Olly
        Admin & Mod

          in fact, you probably want to (read should) compare all the do_action calls in your template with the ones in the current one you can find in wppizza/templates/ to add the missing arguments.
          ie.

          
          do_action('wppizza_loop_outside_start',$the_query);
          should read
          do_action('wppizza_loop_outside_start', $the_query, $options, $termSlug, $categoryId);
          do_action('wppizza_loop_outside_before',$the_query);
          should read
          do_action('wppizza_loop_outside_before', $the_query, $options, $termSlug, $categoryId);
          

          and so forth

          (just compare the two files, searching for “do_action” hooks)

          if you do not, it won’t break things, but i would recommend you do, to make sure future versions behave too in case some functions relay on these arguments

          (hope the above makes sense)

          #10355
          Mick Levin
          Participant

            Thanks Olly,

            I’ll do that.

            Mick.

          Viewing 4 posts - 1 through 4 (of 4 total)
          • The topic ‘wppizza_add_category_hidden_field’ is closed to new replies.