#53397 closed task (blessed) (fixed)
Update the WordPress Packages with the Gutenberg fixes during the 5.8 beta/RC lifecycle
Reported by: | youknowriad | Owned by: | desrosj |
---|---|---|---|
Milestone: | 5.8 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Editor | Keywords: | has-patch has-unit-tests dev-reviewed commit |
Focuses: | Cc: |
Description
Just a ticket to trac the weekly package update backports. These backports will only included fixes to the features shipped in 5.8.
Change History (86)
This ticket was mentioned in PR #1367 on WordPress/wordpress-develop by youknowriad.
3 years ago
#1
- Keywords has-patch added
jorgefilipecosta commented on PR #1367:
3 years ago
#2
The theme.json backport is available at https://github.com/WordPress/wordpress-develop/pull/1368. (I was not able to write to this branch)
noisysocks commented on PR #1367:
3 years ago
#3
Pushed the widgets stuff!
3 years ago
#4
skip-link fix is on https://github.com/WordPress/wordpress-develop/pull/1357
youknowriad commented on PR #1367:
3 years ago
#5
Thanks folks, I'm going to include everything on this PR to do a single commit.
youknowriad commented on PR #1367:
3 years ago
#7
committed in https://core.trac.wordpress.org/changeset/51149
#9
@
3 years ago
- Resolution set to fixed
- Status changed from new to closed
I believe this is now resolved. If that's not the case, feel free to reopen!
#10
@
3 years ago
@desrosj To avoid creating a ticket for each beta release, I wanted to keep this one open during the lifecycle and close by RC1? Is that possible?
This ticket was mentioned in PR #1408 on WordPress/wordpress-develop by jorgefilipecosta.
3 years ago
#11
Trac ticket: core.trac.wordpress.org/ticket/53397
### PHP Backports
Enable the block templates (editor mode) for themes with theme.json by default. (already included)
Widget editor related changes cc @noisysocks
Theme.json related changes cc: @nosolosw
### Updated packages
@wordpress/block-directory: 2.1.8 -> 2.1.9
@wordpress/block-editor: 6.1.4 -> 6.1.5
@wordpress/block-library: 3.2.7 -> 3.2.8
@wordpress/components: 14.1.3 -> 14.1.4
@wordpress/customize-widgets: 1.0.7 -> 1.0.8
@wordpress/edit-post: 4.1.8 -> 4.1.9
@wordpress/edit-widgets: 2.1.8 -> 2.1.9
@wordpress/editor: 10.1.7 -> 10.1.8
@wordpress/format-library: 2.1.4 -> 2.1.5
@wordpress/interface: 3.1.3 -> 3.1.4
@wordpress/list-reusable-blocks: 2.1.3 -> 2.1.4
@wordpress/nux: 4.1.3 -> 4.1.4
@wordpress/reusable-blocks: 2.1.7 -> 2.1.8
@wordpress/server-side-render: 2.1.4 -> 2.1.5
@wordpress/widgets: 1.1.7 -> 1.1.8
noisysocks commented on PR #1408:
3 years ago
#12
None of the widget related PHP changes in the diff need to be moved over as they're already in core.
3 years ago
#13
PR for theme.json
changes at https://github.com/WordPress/wordpress-develop/pull/1411
I've noticed that https://github.com/WordPress/gutenberg/pull/32627 hadn't been ported to core yet, although https://github.com/WordPress/gutenberg/pull/32848 already had those changes (everything looks fine in gutenberg's wp/trunk
). I've went ahead and included those changes as well.
jorgefilipecosta commented on PR #1408:
3 years ago
#16
This ticket was mentioned in PR #1429 on WordPress/wordpress-develop by youknowriad.
3 years ago
#19
This includes the fixes in this PR https://github.com/WordPress/gutenberg/pull/32956
- [ ] Update patterns to remove the "main" element. @ryelle should we include this in this PR/commit or separately.
- [ ] Update the webpack config to load the "view" script for the File block. @gziolo I believe you have a dedicated PR/ticket for this.
Trac ticket https://core.trac.wordpress.org/ticket/53397
3 years ago
#20
I'm not totally sure if there's a process for it, but if other non-JS changes are happening here, I think it the pattern change can be included.
youknowriad commented on PR #1429:
3 years ago
#21
Looks like I messed up, I'll recreate the PR on my fork.
@ryelle I think there's no real defined process. In general, for php changes, if these are independent of the JS ones (packages updates), it's fine to do a separate commit but I know that sometimes we just do everything at once for simplicity.
This ticket was mentioned in PR #1430 on WordPress/wordpress-develop by youknowriad.
3 years ago
#22
This includes the fixes in this PR https://github.com/WordPress/gutenberg/pull/32956
- [ ] Update patterns to remove the "main" element. @ryelle
- [ ] Update the webpack config to load the "view" script for the File block. @gziolo
Trac ticket https://core.trac.wordpress.org/ticket/53397
3 years ago
#23
Update the webpack config to load the "view" script for the File block. @gziolo
I have a patch ready in the Gutenberg plugin that will require publishing to npm.
This ticket was mentioned in PR #1442 on WordPress/wordpress-develop by youknowriad.
3 years ago
#26
This includes the fixes in this PR https://github.com/WordPress/gutenberg/pull/33036
Trac ticket https://core.trac.wordpress.org/ticket/53397
This ticket was mentioned in PR #1412 on WordPress/wordpress-develop by gziolo.
3 years ago
#28
- Keywords has-unit-tests added
Trac ticket: https://core.trac.wordpress.org/ticket/53397
The idea here is to split the growing webpack config into two parts:
- blocks
- packages
We need to add handling for JavaScript files that are going to be used with blocks on the frontend. They don't work quite well with the current setup for entry points created for packages because of reasons like
- the output path is different
- frontend scripts should not be exposed under
wp
globals
In general, it looks like the split is a good strategy because it nicely separates two independents parts: packages and blocks. There isn't that much overlap between configs anyway.
3 years ago
#29
I'm seeing the following notice locally:
Notice: register_block_script_handle was called incorrectly. The asset file for the "viewScript" defined in "core/file" block definition is missing. Please see Debugging in WordPress for more information. (This message was added in version 5.5.0.) in /var/www/src/wp-includes/functions.php on line 5535
Is this because an update to the file block needs to be published? Otherwise it seems to work well for me.
youknowriad commented on PR #1412:
3 years ago
#31
I did just notice that the Text link settings is really tall with this applied. It does not display this way before applying this PR and running the build script.
I'm pretty sure that's unrelated, I did get these tall selects sometimes (outside this PR) but we were not able to reproduce consistently yet. There are probably multiple factors involved there.
Notice: register_block_script_handle was called incorrectly. The asset file for the "viewScript" defined in "core/file" block definition is missing. Please see Debugging in WordPress for more information. (This message was added in version 5.5.0.) in /var/www/src/wp-includes/functions.php on line 5535
This is definitely related to this PR, I need to investigate it more, I wish @gziolo was around :)
youknowriad commented on PR #1412:
3 years ago
#32
I'm not able to see the notice, though it can be my docker config hiding it I don't know 🤔
youknowriad commented on PR #1412:
3 years ago
#33
After several tries, I'm still not able to reproduce the notice. Let's continue monitor this.
youknowriad commented on PR #1412:
3 years ago
#35
committed in https://core.trac.wordpress.org/changeset/51259
This ticket was mentioned in PR #1446 on WordPress/wordpress-develop by youknowriad.
3 years ago
#36
#39
@
3 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
Reopening this for tracking and to call more attention to a notice that [51259] introduced:
Notice: register_block_script_handle was called <strong>incorrectly</strong>. The asset file for the "viewScript" defined in "core/file" block definition is missing. Please see <a href="https://wordpress.org/support/article/debugging-in-wordpress/">Debugging in WordPress</a> for more information. (This message was added in version 5.5.0.) in /var/www/src/wp-includes/functions.php on line 5535
@youknowriad was unable to reproduce this, but I'm seeing it locally. It's also output in the GitHub Actions test workflows.
This ticket was mentioned in Slack in #core by desrosj. View the logs.
3 years ago
This ticket was mentioned in Slack in #hosting-community by ipstenu. View the logs.
3 years ago
This ticket was mentioned in PR #1450 on WordPress/wordpress-develop by desrosj.
3 years ago
#43
Trac ticket: https://core.trac.wordpress.org/ticket/53397
#44
@
3 years ago
It looks like the notice is being caused by the fact that the viewScript
in the core/file
block is set to file:./view.min.js
. When register_script_handle()
is called, it checks that the file exists using realpath()
, but first replaces .js
within the $script_path
with .asset.php
(see here).
This causes realpath()
to return false because view.min.asset.php
does not exist.
It looks like this notice is causing many of the hosting tests to fail, so I'd like to fix this even if temporarily.
As I understand it, the right fix is to update the block-library
to point the core/file
block's viewScript
to the unminified version of the script. But we could also fix this in Core with (even if temporarily) by replacing .min.js
with .js
prior to running the $script_path
through realpath()
.
I've opened a PR that takes the latter route. Since viewScript
is brand new and only included for the core/file
block, I think this may be acceptable for the time being.
This ticket was mentioned in Slack in #core by desrosj. View the logs.
3 years ago
This ticket was mentioned in Slack in #core by desrosj. View the logs.
3 years ago
This ticket was mentioned in Slack in #core by jeffpaul. View the logs.
3 years ago
3 years ago
#50
Unfortunately this caused a PHP notice that I was unable to solve before it was time to package RC1, so I've had to revert it and the related commits.
#51
@
3 years ago
- Resolution set to fixed
- Status changed from reopened to closed
The fix in [51267] did not fully work, so I've had to revert the changes from [51259-51260,51265]. Will need to open up a new ticket to follow up on that change.
3 years ago
#55
I will give it another try after WordPress 5.8 is out 👍🏻
@desrosj and @youknowriad, thank you for all the help 🙇🏻
#57
@
3 years ago
- Keywords commit dev-reviewed added
- Resolution fixed deleted
- Status changed from closed to reopened
Reopening to backport [51344].
#58
@
3 years ago
- Owner set to desrosj
- Resolution set to fixed
- Status changed from reopened to closed
In 51346:
#59
@
3 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
Reopening for some last minute fixes.
#60
@
3 years ago
- Keywords dev-feedback added; commit dev-reviewed removed
@desrosj Final package updates are in these two PRs, are you able to do the dev review for commit and backport?
#61
@
3 years ago
- Keywords dev-reviewed commit added; dev-feedback removed
@peterwilsoncc The PRs look good to me.
#63
@
3 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
Reopening to backport [51362]
3 years ago
#65
Merged into Core in https://core.trac.wordpress.org/changeset/51267 but later reverted in https://core.trac.wordpress.org/changeset/51288 as there were still issues with the implementation.
This ticket was mentioned in PR #1494 on WordPress/wordpress-develop by youknowriad.
3 years ago
#66
This includes fixes from https://github.com/WordPress/gutenberg/pull/33354
Trac ticket https://core.trac.wordpress.org/ticket/53397
3 years ago
#68
Merged into Core in https://core.trac.wordpress.org/changeset/51421.
#70
@
3 years ago
Pull request for last minute updates pre-RC3 looks good to me for both trunk and 5.8 branches. https://github.com/WordPress/wordpress-develop/pull/1496
This ticket was mentioned in PR #1500 on WordPress/wordpress-develop by desrosj.
3 years ago
#73
Trac ticket: https://core.trac.wordpress.org/ticket/53397
youknowriad commented on PR #1500:
3 years ago
#74
The diff is looking good, I'll test it quickly and commit.
youknowriad commented on PR #1500:
3 years ago
#76
committed in https://core.trac.wordpress.org/changeset/51443
3 years ago
#78
I reopened this branch and rebased it with the latest changes from trunk
.
I can see the same notice you mentioned in the CI job that runs PHPUnit tests:
<img width="1497" alt="Screen Shot 2021-07-16 at 12 01 52" src="https://user-images.githubusercontent.com/699132/125930882-c46db678-320d-4c30-93ea-9d1cf839e5ef.png">
I will see how we can improve it since it's quite expected because the asset file is generated with a webpack build that doesn't run on CI before unit tests.
3 years ago
#79
Committing the asset files (and removing from .gitignore
resolves the issue, but it makes the limitation of the weback plugin hightlighted in https://github.com/WordPress/wordpress-develop/pull/1412#discussion_r656280149 more visible.
I still think that should be fine as the first step.
3 years ago
#80
@aristath and @youknowriad – do you think we should some automated handling for the view script? At the moment it's handled manually by the File block in render_callback
. I personally think about enqueuing automatically the view script when a block is rendered and render_callback
isn't provided. We can safely assume that in such a case the block author wants to have the view script to be loaded on the frontend when the block is present in the HTML.
3 years ago
#81
@aristath and @youknowriad – do you think we should some automated handling for the view script? At the moment it's handled manually by the File block in
render_callback
. I personally think about enqueuing automatically the view script when a block is rendered andrender_callback
isn't provided. We can safely assume that in such a case the block author wants to have the view script to be loaded on the frontend when the block is present in the HTML.
Automatically enqueueing the script when the block is rendered would make sense... I don't see why we'd require manually adding it to render_callback
:+1:
3 years ago
#82
@aristath and @youknowriad – do you think we should some automated handling for the view script? At the moment it's handled manually by the File block in
render_callback
. I personally think about enqueuing automatically the view script when a block is rendered andrender_callback
isn't provided. We can safely assume that in such a case the block author wants to have the view script to be loaded on the frontend when the block is present in the HTML.
Automatically enqueueing the script when the block is rendered would make sense... I don't see why we'd require manually adding it to
render_callback
👍
Added in https://github.com/WordPress/wordpress-develop/pull/1412/commits/179116566e8a251d52b89b769033de42d4d84362. If the render_callback
is provided then it has to be explicitly handled to account for the more complex cases like with the core blocks: File and Navigation.
3 years ago
#83
Closed with https://core.trac.wordpress.org/changeset/51501.
Trac ticket https://core.trac.wordpress.org/ticket/53397
## PHP Backports
The diff is here https://github.com/WordPress/gutenberg/compare/5c890c0ca36bfd21a1ad945d9c0813c0686fec4a...6171e1b04e6d77fe08c64335ffc2419a96af8a36