Wordpress php Plugin not found - php

I am getting this Warning and my Header and Footer on my Website are not showing them right.
Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'remove_admin_bar_style_frontend' not found or invalid function name in /home/toolsebo/www/yr-1007/wp-includes/plugin.php on line 496
I tried to find the remove_admin_bar_style_frontend in my functions.php to remove it but i cant.
Please help me to get this fixed i really don't know how to go ahead.

wp-includes/plugin.php is a core file, it wouldn't be in there, that's just what's generating the error.
Look in your wp-content/themes/your_theme_name/ folder for a functions.php or similar file. The function will be in there.

This means you are calling the function "remove_admin_bar_style_frontend" but that function was not in your plugin or theme. Search for that initiating code block and comment it.Try to search add_action('....

Related

Wordpress Customize not working - load-scripts.php errors

When I try to customize my Wordpress theme, I get a blank screen. I disabled plugins and the error was still there - it's the theme, I tried a different theme and the issue was gone.
I ran the JS console and got these errors, but I don't know what they mean:
load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-draggable,underscore,wp-a11y,wp-util,jquery&load[]=-ui-sortable,jquery-ui-droppable,backbone,wp-backbone,jquery-ui-tabs,shortcode,utils,media-models,moxiejs,plupload,wp-plupload&ver=4.9.8:58 Uncaught TypeError: Cannot read property 'replace' of undefined
at Function.m.template (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-draggable,underscore,wp-a11y,wp-util,jquery&load[]=-ui-sortable,jquery-ui-droppable,backbone,wp-backbone,jquery-ui-tabs,shortcode,utils,media-models,moxiejs,plupload,wp-plupload&ver=4.9.8:58)
at n.template (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-draggable,underscore,wp-a11y,wp-util,jquery&load[]=-ui-sortable,jquery-ui-droppable,backbone,wp-backbone,jquery-ui-tabs,shortcode,utils,media-models,moxiejs,plupload,wp-plupload&ver=4.9.8:61)
at n.render (load-scripts.php?c=1&load[]=jquery-ui-slider,jquery-touch-punch,iris,wp-color-picker,heartbeat,customize-base,customize-controls,customize-widgets,thickbox,&load[]=mce-view,imgareaselect,image-edit,quicktags,wplink,jquery-ui-position,jquery-ui-menu,jquery-ui-autocomplete,media-upload,accordi&load[]=on,customize-nav-menus,customize-models,customize-views,updates&ver=4.9.8:722)
at n.initialize (load-scripts.php?c=1&load[]=jquery-ui-slider,jquery-touch-punch,iris,wp-color-picker,heartbeat,customize-base,customize-controls,customize-widgets,thickbox,&load[]=mce-view,imgareaselect,image-edit,quicktags,wplink,jquery-ui-position,jquery-ui-menu,jquery-ui-autocomplete,media-upload,accordi&load[]=on,customize-nav-menus,customize-models,customize-views,updates&ver=4.9.8:718)
at n.e.View (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-draggable,underscore,wp-a11y,wp-util,jquery&load[]=-ui-sortable,jquery-ui-droppable,backbone,wp-backbone,jquery-ui-tabs,shortcode,utils,media-models,moxiejs,plupload,wp-plupload&ver=4.9.8:84)
at n.constructor (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-draggable,underscore,wp-a11y,wp-util,jquery&load[]=-ui-sortable,jquery-ui-droppable,backbone,wp-backbone,jquery-ui-tabs,shortcode,utils,media-models,moxiejs,plupload,wp-plupload&ver=4.9.8:86)
at new n (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-draggable,underscore,wp-a11y,wp-util,jquery&load[]=-ui-sortable,jquery-ui-droppable,backbone,wp-backbone,jquery-ui-tabs,shortcode,utils,media-models,moxiejs,plupload,wp-plupload&ver=4.9.8:84)
at f.ready (load-scripts.php?c=1&load[]=jquery-ui-slider,jquery-touch-punch,iris,wp-color-picker,heartbeat,customize-base,customize-controls,customize-widgets,thickbox,&load[]=mce-view,imgareaselect,image-edit,quicktags,wplink,jquery-ui-position,jquery-ui-menu,jquery-ui-autocomplete,media-upload,accordi&load[]=on,customize-nav-menus,customize-models,customize-views,updates&ver=4.9.8:31)
at Object.<anonymous> (load-scripts.php?c=1&load[]=jquery-ui-slider,jquery-touch-punch,iris,wp-color-picker,heartbeat,customize-base,customize-controls,customize-widgets,thickbox,&load[]=mce-view,imgareaselect,image-edit,quicktags,wplink,jquery-ui-position,jquery-ui-menu,jquery-ui-autocomplete,media-upload,accordi&load[]=on,customize-nav-menus,customize-models,customize-views,updates&ver=4.9.8:31)
at i (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-draggable,underscore,wp-a11y,wp-util,jquery&load[]=-ui-sortable,jquery-ui-droppable,backbone,wp-backbone,jquery-ui-tabs,shortcode,utils,media-models,moxiejs,plupload,wp-plupload&ver=4.9.8:2)
It seems like you are not the first one to have this problem. I cannot debug your problem for you (as load-scripts.php is a core file which is obvioiusly loading a lot) but MAYBE your problem is the same as described here: https://iansvoboda.com/code/dealing-load-scripts-php-console-errors-wordpress/
Ultimately the issue came down to extra white-space in the top of a functions.php include.
If your WordPress theme’s functions.php file (or any files
included/required inside of it) has extra white-space before the first
opening PHP tag, WordPress may not function correctly. The exact
issue(s) caused by the white-space vary depending on your setup and in
this case they took the form of a console error.
Therefore: Go ahead - check your theme files.

Editing Wordpress category gives PHP line/parse error

Not sure when this occurred but when editing a category, this error is given at the top of the edit category page.
Warning: call_user_func_array() expects parameter 1 to be a valid
callback, function 'my_category_custom_fields' not found or invalid
function name in /home2/sirenon2/public_html/wp-includes/plugin.php on
line 525
Line 525 is call_user_func_array($the_['function'], array_slice($args, 0, (int) $the_['accepted_args']));
When I submit on the edit category page, it gives me the original error plus:
Warning: Cannot modify header information - headers already sent by
(output started at
/home2/sirenon2/public_html/wp-includes/plugin.php:525) in
/home2/sirenon2/public_html/wp-includes/pluggable.php on line 1228
Line 1228 is header("Location: $location", true, $status);.
Any ideas on what the problem is and how to fix it? I do have custom fields on my edit category pages.
Thanks
Either one of installed plugins has error which is throwing above error or you need to update wordpress or PHP. There may be compatibility issue of WordPress with installed PHP version. Few of WordPress's functions might have been updated.
If updating doesn't works, simply go to wp-config.php file and set this constant to false. If this line is not there into config file, add it.
define('WP_DEBUG', false);
I also have this problem before. But I change output_buffering to On. You can find it from PHP.ini.
Or refer this url http://chevronscode.com/index.php/wordpress-header-error-wp-includespluggable-php.html

how to see which line caused warning in PHP

I am using a code where code is in code.php and the user defined functions are stored in function.php.
The functions are called multiple times.
While executing the code in code.php - I got the following error message.
Warning: in_array() expects parameter 2 to be array, null given in C:\xampp\htdocs\SanskritVerb\function.php on line 1177
the line 1177 of function.php falls inside a user defined function 'ends'.
How can I know which line of code.php called this function 'ends' ?
I think some languages show error like - Error in line X of function.php called in line Y of code.php
If something of this sort exists for PHP - it would save my debug time.
For such a task you need to assign an error handler and call
Exception::getTrace()
to get trace of Exception. see the documentation set_error_handler.
Using xdebug extension for PHP can give you higher tracing capabilities even without error. If you choose xdebug you should enable tracing by adding lines to php.ini
xdebug.auto_trace=On
xdebug.trace_output_dir=c:\path
Anyway this is up to you.

Why does the function file in the host comes back to the first mood?

I changed the theme and it doesn't work well,it gives the following error:
public_html/wp-content/themes/7/dt-the7/inc/shortcodes/includes/gap/function.php line 56
I found the problem and removed the function _check_active_widget(),but this error appeared for all of the folders so I changed function.php file. It worked well for sometime. But after an hour when I changed the settings of site in WordPress, all of the function files re-changed to the first mood,and they had function _check_active_widget() again. I remove them again and again but it keeps coming back.
My Question is:
Why doesn't it work well?
Why is the mood getting reset?
And finally, how can I fix these function files?
Try to surround the function in /home/fxijdcel/public_html/wp-content/themes/7/dt-the7/inc/shortcodes/includes/c‌​olumns/functions.php on line 86 with
if( !function_exists ( '_check_active_widget' ) )
In this way you declare this function only if is not been yet declared

Fatal error caused by get_theme_mod()

I've been using the WordPress Customize.php functionality to allows users to customize my theme via the admin Customizer. It's been working fine offline in WAMP, but when I uploaded the theme to the testing server I received this message:
Fatal error: Can't use function return value in write context in [my url]/functions.php on line 181
The line it links to is a reference to get_theme_mod(), and in particular:
$page_data = get_page(get_theme_mod('page'));
Do I have to register the 'theme mods' in functions or something?
Right, I've found my issue - and another one has arose that I'm looking into...
For those that read this after searching the web having suffered the same problem, the reason I was receiving this error was because above this I was testing the get_theme_mod with an empty() function. Which, does not work as get_theme_mod is not a variable.
if(!empty(get_theme_mod('page'))){
$page_data = get_page(get_theme_mod('page'));
}

Categories