Closed milindmore22 closed 3 years ago
I see. It's because bbPress is adding the Quicktags to the forum reply form:
I can see the errors specifically when in legacy Reader mode:
The reason we're not detecting it coming from bbPress is that bbPress has a template tag bbp_the_content()
which is calling wp_editor()
. If I filter bbp_use_wp_editor
to be false
, then those unattributed validation errors go away.
Since the printing isn't happening via an action, there's no callback for us to wrap to detect who is responsible. And because wp_enqueue_script()
doesn't have any hooks inside of it, we can't use debug_backtrace()
to look up the call stack to discover the source either.
One option would be for us to add special condition to mark all scripts/styles added by wp_editor()
as being in dev mode so that they won't be removed, which would work since the form is only printed when a user is logged-in, unless this option is enabled:
This wouldn't necessary if in the loose sandboxing level, however.
Otherwise, the reality is that bbPress is not AMP-compatible. In legacy Reader mode, nothing is even printed in the legacy post template:
I'm trying to think of how we might special case calls to wp_editor()
for attribution.
I'm trying to think of how we might special case calls to
wp_editor()
for attribution.
I've added the special case in #6670.
QA Passed Didn't notice any validation errors pointing to WP Core.
Bug Description
As per comment https://github.com/ampproject/amp-wp/pull/6610#issuecomment-953006468 and https://github.com/ampproject/amp-wp/pull/6610#issuecomment-953169660
Rescanning the site show no errors however we do see errors in response pointing to the core, following is sample json
Here is full Pastebin of a response JSON
Expected Behaviour
Should point out the actual plugin causing the invalidations and not the core.
Screenshots
Errors on the bbpress forum topics
Errors expanded
PHP Version
7.4
Plugin Version
develop
AMP plugin template mode
Reader
WordPress Version
5.8
Site Health
Gutenberg Version
checked without gutenberg
OS(s) Affected
NA
Browser(s) Affected
NA
Device(s) Affected
NA
Acceptance Criteria
No response
Implementation Brief
No response
QA Testing Instructions
No response
Demo
No response
Changelog Entry
No response