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

Block-based themes without a comments file trigger a deprecation warning #28045

Closed
kjellr opened this issue Jan 7, 2021 · 0 comments · Fixed by #28128
Closed

Block-based themes without a comments file trigger a deprecation warning #28045

kjellr opened this issue Jan 7, 2021 · 0 comments · Fixed by #28128
Assignees
Labels
[Block] Comments (legacy) The legacy mode of the Comments block (formerly known as Post Comments) [Feature] Themes Questions or issues with incorporating or styling blocks in a theme. [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@kjellr
Copy link
Contributor

kjellr commented Jan 7, 2021

Block-based Themes throw up a depreciation warning if they do not include a comments.php file:

Deprecated: Theme without comments.php is deprecated since version 3.0.0 with no alternative available. Please include a comments.php template in your theme. in /var/www/html/wp-includes/functions.php on line 5059

This happens whether or not the theme uses Gutenberg's comment blocks. To get around it, the theme can supply a comments.php file... but if they do, then the file's contents will be used to render the content inside of of the post contents block. So for example, using an empty placeholder file to suppress the error will wipe out the display of comments. 😞

The rendering of comments.php is tracked as part of #24101, but I'm opening this separate issue to see if we can just suppress that warning for block-based themes. It seems like the warning will continue to be a problem even after #24101 is fixed.

This came up originally in WordPress/theme-experiments#157.

@kjellr kjellr added [Type] Bug An existing feature does not function as intended [Feature] Themes Questions or issues with incorporating or styling blocks in a theme. [Feature] Full Site Editing [Block] Comments Affects the Comments Block - formerly known as Comments Query Loop labels Jan 7, 2021
kjellr added a commit to WordPress/theme-experiments that referenced this issue Jan 11, 2021
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Jan 12, 2021
@aristath aristath changed the title Block-based themes without a comments file trigger a depreciation warning Block-based themes without a comments file trigger a deprecation warning Jan 14, 2021
@gziolo gziolo added [Block] Comments (legacy) The legacy mode of the Comments block (formerly known as Post Comments) and removed [Block] Comments Affects the Comments Block - formerly known as Comments Query Loop labels Oct 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Comments (legacy) The legacy mode of the Comments block (formerly known as Post Comments) [Feature] Themes Questions or issues with incorporating or styling blocks in a theme. [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants