Trying to edit any page with a parent page assigned gives an error
Refresh again to see the page edit screen without errors.
Tested with TwentySeventeen with only Yoast SEO plugin
Firefox Console gives:
TypeError: "wp.api.models.Page is not a constructor"
subscribeToGutenberg http://192.168.1.3/wordpress-5/wp-content/plugins/wordpress-seo/js/dist/wp-seo-replacevar-plugin-921.min.js?ver=9.2.1:1:10490
n http://192.168.1.3/wordpress-5/wp-includes/js/dist/data.min.js?ver=4.0.1:1:10354
n http://192.168.1.3/wordpress-5/wp-includes/js/dist/data.min.js?ver=4.0.1:1:10325
subscribe http://192.168.1.3/wordpress-5/wp-includes/js/dist/data.min.js?ver=4.0.1:1:8324
b http://192.168.1.3/wordpress-5/wp-includes/js/dist/data.min.js?ver=4.0.1:1:19536
y http://192.168.1.3/wordpress-5/wp-includes/js/dist/data.min.js?ver=4.0.1:1:5320
v http://192.168.1.3/wordpress-5/wp-includes/js/dist/data.min.js?ver=4.0.1:1:5748
Hr http://192.168.1.3/wordpress-5/wp-includes/js/dist/vendor/lodash.min.js?ver=4.17.11:49:109
default http://192.168.1.3/wordpress-5/wp-includes/js/dist/editor.min.js?ver=9.0.4:12:40692
t http://192.168.1.3/wordpress-5/wp-includes/js/dist/editor.min.js?ver=9.0.4:12:28566
dispatch http://192.168.1.3/wordpress-5/wp-includes/js/dist/editor.min.js?ver=9.0.4:55:58442
default http://192.168.1.3/wordpress-5/wp-includes/js/dist/editor.min.js?ver=9.0.4:12:40685
t http://192.168.1.3/wordpress-5/wp-includes/js/dist/editor.min.js?ver=9.0.4:12:28566
dispatch http://192.168.1.3/wordpress-5/wp-includes/js/dist/editor.min.js?ver=9.0.4:55:58442
t http://192.168.1.3/wordpress-5/wp-includes/js/dist/editor.min.js?ver=9.0.4:12:28614
o http://192.168.1.3/wordpress-5/wp-includes/js/dist/data.min.js?ver=4.0.1:1:6127
value http://192.168.1.3/wordpress-5/wp-includes/js/dist/data.min.js?ver=4.0.1:1:14796
t http://192.168.1.3/wordpress-5/wp-includes/js/dist/editor.min.js?ver=9.0.4:55:292570
zf http://192.168.1.3/wordpress-5/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.6.3:69:258
Mf http://192.168.1.3/wordpress-5/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.6.3:87:4
ph http://192.168.1.3/wordpress-5/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.6.3:98:474
eg http://192.168.1.3/wordpress-5/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.6.3:125:307
fg http://192.168.1.3/wordpress-5/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.6.3:126:168
wc http://192.168.1.3/wordpress-5/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.6.3:138:237
fa http://192.168.1.3/wordpress-5/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.6.3:137:115
gg http://192.168.1.3/wordpress-5/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.6.3:135:196
Ca http://192.168.1.3/wordpress-5/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.6.3:133:365
enqueueSetState http://192.168.1.3/wordpress-5/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.6.3:191:324
setState http://192.168.1.3/wordpress-5/wp-includes/js/dist/vendor/react.min.js?ver=16.6.3:20:291
value http://192.168.1.3/wordpress-5/wp-includes/js/dist/data.min.js?ver=4.0.1:1:13979
n http://192.168.1.3/wordpress-5/wp-includes/js/dist/data.min.js?ver=4.0.1:1:10354
n http://192.168.1.3/wordpress-5/wp-includes/js/dist/data.min.js?ver=4.0.1:1:10325
subscribe http://192.168.1.3/wordpress-5/wp-includes/js/dist/data.min.js?ver=4.0.1:1:8324
b http://192.168.1.3/wordpress-5/wp-includes/js/dist/data.min.js?ver=4.0.1:1:19536
y http://192.168.1.3/wordpress-5/wp-includes/js/dist/data.min.js?ver=4.0.1:1:5320
v http://192.168.1.3/wordpress-5/wp-includes/js/dist/data.min.js?ver=4.0.1:1:5748
l http://192.168.1.3/wordpress-5/wp-includes/js/dist/redux-routine.min.js?ver=3.0.3:1:9095
dispatch http://192.168.1.3/wordpress-5/wp-includes/js/dist/data.min.js?ver=4.0.1:1:22001
a http://192.168.1.3/wordpress-5/wp-includes/js/dist/redux-routine.min.js?ver=3.0.3:1:8676
r http://192.168.1.3/wordpress-5/wp-includes/js/dist/redux-routine.min.js?ver=3.0.3:1:4477
r http://192.168.1.3/wordpress-5/wp-includes/js/dist/redux-routine.min.js?ver=3.0.3:1:4451
u http://192.168.1.3/wordpress-5/wp-includes/js/dist/redux-routine.min.js?ver=3.0.3:1:4406
j http://192.168.1.3/wordpress-5/wp-includes/js/dist/vendor/wp-polyfill.min.js?ver=7.0.0:2:29352
j http://192.168.1.3/wordpress-5/wp-includes/js/dist/vendor/wp-polyfill.min.js?ver=7.0.0:2:29220
f http://192.168.1.3/wordpress-5/wp-includes/js/dist/vendor/wp-polyfill.min.js?ver=7.0.0:1:20743
react-dom.min.js:104:245
Unhandled promise rejection TypeError: "wp.api.models.Page is not a constructor"
subscribeToGutenberg http://192.168.1.3/wordpress-5/wp-content/plugins/wordpress-seo/js/dist/wp-seo-replacevar-plugin-921.min.js?ver=9.2.1:1:10490
n http://192.168.1.3/wordpress-5/wp-includes/js/dist/data.min.js?ver=4.0.1:1:10354
n http://192.168.1.3/wordpress-5/wp-includes/js/dist/data.min.js?ver=4.0.1:1:10325
subscribe http://192.168.1.3/wordpress-5/wp-includes/js/dist/data.min.js?ver=4.0.1:1:8324
b http://192.168.1.3/wordpress-5/wp-includes/js/dist/data.min.js?ver=4.0.1:1:19536
y http://192.168.1.3/wordpress-5/wp-includes/js/dist/data.min.js?ver=4.0.1:1:5320
v http://192.168.1.3/wordpress-5/wp-includes/js/dist/data.min.js?ver=4.0.1:1:5748
Hr http://192.168.1.3/wordpress-5/wp-includes/js/dist/vendor/lodash.min.js?ver=4.17.11:49:109
default http://192.168.1.3/wordpress-5/wp-includes/js/dist/editor.min.js?ver=9.0.4:12:40692
t http://192.168.1.3/wordpress-5/wp-includes/js/dist/editor.min.js?ver=9.0.4:12:28566
dispatch http://192.168.1.3/wordpress-5/wp-includes/js/dist/editor.min.js?ver=9.0.4:55:58442
default http://192.168.1.3/wordpress-5/wp-includes/js/dist/editor.min.js?ver=9.0.4:12:40685
t http://192.168.1.3/wordpress-5/wp-includes/js/dist/editor.min.js?ver=9.0.4:12:28566
dispatch http://192.168.1.3/wordpress-5/wp-includes/js/dist/editor.min.js?ver=9.0.4:55:58442
t http://192.168.1.3/wordpress-5/wp-includes/js/dist/editor.min.js?ver=9.0.4:12:28614
o http://192.168.1.3/wordpress-5/wp-includes/js/dist/data.min.js?ver=4.0.1:1:6127
value http://192.168.1.3/wordpress-5/wp-includes/js/dist/data.min.js?ver=4.0.1:1:14796
t http://192.168.1.3/wordpress-5/wp-includes/js/dist/editor.min.js?ver=9.0.4:55:292570
zf http://192.168.1.3/wordpress-5/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.6.3:69:258
Mf http://192.168.1.3/wordpress-5/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.6.3:87:4
ph http://192.168.1.3/wordpress-5/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.6.3:98:474
eg http://192.168.1.3/wordpress-5/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.6.3:125:307
fg http://192.168.1.3/wordpress-5/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.6.3:126:168
wc http://192.168.1.3/wordpress-5/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.6.3:138:237
fa http://192.168.1.3/wordpress-5/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.6.3:137:115
gg http://192.168.1.3/wordpress-5/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.6.3:135:196
Ca http://192.168.1.3/wordpress-5/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.6.3:133:365
enqueueSetState http://192.168.1.3/wordpress-5/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.6.3:191:324
setState http://192.168.1.3/wordpress-5/wp-includes/js/dist/vendor/react.min.js?ver=16.6.3:20:291
value http://192.168.1.3/wordpress-5/wp-includes/js/dist/data.min.js?ver=4.0.1:1:13979
n http://192.168.1.3/wordpress-5/wp-includes/js/dist/data.min.js?ver=4.0.1:1:10354
n http://192.168.1.3/wordpress-5/wp-includes/js/dist/data.min.js?ver=4.0.1:1:10325
subscribe http://192.168.1.3/wordpress-5/wp-includes/js/dist/data.min.js?ver=4.0.1:1:8324
b http://192.168.1.3/wordpress-5/wp-includes/js/dist/data.min.js?ver=4.0.1:1:19536
y http://192.168.1.3/wordpress-5/wp-includes/js/dist/data.min.js?ver=4.0.1:1:5320
v http://192.168.1.3/wordpress-5/wp-includes/js/dist/data.min.js?ver=4.0.1:1:5748
l http://192.168.1.3/wordpress-5/wp-includes/js/dist/redux-routine.min.js?ver=3.0.3:1:9095
dispatch http://192.168.1.3/wordpress-5/wp-includes/js/dist/data.min.js?ver=4.0.1:1:22001
a http://192.168.1.3/wordpress-5/wp-includes/js/dist/redux-routine.min.js?ver=3.0.3:1:8676
r http://192.168.1.3/wordpress-5/wp-includes/js/dist/redux-routine.min.js?ver=3.0.3:1:4477
r http://192.168.1.3/wordpress-5/wp-includes/js/dist/redux-routine.min.js?ver=3.0.3:1:4451
u http://192.168.1.3/wordpress-5/wp-includes/js/dist/redux-routine.min.js?ver=3.0.3:1:4406
j http://192.168.1.3/wordpress-5/wp-includes/js/dist/vendor/wp-polyfill.min.js?ver=7.0.0:2:29352
j http://192.168.1.3/wordpress-5/wp-includes/js/dist/vendor/wp-polyfill.min.js?ver=7.0.0:2:29220
f http://192.168.1.3/wordpress-5/wp-includes/js/dist/vendor/wp-polyfill.min.js?ver=7.0.0:1:20743
wp-polyfill.min.js:2:29718
Expected to see edit page by clicking the page edit link seen under the page title.
Step 1. Create a new page enter a title and publish ( Page A )
Step 2. Create another page ( Page B ) and choose Page A as a parent page from page attributes. Publish the page.
Step 3. Goto page list screen in wp-admin. Click the edit link under Page B which gives the blank error. Refresh again and there is no error. Edit page displays correctly.
* If relevant, which editor is affected (or editors):
- [ ] Classic Editor
- [x] Gutenberg
- [ ] Classic Editor plugin
* Which browser is affected (or browsers):
- [x] Chrome
- [x] Firefox
- [x] Safari
- [ ] Other
Hi @mondrey
Thanks for reporting this issue!
I tried to reproduce this with Gutenberg 4.6.1 and could not reproduce it.
@benvaassen could reproduce this one-time only using the latest WordPress 5.0 RC build using FireFox.
a) After you received the blank page, does that return when you re-edit the page from the overview?
b) Is this something you can reproduce using Gutenberg 4.6.1 as well?
Hi @moorscode
a. Only reloading the page from browser reload displays the page correctly without errors.
First visit to edit link always gives the error.
Tried publishing again and editing. It's same white screen with error.
Always displays the error with the edit link ( only for pages with parents ) the first visit and refreshing displays the edit page correctly. No errors.
This doesn't happen to pages without parents set. The error is consistent from my side for both Gutenberg as plugin ( Gutenberg 4.6.1 and WordPress 4.9.8 ) and WordPress 5.0-RC3-43968
b. Yes. It's happening with Gutenberg 4.6.1 and WordPress 4.9.8 as well.
Tested with TwentySeventeen
Extra Info
========
Replicated with PHP 7.2.10, 7.1.22, 7.0.32, 5.6.37
Mac OSX 10.14.1
MySQL 5.7.2.3
Mamp Pro 5.2 (17558)
Caching module on Mamp Pro is switched off
Tried with Mamp Pro caching off, APC and OAPC to see if it's to do with caching.
Here's console error on Firefox 63.0.3 (64-bit)
Gutenberg plugin Gutenberg 4.6.1 with WordPress 4.9.8
TypeError: "wp.api.models.Page is not a constructor"
subscribeToGutenberg http://192.168.1.3/wordpress/blank/wp-content/plugins/wordpress-seo/js/dist/wp-seo-replacevar-plugin-910.min.js?ver=9.1:1:11127
n http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/build/data/index.js?ver=1544085721:1:8864
n http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/build/data/index.js?ver=1544085721:1:8835
subscribe http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/build/data/index.js?ver=1544085721:1:6834
v http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/build/data/index.js?ver=1544085721:1:22406
y http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/build/data/index.js?ver=1544085721:1:3830
v http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/build/data/index.js?ver=1544085721:1:4258
Hr http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/vendor/lodash.min.59550321.js:49:109
default http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/build/editor/index.js?ver=1544085721:50:18569
exports http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/build/editor/index.js?ver=1544085721:12:28565
dispatch http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/build/editor/index.js?ver=1544085721:50:72707
default http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/build/editor/index.js?ver=1544085721:50:18562
exports http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/build/editor/index.js?ver=1544085721:12:28565
dispatch http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/build/editor/index.js?ver=1544085721:50:72707
exports http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/build/editor/index.js?ver=1544085721:12:28613
o http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/build/data/index.js?ver=1544085721:1:4637
value http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/build/data/index.js?ver=1544085721:1:13306
t http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/build/editor/index.js?ver=1544085721:50:306836
zf http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/vendor/react-dom.min.713f0afa.js:69:258
Mf http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/vendor/react-dom.min.713f0afa.js:87:4
ph http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/vendor/react-dom.min.713f0afa.js:98:474
eg http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/vendor/react-dom.min.713f0afa.js:125:307
fg http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/vendor/react-dom.min.713f0afa.js:126:168
wc http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/vendor/react-dom.min.713f0afa.js:138:237
fa http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/vendor/react-dom.min.713f0afa.js:137:115
gg http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/vendor/react-dom.min.713f0afa.js:135:196
Ca http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/vendor/react-dom.min.713f0afa.js:133:365
enqueueSetState http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/vendor/react-dom.min.713f0afa.js:191:324
setState http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/vendor/react.min.1b974caa.js:20:291
value http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/build/data/index.js?ver=1544085721:1:12489
n http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/build/data/index.js?ver=1544085721:1:8864
n http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/build/data/index.js?ver=1544085721:1:8835
subscribe http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/build/data/index.js?ver=1544085721:1:6834
v http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/build/data/index.js?ver=1544085721:1:22406
y http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/build/data/index.js?ver=1544085721:1:3830
v http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/build/data/index.js?ver=1544085721:1:4258
l http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/build/redux-routine/index.js?ver=1544085721:1:3811
dispatch http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/build/data/index.js?ver=1544085721:1:24964
a http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/build/redux-routine/index.js?ver=1544085721:1:3392
r http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/build/redux-routine/index.js?ver=1544085721:1:7963
r http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/build/redux-routine/index.js?ver=1544085721:1:7937
u http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/build/redux-routine/index.js?ver=1544085721:1:7892
j http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/vendor/wp-polyfill.min.2ae96136.js:2:29352
j http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/vendor/wp-polyfill.min.2ae96136.js:2:29220
f http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/vendor/wp-polyfill.min.2ae96136.js:1:20743
react-dom.min.713f0afa.js:104:245
Unhandled promise rejection TypeError: "wp.api.models.Page is not a constructor"
subscribeToGutenberg http://192.168.1.3/wordpress/blank/wp-content/plugins/wordpress-seo/js/dist/wp-seo-replacevar-plugin-910.min.js?ver=9.1:1:11127
n http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/build/data/index.js?ver=1544085721:1:8864
n http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/build/data/index.js?ver=1544085721:1:8835
subscribe http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/build/data/index.js?ver=1544085721:1:6834
v http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/build/data/index.js?ver=1544085721:1:22406
y http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/build/data/index.js?ver=1544085721:1:3830
v http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/build/data/index.js?ver=1544085721:1:4258
Hr http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/vendor/lodash.min.59550321.js:49:109
default http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/build/editor/index.js?ver=1544085721:50:18569
exports http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/build/editor/index.js?ver=1544085721:12:28565
dispatch http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/build/editor/index.js?ver=1544085721:50:72707
default http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/build/editor/index.js?ver=1544085721:50:18562
exports http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/build/editor/index.js?ver=1544085721:12:28565
dispatch http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/build/editor/index.js?ver=1544085721:50:72707
exports http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/build/editor/index.js?ver=1544085721:12:28613
o http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/build/data/index.js?ver=1544085721:1:4637
value http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/build/data/index.js?ver=1544085721:1:13306
t http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/build/editor/index.js?ver=1544085721:50:306836
zf http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/vendor/react-dom.min.713f0afa.js:69:258
Mf http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/vendor/react-dom.min.713f0afa.js:87:4
ph http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/vendor/react-dom.min.713f0afa.js:98:474
eg http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/vendor/react-dom.min.713f0afa.js:125:307
fg http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/vendor/react-dom.min.713f0afa.js:126:168
wc http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/vendor/react-dom.min.713f0afa.js:138:237
fa http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/vendor/react-dom.min.713f0afa.js:137:115
gg http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/vendor/react-dom.min.713f0afa.js:135:196
Ca http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/vendor/react-dom.min.713f0afa.js:133:365
enqueueSetState http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/vendor/react-dom.min.713f0afa.js:191:324
setState http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/vendor/react.min.1b974caa.js:20:291
value http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/build/data/index.js?ver=1544085721:1:12489
n http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/build/data/index.js?ver=1544085721:1:8864
n http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/build/data/index.js?ver=1544085721:1:8835
subscribe http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/build/data/index.js?ver=1544085721:1:6834
v http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/build/data/index.js?ver=1544085721:1:22406
y http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/build/data/index.js?ver=1544085721:1:3830
v http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/build/data/index.js?ver=1544085721:1:4258
l http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/build/redux-routine/index.js?ver=1544085721:1:3811
dispatch http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/build/data/index.js?ver=1544085721:1:24964
a http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/build/redux-routine/index.js?ver=1544085721:1:3392
r http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/build/redux-routine/index.js?ver=1544085721:1:7963
r http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/build/redux-routine/index.js?ver=1544085721:1:7937
u http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/build/redux-routine/index.js?ver=1544085721:1:7892
j http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/vendor/wp-polyfill.min.2ae96136.js:2:29352
j http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/vendor/wp-polyfill.min.2ae96136.js:2:29220
f http://192.168.1.3/wordpress/blank/wp-content/plugins/gutenberg/vendor/wp-polyfill.min.2ae96136.js:1:20743
wp-polyfill.min.2ae96136.js:2:29718
Hi @moorscode
I found progress in narrowing down specific to the error.
This only happens when a new tab is opened from the edit link under the title in wp-admin page list.
a. If i press the edit link then it loads without any problem. Right click and new tab from browser context menu gives the white page error in the new tab.
Reloading that page resolves the error and page editor loads successfully. Thereon the error does not happen upon updates or reloads.
b. Same error if the url is copy pasted to a new tab.
Tried it with Chrome, Safari and Firefox. Same error and method to generate from my side.
Thanks
I tested with WordPress 5.0-RC3-43967 and Yoast SEO 9.2.1 using Firefox 63.0.3 on macOS 10.13.6 and I was able to open child pages normally. (1m17s)
My only active plugins are Akismet and WordPress Beta Tester.
This only happens when a new tab is opened from the edit link under the title in wp-admin page list.
a. Right click and new tab from browser context menu gives the white page error in the new tab.
b. Same error if the url is copy pasted to a new tab.
Are you certain of this or is it possible the error is truly random?
@mondrey I noticed in the 2nd line of the console error it says:
Because it has ver=9.1 at the end, I wonder if you can double check whether you have updated to Yoast SEO version 9.2.1 or not. Would it be possible for you to uninstall and reinstall the plugin as a test? Also, may I ask for a list of your active plugins? I'm wondering if there's not an additional possible conflict in the mix.
@moorscode I noticed in the first line of the console error it says:
TypeError: "wp.api.models.Page is not a constructor" subscribeToGutenberg
I couldn't find anything about "wp.api.models.Page is not a constructor" in a search (except a basic error explanation), but I did notice that there are results for subscribeToGutenberg in wordpress-seo but not in gutenberg.
I'm not sure whether that's related! I did find mentions of both new wp.api.models.Page and subscribeToGutenberg in the wp-seo-replacevar-plugin.js file:
https://github.com/Yoast/wordpress-seo/blame/e7470a54ba90aeb69ffde9444f9adc36256e3ba5/js/src/wp-seo-replacevar-plugin.js#L161
Hi @designsimply
It still gives me the same error with official WordPress 5.0 and latest Yoast 9.2.1 on my localhost. I assume this is happening from my Mamp setup.
I had checked this from a hosted site and it loads great everytime on new tabs.
WordPress 5.0 and Yoast 9.2.1.
Will keep checking why this happening from my side and provide details when i find them.
@mondrey thank you for checking on the versions and adding notes about the problem only happening on a local install. That is helpful.
I also found that you reported the following at https://github.com/WordPress/gutenberg/issues/10124#issuecomment-444647502 which is noteworthy:
Editing any page with a parent page assigned gives a blank page.
Reloading displays it correctly without errors.
WordPress version: 5.0 RC3-43967
Yoast SEO version: 9.2.1
Theme: Twenty Seventeen Version: 1.8
This is happening for me as well.
1545347519020.log
1545347538221.log
See my logs above. Mine is not a local install and the issue goes away when Yoast is disabled.
@designsimply
Managed to trigger this on a different machine, OSX 10.11.6
MAMP Pro and got the same error.
I used an unminified /js/dist/wp-seo-replacevar-plugin-930.min.js and got the error at line 530
That's the section where it checks for the parent attribute. It goes until wp.api.models.Page triggering the error.
r.subscribe(function() {
var o = r.select("core/editor").getEditedPostAttribute("parent");
if (void 0 !== o && n !== o) {
if (n = o, o < 1) return t._currentParentPageTitle = "", void t.declareReloaded();
if (!(0, p.default)(e[o])) return t._currentParentPageTitle = e[o], void t.declareReloaded();
new wp.api.models.Page({
id: o
}).fetch().then(function(n) {
t._currentParentPageTitle = n.title.rendered, e[o] = t._currentParentPageTitle, t.declareReloaded()
}).fail(function() {
t._currentParentPageTitle = "", t.declareReloaded()
})
}
})
It looks like the wp.api.models.Page was being requested before the wp.api loaded.
I found that the following corrects it using wp.api.loadPromise.done function.
r.subscribe(function() {
var o = r.select("core/editor").getEditedPostAttribute("parent");
if (void 0 !== o && n !== o) {
if (n = o, o < 1) return t._currentParentPageTitle = "", void t.declareReloaded();
if (!(0, p.default)(e[o])) return t._currentParentPageTitle = e[o], void t.declareReloaded();
wp.api.loadPromise.done( function() {
new wp.api.models.Page({
id: o
}).fetch().then(function(n) {
t._currentParentPageTitle = n.title.rendered, e[o] = t._currentParentPageTitle, t.declareReloaded()
}).fail(function() {
t._currentParentPageTitle = "", t.declareReloaded()
})
});
}
})
This displays the page correctly ( Editing child page to a new tab ). No Errors.
Also tested with console.log(o); after loadPromise and got the parent page ID.
Hope this is a good solution to the problem.
Hi, I have this problem too. When I try to edit (without open a new tab) a page from the admin page list, it gives a blank page. I tried all pages and all blank. But when I deactivate Yoast SEO, the contents show. When I edit via elementor, it doesn't gives any blank page but yoast seo box does not show below page. I am using astra theme. I have no choice but to deactivate yoast now. Hope someone can help me with this. Thank you.
Is there any update to this being fixed? This is beyond annoying at this point, especially for someone working on a new site where this happens every single time I edit a page.
Hi!
I can edit child pages since the 9.5 release, but I'm still getting an error in the Console: "t.declareReloaded is not a function" (when editing a child page using Gutenberg).
Thanks,
Most helpful comment
@designsimply
Managed to trigger this on a different machine, OSX 10.11.6
MAMP Pro and got the same error.
I used an unminified /js/dist/wp-seo-replacevar-plugin-930.min.js and got the error at line 530
That's the section where it checks for the parent attribute. It goes until
wp.api.models.Pagetriggering the error.It looks like the
wp.api.models.Pagewas being requested before the wp.api loaded.I found that the following corrects it using
wp.api.loadPromise.donefunction.This displays the page correctly ( Editing child page to a new tab ). No Errors.
Also tested with
console.log(o);after loadPromise and got the parent page ID.Hope this is a good solution to the problem.