Daniel Richards
Forum Replies Created
-
Forum: Plugins
In reply to: [Gutenberg] The editor has encountered an unexpected error in GutentorThis error is slightly different to the others I’ve seen, but just to let you know Gutenberg 21.1.1 has been released and may fix your problem.
Forum: Plugins
In reply to: [Gutenberg] 21.1.0 editor errorThere’s now a Gutenberg v21.1.1 release that you can update to and it should resolve the issue.
Let me know via a reply if you still have any problems!
Forum: Plugins
In reply to: [Gutenberg] Gutenberg error reportedThere’s now a Gutenberg v21.1.1 release that you can update to and it should resolve the issue.
Let me know via a reply if you still have any problems!
Forum: Plugins
In reply to: [Gutenberg] Unexpected error after updating to 21.1.0There’s now a Gutenberg v21.1.1 release that you can update to and it should resolve the issue.
Let me know via a reply if you still have any problems!
Forum: Fixing WordPress
In reply to: WordPress Shaking While in Edit ModeI haven’t experienced myself, but it was mentioned to me that this was resolved after updating the Grammarly browser extension to the latest version.
Is anyone able to confirm?Forum: Alpha/Beta/RC
In reply to: Synced patterns override – don’t display field when not filled in@thegirlinthecafe Sorry for the late reply. From what I understand, the button block should already behave like that, not showing in the frontend of your site when there’s no button text. The same is true when using a button in a pattern with overrides.
Forum: Plugins
In reply to: [Gutenberg] Fatal PHP error in v18.6.0@jetteroh Sorry for a slow reply. This should be fixed in the latest Gutenberg 18.7.1 release.
I think you’re using WordPress 6.4, and so you should know that the Gutenberg plugin will drop support for 6.4 in the not too distant future after WordPress 6.6 is released, so you may want to consider upgrading to 6.5 or 6.6.I found some more info on why this is happening here – https://core.trac.wordpress.org/ticket/58333
Forum: Developing with WordPress
In reply to: Outside Query LoopMaybe we’ll leave it there if this is how you reply to people trying to help you.
Good luck!
Forum: Developing with WordPress
In reply to: Outside Query LoopMy block uses context provided by Query Block: “queryId”, “query”, “queryContext”. None of this contains data I need. How do you get data stored in DB out of this objects?
I think you want to use the
postIdproperty from the block context.How you fetch the post data is different different depending on whether you’re writing JS or PHP. In PHP, you can use
get_post( $context[ 'postId' ] ).For the JS part, the way I’d recommend is
useEntityProp( 'postType', postType, property , postId ), which provides an API for both reading from and writing to the properties of a post. There’s an example here – https://github.com/WordPress/gutenberg/blob/trunk/packages/block-library/src/post-title/edit.js#L40I’d still recommend starting with
ServerSideRenderfor the JS part to make the learning curve easier. It’s often easier to get something working first, and then build on the initial concepts.Also I tried to research code and found some very strange stuff. I suspect that “wp-includes/blocks” folder contain wordpress blocks. But inside each block folder there are only .css files and block.json file.
The source code for blocks is in the gutenberg project, in the
packages/block-libraryfolder.Forum: Developing with WordPress
In reply to: Enforcing default block in block directory searchI found a ticket that seems to match your situation – https://meta.trac.wordpress.org/ticket/6735.
I also found this ticket –
https://meta.trac.wordpress.org/ticket/6465The attached patch suggests that the
parent/ancestorproperties are used to determine the top-level block, and only a top-level block should be displayed. If a block references a parent that’s not within the plugin then it should also be considered top-level.I’d suggest commenting on the tickets mentioning your issue. Hopefully it’ll help track down why it’s not working.
Forum: Developing with WordPress
In reply to: Enforcing default block in block directory searchThe WordPress REST API seems to use the first block:
https://github.com/WordPress/wordpress-develop/blob/0276bfdd6d714810542866adf4325619b873db67/src/wp-includes/rest-api/endpoints/class-wp-rest-block-directory-controller.php#L124-L125I don’t know how the order of the blocks is defined though. It possibly matches the order that’s shown in your plugin’s description – https://wordpress.org/plugins/infinite-scroll-block/#description.
- This reply was modified 2 years, 7 months ago by Daniel Richards.
Forum: Developing with WordPress
In reply to: WooCommerce variation image issue@gavalian I’d suggest reaching out to WooCommerce’s own support.
The support here is for general WordPress problems, and doesn’t extend to issues with plugins.
How is your query block configured? Do you have “Inherit query from template” enabled for the block? If so, you may need to check the reading settings on your new site match the other version.
I don’t know why it’d display incorrectly in the editor compared to the frontend, though. That does sound unusual.
Forum: Developing with WordPress
In reply to: modify gutenberg sidebar component?I don’t think the excerpt component is something that supports being extended, but there are ways to add extend to the post panel:
https://developer.wordpress.org/block-editor/reference-guides/slotfills/PluginDocumentSettingPanelandPluginPostStatusInfoare probably the two closest points of extensibility.