Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

header.php, footer.php or sidebar.php template missing deprecated notice #1

Open
mtx-z opened this issue Jul 9, 2018 · 1 comment
Assignees

Comments

@mtx-z
Copy link
Owner

mtx-z commented Jul 9, 2018

Issue do not seem to have a proper fix.
Made few non-conclusive tests.

Error: Notice: Theme without sidebar.php is deprecated since version 3.0.0 with no alternative available. Please include a sidebar.php template in your theme. in C:\laragon\www\mnp\wp-includes\functions.php on line 3984. (also with header.php or footer.php).

See roots/sage#610.

NOT WORKING:
I didn't success to prevent only prevent notice error to no be displayed.

~~Remove "notice" verbose level:
I removed "notice" verbose level from output using a mu-plugin.
Create /wp-content/mu-plugins/verbose.php

Containing:
error_reporting(E_ALL ^ E_NOTICE); //all except notice

In wp-config.php add
error_reporting(E_ERROR | E_WARNING | E_PARSE); //report only error, warning, parse errors

Source that have some useful links also about customizing verbose level (and this).

@mtx-z mtx-z added help wanted Extra attention is needed question Further information is requested labels Jul 9, 2018
@mtx-z mtx-z added wontfix This will not be worked on and removed question Further information is requested labels Aug 2, 2018
@mtx-z
Copy link
Owner Author

mtx-z commented Aug 8, 2018

As seens from: https://github.com/roots/sage-woocommerce

By default, you will get an error message that themes without header.php, footer.php and sidebar.php are deprecated. You have to replace single-product.php and archive-product.php templates with your Blade template. You can find those two files in /examples/views folder of this package. The trick is not to use get_header, get_footer or get_sidebar functions, because it's handled differently with Blade. Instead of that, you can use actions:

do_action('get_header', 'shop');
do_action('get_sidebar', 'shop');
do_action('get_footer', 'shop');

@mtx-z mtx-z removed help wanted Extra attention is needed wontfix This will not be worked on labels Aug 8, 2018
@mtx-z mtx-z self-assigned this Aug 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant