-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Post Categories & Post Tags Blocks don't work when inserted into Page #34212
Comments
I'd propose a feedback message such as: This block needs post terms to work, please add them here (+ link) Pages can have post-terms but are not present in vanilla, they need to be added by a theme developer. Best case would be to automatically remove these type of blocks from the editor when they do not fulfill the requirements for a certain post-type. As is talked about here: #30679 |
Agreed. The best solution would be to not allow a user to insert them into content where they're not going to work, such as on Pages. |
@carolinan Looking at #35957, does this actually prevent the user from being able to insert this block into a page? If not, then what is the point of this change? Replacing the spinner image with "No tags. No categories" is not much of a fix. It's also not much of an explanation to the user. What is the point of allowing someone to add this into a Page, if it's not going to work? Gutenberg shouldn't show this block in the Inserter if the current post (i.e. Page) doesn't have Tags or Categories (which is the default for WP Pages). |
The point is that the block will not look broken. If no tags are found, it displays that no tags are found, not why they are not found. |
I agree with Carolina here. We are approaching a full site editing experience where blocks need to be available everywhere in the default core experience. The solution to display 'no tags are found' gives the user all knowledge they need to understand what is happening and what this block is for. It is quite easy for a theme developer to disallow access to certain blocks on a post-type basis, if this is necessary. But we're talking here about the default start situation that new WP users get in front of them. |
Description
The Post Categories & Post Tags Blocks don't work if you insert them into a page.
After adding either of these blocks into your content, you simply get a spinning icon and nothing else. Since I presume these blocks are designed to only work with Post Categories & Tags (based on their name), then they should, at the very least, show a message to the user that they wont work within a Page, instead of simply showing a spinning icon like they're trying to do something.
Vid: https://share.getcloudapp.com/Qwu50JOL
Even after saving the page, and reloading it, the blocks still display a spinning icon.
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
No response
Environment info
WordPress 5.8
No Gutenberg plugin active
TwentyTwenty
No other plugins active
MacOS BigSur 11.4
Firefox 91.0.1
Pre-checks
The text was updated successfully, but these errors were encountered: