nicnickj
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: Extending the Navigation Block Transform OptionsThank you for your response, Devin.
The theme is in fact a block theme, and the block in question is a custom block developed for the theme to control specific functionality within the site.
By “elsewhere” I mean that the custom block is accessible and able to be added anywhere else within the WordPress block editor other than the one place I need to add it, which is the Navigation block. I can add it from the editor menu and insert it into a page, a pattern, a template part, etc. But I’m looking to add it specifically to the Navigation block as you can do with blocks such as Search, Site Logo, Page List, and Social Icons.
If you go to Appearance > Editor > Navigation and select one of your site’s saved navigation menus, when adding a new menu item with the “+” icon, the 4 blocks listed above are available to add under the “Transform” heading in the menu that appears. That’s where I’m looking to make the custom block available so that it can be added in the manner.
Currently I can add the block markup manually within the Code Editor of the Navigation block, but that is not ideal for all users. I’m hoping there is a way to hook into that functionality and display my custom block as an option. I’m thinking it will have to be on the theme-level as the block.json settings do not appear to have an option for it to display within this menu. It’s currently set to a “widget” for the category, and even if I try to make its parent block the “core/navigation” block, it doesn’t appear as an option to be added within.
Every resource I’ve found just takes me around in circles and does not address how to do this.
- This reply was modified 1 year, 2 months ago by nicnickj.
Thank you, Anderson. 2.8.1-beta.2 seems to have resolved the issue.
We are now running WordPress 5.5 and updating incrementally, but we also tested 2.8.1-beta.1 on a previous 5.4 instance that was initially displaying the errors. We had upgraded from 2.4.2 to 2.8.0 of the plugin and that is when the notices began appearing in the JSON feed.
One thing we found that was upgrading to 2.8.1-beta.1 on an instance that displayed the notices did not resolve the issue even with all other plugins disabled. However, a fresh WordPress installation with 2.8.1-beta.1 did not display the errors. We tried clearing out plugin data manually and via the option to remove plugin data during deactivation, but the notices always displayed in the feed on instances wherein 2.8.0 was activated previously. 2.8.1-beta.2 seems to have resolved the issue.
Thank you kindly for your support on this.
- This reply was modified 1 year, 11 months ago by nicnickj.
@andergmartins Thank you for your prompt response. We tested 2.8.1-beta.1 and are continuing to receive warnings and notices in the WP-JSON feed:
<br />
<b>Notice</b>: Undefined index: properties in <b>/var/www/html/wp-includes/rest-api/fields/class-wp-rest-meta-fields.php</b> on line <b>578</b><br />
<br />
<b>Warning</b>: Invalid argument supplied for foreach() in <b>/var/www/html/wp-includes/rest-api/fields/class-wp-rest-meta-fields.php</b> on line <b>578</b><br />
<br />
<b>Notice</b>: Undefined index: properties in <b>/var/www/html/wp-includes/rest-api/fields/class-wp-rest-meta-fields.php</b> on line <b>578</b><br />
<br />
<b>Warning</b>: Invalid argument supplied for foreach() in <b>/var/www/html/wp-includes/rest-api/fields/class-wp-rest-meta-fields.php</b> on line <b>578</b><br />
<br />
<b>Notice</b>: Undefined index: properties in <b>/var/www/html/wp-includes/rest-api/fields/class-wp-rest-meta-fields.php</b> on line <b>578</b><br />
<br />
<b>Warning</b>: Invalid argument supplied for foreach() in <b>/var/www/html/wp-includes/rest-api/fields/class-wp-rest-meta-fields.php</b> on line <b>578</b><br />
<br />
<b>Notice</b>: Undefined index: properties in <b>/var/www/html/wp-includes/rest-api/fields/class-wp-rest-meta-fields.php</b> on line <b>578</b><br />
<br />
<b>Warning</b>: Invalid argument supplied for foreach() in <b>/var/www/html/wp-includes/rest-api/fields/class-wp-rest-meta-fields.php</b> on line <b>578</b><br />
<br />
<b>Notice</b>: Undefined index: properties in <b>/var/www/html/wp-includes/rest-api/fields/class-wp-rest-meta-fields.php</b> on line <b>578</b><br />
<br />
<b>Warning</b>: Invalid argument supplied for foreach() in <b>/var/www/html/wp-includes/rest-api/fields/class-wp-rest-meta-fields.php</b> on line <b>578</b><br />
<br />
<b>Notice</b>: Undefined index: properties in <b>/var/www/html/wp-includes/rest-api/fields/class-wp-rest-meta-fields.php</b> on line <b>578</b><br />
<br />
<b>Warning</b>: Invalid argument supplied for foreach() in <b>/var/www/html/wp-includes/rest-api/fields/class-wp-rest-meta-fields.php</b> on line <b>578</b><br />