Project

General

Profile

Actions

Support #15833

closed

Block Editor Preview in Chrome

Added by scott voth about 2 years ago. Updated about 2 years ago.

Status:
Resolved
Priority name:
Normal
Assignee:
Category name:
Domain Mapping
Target version:
Start date:
2022-04-06
Due date:
% Done:

0%

Estimated time:
Deployment actions:

Description

Sissel McCarthy is having issues when she previews a draft written by another author in Chrome and Safari. (It works fine in Firefox.) She is an admin of newsliteracymatters.com (newsliteracymatters.commons.gc.cuny.edu). I am also an admin of the group, and the preview works for me fine in Chrome and Firefox. But she gets the "Ooops" page does not exists in both Chrome and Safari. She has cleared her cache. Could there be something on her laptop that's blocking the preview?

Also, sometimes the Preview icon just spins and nothing happens, with these messages in the console:

JQMIGRATE: Migrate is installed, version 3.3.2
admin-bar-v2.js?ver=10.7-202214-1.19.6:3 Missing data from PHP (wpNotesArgs).
(anonymous) admin-bar-v2.js?ver=10.7-202214-1.19.6:3
(anonymous)
admin-bar-v2.js?ver=10.7-202214-1.19.6:72
DevTools failed to load source map: Could not load content for https://newsliteracymatters.commons.gc.cuny.edu/wp-content/themes/hive/gutenberg.css.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
build.js?ver=5.9.2-1.19.6:17486 Download the Vue Devtools extension for a better development experience:
https://github.com/vuejs/vue-devtools
build.js?ver=5.9.2-1.19.6:17496 You are running Vue in development mode.
Make sure to turn on production mode when deploying for production.
See more tips at https://vuejs.org/guide/deployment.html
core-data.min.js:2 Uncaught (in promise) Error: The entity being edited (postType, undefined) does not have a loaded config.
at core-data.min.js:2:12885
at data.min.js:2:13579
at redux-routine.min.js:2:1797
at data.min.js:2:10824
at Object.dispatch (data.min.js:2:11136)
at Object.editEntityRecord (data.min.js:2:14301)
at data.min.js:2:10736
at redux-routine.min.js:2:1494
at redux-routine.min.js:2:9446
at Array.some (<anonymous>)
(anonymous) core-data.min.js:2
(anonymous)
data.min.js:2
(anonymous) redux-routine.min.js:2
(anonymous)
data.min.js:2
(anonymous) data.min.js:2
(anonymous)
data.min.js:2
(anonymous) data.min.js:2
(anonymous)
redux-routine.min.js:2
(anonymous) redux-routine.min.js:2
r
redux-routine.min.js:2
(anonymous) redux-routine.min.js:2
(anonymous)
redux-routine.min.js:2
(anonymous) redux-routine.min.js:2
r
redux-routine.min.js:2
(anonymous) redux-routine.min.js:2
c
redux-routine.min.js:2
t redux-routine.min.js:2
(anonymous)
redux-routine.min.js:2
(anonymous) redux-routine.min.js:2
(anonymous)
redux-routine.min.js:2
(anonymous) data.min.js:2
(anonymous)
data.min.js:2
(anonymous) data.min.js:2
(anonymous)
send-to-group.js?ver=5.9.2-1.19.6:19
e jquery.min.js:2
t
jquery.min.js:2
setTimeout (async)
(anonymous) jquery.min.js:2
c
jquery.min.js:2
fireWith jquery.min.js:2
fire
jquery.min.js:2
c jquery.min.js:2
fireWith
jquery.min.js:2
ready jquery.min.js:2
B
jquery.min.js:2
public-api.wordpress.com/:16 WebSocket connection to 'wss://public-api.wordpress.com/pinghub/wpcom/me/newest-note-data' failed:
v public-api.wordpress.com/:16
_
public-api.wordpress.com/:16
D public-api.wordpress.com/:16
blocks.min.js:2 Updated Block: core/spacer
blocks.min.js:2 Updated Block: core/spacer
blocks.min.js:2 Updated Block: core/spacer
blocks.min.js:2 Updated Block: core/cover
blocks.min.js:2 Updated Block: core/button
blocks.min.js:2 Updated Block: core/cover
blocks.min.js:2 Updated Block: core/cover
blocks.min.js:2 Updated Block: core/spacer
blocks.min.js:2 Updated Block: core/spacer
blocks.min.js:2 Updated Block: core/spacer
blocks.min.js:2 Updated Block: core/spacer
blocks.min.js:2 Updated Block: core/spacer
blocks.min.js:2 Updated Block: core/gallery
blocks.min.js:2 Updated Block: core/spacer
blocks.min.js:2 Updated Block: core/spacer
blocks.min.js:2 Updated Block: core/spacer
blocks.min.js:2 Updated Block: core/spacer
blocks.min.js:2 Updated Block: core/cover
blocks.min.js:2 Updated Block: core/spacer
blocks.min.js:2 Updated Block: core/spacer
DevTools failed to load source map: Could not load content for https://newsliteracymatters.commons.gc.cuny.edu/bp-members/js/blocks/members.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for https://newsliteracymatters.commons.gc.cuny.edu/block-data.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for https://newsliteracymatters.commons.gc.cuny.edu/block-components.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for https://newsliteracymatters.commons.gc.cuny.edu/bp-members/js/blocks/member.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for https://newsliteracymatters.commons.gc.cuny.edu/bp-core/js/blocks/login-form.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for https://newsliteracymatters.commons.gc.cuny.edu/bp-members/js/blocks/dynamic-members.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for https://newsliteracymatters.commons.gc.cuny.edu/bp-members/js/blocks/active-members.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for https://newsliteracymatters.commons.gc.cuny.edu/bp-members/js/blocks/online-members.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for https://newsliteracymatters.commons.gc.cuny.edu/bp-activity/js/blocks/embed-activity.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for https://newsliteracymatters.commons.gc.cuny.edu/bp-blogs/js/blocks/recent-posts.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for https://newsliteracymatters.commons.gc.cuny.edu/bp-friends/js/blocks/friends.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for https://newsliteracymatters.commons.gc.cuny.edu/bp-activity/js/blocks/latest-activities.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for https://newsliteracymatters.commons.gc.cuny.edu/bp-groups/js/blocks/group.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for https://newsliteracymatters.commons.gc.cuny.edu/bp-groups/js/blocks/groups.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for https://newsliteracymatters.commons.gc.cuny.edu/bp-messages/js/blocks/sitewide-notices.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for https://newsliteracymatters.commons.gc.cuny.edu/bp-groups/js/blocks/dynamic-groups.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
public-api.wordpress.com/:16 WebSocket connection to 'wss://public-api.wordpress.com/pinghub/wpcom/me/newest-note-data' failed:
v
?v=2.0:16
_ ?v=2.0:16
D
?v=2.0:16
edit-post.min.js:2 Uncaught (in promise) TypeError: Failed to construct 'FormData': parameter 1 is not of type 'HTMLFormElement'.
at R (edit-post.min.js:2:15104)
at R.next (<anonymous>)
at redux-routine.min.js:2:9334
at redux-routine.min.js:2:1525
at redux-routine.min.js:2:9446
at Array.some (<anonymous>)
at r (redux-routine.min.js:2:9421)
at redux-routine.min.js:2:9374
at e.any (redux-routine.min.js:2:6516)
at redux-routine.min.js:2:9446


