-
Notifications
You must be signed in to change notification settings - Fork 1
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
Gutenberg Category and Tag Link blocks don't work on front end - invalid use of ID attribute #52
Comments
My primary menu worked since I didn't use the |
I added a Category link for FSE. The generated HTML is:
The Warning was only produced twice. I'd expected to see 3 messages. |
As a quick hack I changed the code to check the value of
|
Workaround
|
This hack's no good for the long term.... |
It might make more sense if the |
A simpler workaround for the Fizzie theme, which already overrides the navigation link is to update |
The original issue for this is WordPress/gutenberg#28712 |
PR 28999 is another follow on that addresses the |
Delivered in v0.4.0 |
https://blocks.wp.a2z/block/navigation-link-core-navigation-link/category-link-core-navigation-link/
Warning: Attempt to read property "post_status" on null in C:\apache\htdocs\wordpress\wp-content\plugins\gutenberg\build\block-library\blocks\navigation-link.php on line 110
Warning: Attempt to read property "post_status" on null in C:\apache\htdocs\wordpress\wp-content\plugins\gutenberg\build\block-library\blocks\navigation-link.php on line 110
Editing the post produced the same warnings, then on interacting with the Core Navigation block ( horizontal ) I got "This block has encountered an error and cannot be previewed". 12 Errors in the console log.
There were 5 empty social links in the menu. I removed these and the warnings still appeared. No menu items were visible.
Both of the links appeared to be valid.
Neither link had a Description, Link title or Link rel
The problem was that the
$attributes['id']
values ( 469 for Block News and 39 for News ) don't refer to postsThese are the values of the
term_id
for the categories.The text was updated successfully, but these errors were encountered: