Hi, i am currently trying out your plugin on WP6.9 on Gutenberg Blocks. Errors are found as expected, but publishing is not prevented, which is the main purpose i need it for. Sadly, i was not able to find the issue, settings seem correct and errors found are declared as critical errors (red). Any idea why that could be ?
Edit: I found that when editing “Posts” the validation works as expected, locking publishing. However when editing in “Pages” and including custom content error validation does work, however locking does not. Is that intentional ? Can the locking feature be extended to the Pages ?
This topic was modified 2 weeks, 6 days ago by spacemonkey214.
The validation should be the same on pages, posts or any other post type. Can you give me more information on exactly what content you were using, what errors / warnings you were expecting or were being displayed that you feel was incorrect. I’d like to try and recreate this, as I am uaware of any current issues.
The validation itself seems correct. I am getting the expected a11y-figure and correct error description in the side bar as expected.
What confuses me is the “Publish prevention” if errors are present. When content is edited in a “Post” and errors are present saving the post is prevented correctly as expected. However when done through “Pages” the validation is still happening within the blocks, but saving the Page is still possible even with errors still being unresolved. Is that intentional ? I would have expected that when validation is possible in that view the prevention would also apply.
In particular i added an image to the page/post and left the alt-text empty which is being evaluated correctly as an error, so nothing fancy really. In both cases the image is not marked as decorative.
The observed effect is that with the same content in “Posts” the publish button has aria-disabled=”true” while errors remain, and in Pages it is aria-disabled=”false” no matter what.
If that is intentional, because pages could have all kinds of content, would it be possible to extend the plugin to behave in the way i would have expected ?
I can’t seem to recreate your issue. I setup a clean installation of 6.9 and activate the most recent version of the plugin, upload and image and add it to a new page and a new post. In both cases an error is thrown.
What other plugins are you using? And what theme are you using? I’d like to investigate a bit more, just in case there’s some sort of conflict.
thanks for your effort, i really appreciate it. I think i’ve found in the meantime what’s happening in my case. I’ve tried it on a fresh instance, only default plugins, except this one ofc, and a default Twenty-Twenty-Three theme.
Apparently, the page is correctly prevented from being published as long as “Show Template” is not selected. I don’t really understand why that is.
As you can see, the error is correctly shown as there is no alt-text. However, as you can see the page can be published here. That is because of the “Show template” selection here:
This might be my inexperience with wordpress speaking, but i am no longer sure if that is a bug, but either way it appears that the publish prevention can be circumvented that way.
Oooooh, now I get it. There is functionality in the plugin that allows you to work in the Site Editor without restrictions, as there are times when you want a placeholder image or an H1 in a template.
Seems like you’ve found a bug, the save should also be blocked when showing template, much like the icon is being displayed in this context.
Thanks for finding this one, I’m working on some new features and will log this issue and address it in the next release.