WPPizza – A Restaurant Plugin for WordPress › Support › General Support › wppizza_add_category_hidden_field
- AuthorPosts
- 5 May, 2015 at 8:33 pm #9671
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 3114It just keeps coming 🙁
Mick.
5 May, 2015 at 8:38 pm #9676you 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.phpif 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)
5 May, 2015 at 8:47 pm #9677in 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)
1 June, 2015 at 5:51 pm #10355Thanks Olly,
I’ll do that.
Mick.
- AuthorPosts
- The topic ‘wppizza_add_category_hidden_field’ is closed to new replies.