Skip to content
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

Error in displaying after re-login #8892

Closed
tmatsuur opened this issue Aug 12, 2018 · 4 comments
Closed

Error in displaying after re-login #8892

tmatsuur opened this issue Aug 12, 2018 · 4 comments
Labels
[Feature] Offline Related to offline editing [Feature] Saving Related to saving functionality [Type] Bug An existing feature does not function as intended

Comments

@tmatsuur
Copy link

Session timeout while editing post.
After that, display the login form as a popup and login,
An error occurred when editing a new block.

The procedure is as follows.

1.Install WordPress 4.9.8. Then install and activate Gutenberg.

2.Added the following source code to functions.php of Twenty Seventeen.
function shorten_auth_cookie_expiration( $sec, $user_id, $remember ) { return 60; } add_filter( 'auth_cookie_expiration', 'shorten_auth_cookie_expiration', 10, 3 );

3.Log in to the admin page.

4.Click Posts > All Posts in the navigation.

5.Click 'Hello World!'.

6.Wait for the login form to pop up.

7.Enter your username and password to login.

8.Click the "Add block" area(Move the mouse pointer and the (+)mark is
displayed).

9.An error is displayed on the console.
GET http://local2/wp-json/wp/v2/types/wp_block?context=edit 403 (Forbidden) index.js?ver=1533789473:1 Uncaught (in promise) {code: "rest_cookie_invalid_nonce", message: "Cookie nonce is invalid", data: {…}}

OS: Windows 10
Browser: Chrome 68.0.3440.84, 68.0.3440.106
WordPress: 4.9.8
Gutenberg: 3.4.0, 3.5.0

@designsimply designsimply added [Type] Bug An existing feature does not function as intended Needs Testing Needs further testing to be confirmed. [Feature] Offline Related to offline editing labels Aug 14, 2018
@designsimply
Copy link
Member

@tmatsuur, to clarify, is the code you provided in step two required or does it just make it easier to see the problem happen by shortening the login timeout?

@tmatsuur
Copy link
Author

@designsimply sorry. It seems that the code did not break nicely and it became difficult to see.
As you pointed out, the code just shortens the login timeout.

@designsimply
Copy link
Member

Adding a screenshot and noting some console errors:

Error: Permission denied to access property "nodeType"
tinymce.min.js:2:285363
Error: Permission denied to access property "nodeType"
wp-tinymce.php:2:285363

screen shot 2018-08-23 at thu aug 23 10 34 24 am

Seen at http://alittletestblog.com/wp-admin/post.php?post=13999&action=edit running WordPress 4.9.8 and Gutenberg 3.6.2 using Firefox 61.0.2 on macOS 10.13.6.




Notes: This post had been left open for over a day, when I viewed the open tab again I saw a login form, after logging in I saw an "Updating failed" error and there are a few errors in the console that appear to be related to other plugins: "editor.getParam(...).join is not a function" and "newest-note-data" and I think the 'Permission denied to access property "nodeType"' errors may be relevant to this issue but I will run another test with the other plugins deactivated to make sure. I did not see the 403 error for the wp_block API call that you noted so I think that might be related to the forced timeout.

@designsimply designsimply added [Feature] Saving Related to saving functionality and removed Needs Testing Needs further testing to be confirmed. labels Nov 6, 2018
@youknowriad
Copy link
Contributor

I think this was fixed by a recent update to how nonces work cc @ellatrix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Offline Related to offline editing [Feature] Saving Related to saving functionality [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

3 participants