-
Notifications
You must be signed in to change notification settings - Fork 0
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
Support for WordPress 5.0 and Gutenberg - the new editor #58
Comments
With Gutenberg 4.5.1 in I reconciled the plugin versions and determined that the problem appears to be related to Yoast SEO. When Yoast SEO is deactivated then oik-shortcodes can be reactivated. The problem has been confirmed to exist with both v8.4 and v9.2.1. I tracked the problem down to WordPress/gutenberg#8984 which was developed to fix WordPress/gutenberg#7268. The workaround would appear to be to delete this line from oik-shortcodes.php
and to change the priority of what was the replacement filter ( from default ( 10 ) to 9 )
So it's not really WordPress SEO that's to blame. But if it weren't for WordPress SEO I wouldn't have developed my solution for oik-shortcodes, which subsequently led to the Gutenberg excerpt hack revealing its limitations. |
In oik-plugins.co.uk, after having updated I didn't get a screen capture of the log, but basically nothing worked. |
I've also reproduced the problem locally, in |
The problem is associated with the logic that attempts to generate the programmed example or snippets for a shortcode. This is being executed when the post is being passed through the 'the_content' filter when the post is first opened for editing. Proposed solutionDo not execute the logic when inside the block editor. We might be able to check $current_screen->is_block_editor() at an early stage and avoid doing a lot of unnecessary things. E.g. Disable processing in The fix also requires changes to be applied in the oik base plugin... where the [bw_code] shortcode already exists in the content. In Remember, the problem does not occur when Gutenberg is activated! |
The CPTs registered by oik-shortcodes are not compatible with Gutenberg since they are not REST API enabled. To allow the content to be edited using the block editor we need to add
show_in_rest => true
to the post type registration.There are other issues:
The _oik_sc_func field is currently a noderef that produces an enormous select list. We should change the field to make it a user entered string / ID See Rebuilding a component invalidates the oik_shortcodes function reference #52
Since Gutenberg uses the REST API it expands the content during initial editing. This has been shown to produce problems for the
oik_shortcodes
CPT. See Support for WordPress 5.0 and the new editor - Gutenberg oik#97 (comment)The text was updated successfully, but these errors were encountered: