0

The problem - I get these warnings each time I login to /admin page in WP. Depending on which browser I use, there are problems with these:

Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'add_role_caps_to_job_agent' not found or invalid function name in /var/www/public_html/wp-includes/class-wp-hook.php on line 298

Warning: Cannot modify header information - headers already sent by (output started at /var/www/public_html/wp-includes/class-wp-hook.php:298) in /var/www//public_html/wp-includes/option.php on line 837

Warning: Cannot modify header information - headers already sent by (output started at /var/www/public_html/wp-includes/class-wp-hook.php:298) in /var/www/public_html/wp-includes/option.php on line 838

I've tried to look into option.php and class-wp.-hook.php but I've not much experience or knowledge what to look for.

Can anyone help?

0

The warning states the issue is coming from custom code as in core WP no function as add_role_caps_to_job_agent exists. Try searching for add_role_caps_to_job_agent in wp-content, to see how this function is getting called and fix or uncomment the call.

The other two notices will disappear once the first notice is solved as WP is trying to set/send headers which is possible only, if nothing was printed to the screen before.

  • Do I need to go through all plugins/theme etc. to find this debug? – Mette Oct 10 '18 at 13:22
  • Simply open your project codebase in an editor and search for the string… – Fabian Marz Oct 10 '18 at 13:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.