Files

sissel.mov (35.8 MB) sissel.mov scott voth, 2022-04-06 01:30 PM

Related issues

Related to CUNY Academic Commons - Bug #13947: Elementor plugin problemResolvedRaymond Hoh2021-02-05

Actions
Actions #1

Updated by Boone Gorges about 2 years ago

  • Status changed from New to Reporter Feedback

Can you please provide more step-by-step instructions on how to reproduce? Please give a URL if possible, and let me know what I should be clicking. If possible, consider providing a screencast that demonstrates the problem, or at least a screenshot that shows the "Oops" error - I'm not familiar with it.

Actions #2

Updated by scott voth about 2 years ago

Here is a video of what she is encountering - this looks like is Safari. It seems like she gets logged out and sent to newliteracymatters.com. As I said before, this works for me in all browsers.

Actions #3

Updated by Boone Gorges about 2 years ago

Yes, this appears to be related to login cookies. Previews are only accessible to logged-in users with the correct permissions; logged-out visitors see the 404 page ("oops") when attempting to view a preview. The user's screencast indicates that they're using the Dashboard at https://newsliteracymatters.commons.gc.cuny.edu, which means that the user definitely has the proper authentication cookies for *.commons.gc.cuny.edu. When clicking 'Preview in a new tab', the browser redirects to the canonical newsliteracymatters.com URL. But it appears that the user is not logged in at newsliteracymatters.com in that browser. Thus the 404.

The simple solution is to ensure that all editing and curating is done at https://newsliteracymatters.com/wp-admin, not newsliteracymatters.commons.gc.cuny.edu. This will ensure that the proper auth cookies are set. This is probably also why you and the user are seeing the problem only occasionally - it's likely that in most cases you're viewing the mapped domain.

I've CCed our domain-mapping guru, Ray, to see if he has any further suggestions or analysis. Should we, for example, redirect all wp-admin traffic to the mapped domain? Or, perhaps, can we set the auth cookies for the mapped domain in the background when you visit *.commons.gc.cuny.edu/wp-admin (not sure if this is technically feasible)?

Actions #4

Updated by Raymond Hoh about 2 years ago

  • Assignee changed from Boone Gorges to Raymond Hoh

In #13947, we had to do something similar for the Elementor editor by ensuring the preview URL used the unmapped domain. I'll try to see if that is doable for the general block editor.

Actions #5

Updated by Raymond Hoh about 2 years ago

  • Related to Bug #13947: Elementor plugin problem added
Actions #6

Updated by Raymond Hoh about 2 years ago

I've put in a fix on production so that preview post URLs will not get redirected to the mapped domain.

I tested on the newsliteracymatters site and that appears to work for me. Can someone confirm that the preview post URL is working before I commit the fix?

Actions #7

Updated by scott voth about 2 years ago

I have asked Sissel to test it out. Will let you know. Thanks Ray!

Actions #8

Updated by scott voth about 2 years ago

Hi Ray - Sissel say it is working for her now. Thanks Ray!

Actions #9

Updated by Raymond Hoh about 2 years ago

  • Category name changed from WordPress (misc) to Domain Mapping
  • Status changed from Reporter Feedback to Resolved
  • Target version set to 1.19.7
Actions

Also available in: Atom PDF