Opened 6 years ago
Closed 6 years ago
#45057 closed defect (bug) (fixed)
Help notice displayed on Privacy Policy page missing in Gutenberg
Reported by: | garrett-eclipse | Owned by: | desrosj |
---|---|---|---|
Milestone: | 5.0 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Editor | Keywords: | has-patch fixed-5.0 |
Focuses: | privacy | Cc: |
Description
When a page is set to be the Privacy Policy page a help notice containing a link to the Privacy Policy guide is displayed in the editor.
When viewing this page in the Gutenberg editor the notice is missing leaving the only reference to the guide found in the Privacy Settings.
It would be nice to have this notice supported as part of 5.0.
Attachments (8)
Change History (28)
This ticket was mentioned in Slack in #core-privacy by garrett-eclipse. View the logs.
6 years ago
This ticket was mentioned in Slack in #core-editor by garrett-eclipse. View the logs.
6 years ago
#3
@
6 years ago
- Keywords needs-patch added
- Milestone changed from Awaiting Review to 5.0
https://github.com/WordPress/gutenberg/issues/10448#issuecomment-428521883
Here is a prototype of what should be done for this specific page.
- I just added a .is-warning notice with the text currently used in Classic Editor.
- Sorry, my WordPress instance was localized in fr_FR, but I guess it should be enough to see the desired result.
Technical issues that should be solved:
- We need to check if we are in the privacy policy page (the ID of the page is stored under wp_page_for_privacy_policy item in wp_option table) to append the notice.
- We need to get the URL of the privacy policy page to append it in the notice.
This ticket was mentioned in Slack in #core-privacy by garrett-eclipse. View the logs.
6 years ago
This ticket was mentioned in Slack in #core-editor by gziolo. View the logs.
6 years ago
This ticket was mentioned in Slack in #core-editor by desrosj. View the logs.
6 years ago
This ticket was mentioned in Slack in #core-privacy by desrosj. View the logs.
6 years ago
#8
@
6 years ago
- Owner set to desrosj
- Status changed from new to assigned
This notice is added using the edit_form_after_title
action hook. This hook does not exist in the new editor, and there is no alternative offered.
GB PR-11604 is aimed at consuming all notices output to the screen using the admin_notices
action hook (above the editor title in the classic editor).
The best way forward for fixing this is to move output of the help notice to the admin_notices
action hook when using the new editor and leave the legacy behavior for those using the classic editor (potentially in the classic editor plugin).
I opened GB PR-11999 for Gutenberg. After that is merged, it can be ported to core.
#9
@
6 years ago
- Keywords has-patch needs-testing added; needs-patch removed
45057.diff moves the notice to the admin_notices
hook.
Screen Shot 2018-11-16 at 10.12.34 PM.png is the result when testing with GB PR-11604 applied. That PR is still un-merged.
#10
@
6 years ago
Note that instead of if ( ! $post ) { $post = get_post(); }
you could just write $post = get_post( $post );
#11
@
6 years ago
This ticket was mentioned in Slack in #core-editor by desrosj. View the logs.
6 years ago
#13
@
6 years ago
- Keywords commit added; needs-testing removed
Tested 45057.3.diff, works as expected with the latest build of Gutenberg from GitHub.
The only thing I'd change is Default is null
to Default null
as per the coding standards.
#16
@
6 years ago
- Keywords fixed-5.0 added; commit removed
- Resolution fixed deleted
- Status changed from closed to reopened
#17
@
6 years ago
Just for reference, [43920] will need to be reversed in the Classic Editor plugin. I have an open pull request for that.
#18
follow-up:
↓ 19
@
6 years ago
Found a scenario where the notice displays incorrectly. When viewing pages in the admin, if the first post in the table is the privacy policy, the notice will display. 45057.4.diff fixes this.
Classic Editor w/ Privacy Policy notice