Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 11 months ago

#53397 closed task (blessed) (fixed)

Update the WordPress Packages with the Gutenberg fixes during the 5.8 beta/RC lifecycle

Reported by: youknowriad's profile youknowriad Owned by: desrosj's profile 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

Trac ticket https://core.trac.wordpress.org/ticket/53397

## PHP Backports

  • [ ] Theme.json infrastructure related changes
  • [ ] Widget editor related changes

The diff is here https://github.com/WordPress/gutenberg/compare/5c890c0ca36bfd21a1ad945d9c0813c0686fec4a...6171e1b04e6d77fe08c64335ffc2419a96af8a36

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!

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.

#6 @youknowriad
3 years ago

In 51149:

Block Editor: Update the WordPress packages with the fixes for 5.8 beta 2.

This includes:

Various

Template Editor

Widgets Editor

Global Styles (theme.json)

Performance

Props nosolosw, jorgefilipecosta, aristath, ntsekouras, peterwilsoncc, mcsf.
See #53397.

#8 @youknowriad
3 years ago

In 51156:

Block Editor: Second batch of fixes for 5.8 beta 2

This includes:

  • Fix regression emptying post content block in template mode.
  • Legacy Widget: Don't display "No preview" when widget has image tags.

See #53397.

#9 @desrosj
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 @youknowriad
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.

nosolosw commented on PR #1408:


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.

#14 @jorgefilipecosta
3 years ago

In 51198:

Ports theme.json changes for beta 3.

  • Add _wp_to_kebab_case function
  • Add CSS Custom Properties within preset classes.

Props nosolosw.
See #53397.

#15 @jorgefilipecosta
3 years ago

In 51199:

Block Editor: Package updates for Beta 3.

The commit updates the WordPress packages for beta 3.

Props nosolosw, noisysocks, youknowriad.
See #53397.

#17 @desrosj
3 years ago

In 51202:

Widgets: Stop loading wp-editor and the Block Directory assets on the widgets screen.

When using the text widget, a wp.editor.initialize is not a function notice is encountered. This happens when wp-editor is loaded as a dependency, which assigns wp.oldEditor = wp.editor and then redefines wp.editor.

wp-editor is only used for the Classic block, which is not supported in the new widgets editor. [51198-51199] updated @wordpress/block-library to remove wp-editor as a dependency, but it’s still listed as a dependency of the wp-block-directory script handle.

Since the Block directory is not supported within the widgets editor, the related assets can safely be blocked from enqueueing.

Props noisysocks, gziolo, Mamaduka, mkaz.
Fixes #53437. See #53397.

#18 @SergeyBiryukov
3 years ago

In 51225:

Tests: Use assertSame() in _wp_to_kebab_case() tests.

This ensures that not only the return values match the expected results, but also that their type is the same.

Going forward, stricter type checking by using assertSame() should generally be preferred to assertEquals() where appropriate, to make the tests more reliable.

Follow-up to [51079], [51198].

See #52482, #52625, #53397.

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

ryelle commented on PR #1429:


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

gziolo commented on PR #1430:


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.

#24 @youknowriad
3 years ago

In 51241:

Block Editor: Update the packages with a number of fixes targeted for Beta 4.

It includes fixes from these two backport PRs:

Props gziolo, ryelle, ntsekouras, desrosj, jorgefilipecosta.
See #53397

#25 @desrosj
3 years ago

#53509 was marked as a duplicate.

#27 @youknowriad
3 years ago

In 51250:

Block Editor: Package updates including fixes from Gutenberg for WordPress 5.8 RC1.

This includes the fixes from https://github.com/WordPress/gutenberg/pull/33036

See #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.

desrosj commented on PR #1412:


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.

desrosj commented on PR #1412:


3 years ago
#30

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.

https://i0.wp.com/user-images.githubusercontent.com/359867/123813199-b3661980-d8c2-11eb-9ab3-2413ec13fc1a.png

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.

#34 @youknowriad
3 years ago

In 51259:

Build: Split packages and blocks to their webpack configs.

This also adds support for the viewScript for blocks fixing
the PDF preview for file blocks.

Props desrosj, gziolo.
See #53397.

#37 @desrosj
3 years ago

In 51260:

Docs: Correct @since annotation for WP_Block_Type->view_script.

Follow up to [51259].

Props swissspidy.
See #53397.

#38 @youknowriad
3 years ago

In 51261:

Block Editor: Include the latest fixes targetted for 5.8 RC1.

It includes:

  • Add a label for screen reader in categories block gutenberg#33060
  • Remove "is-dark-theme" rules from mixins. gutenberg#33058
  • Adjust widget form margins in the new widget editor gutenberg#33040
  • [Block Library - Query Loop]: Select first Query Loop found from pattern selection gutenberg#32737

See #53397.

#39 @desrosj
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.

#40 @desrosj
3 years ago

In 51265:

Script Loader: Add file block assets to the svn-ignore list.

These are automatically generated and should not be committed.

Follow up to [51259].

Props gziolo, youknowriad.
See #53397.

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

#44 @desrosj
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

#47 @desrosj
3 years ago

In 51267:

Script Loader: Fix PHP notice caused by the viewScript for the core/file block.

This fixes a PHP notice caused by the viewScript for the core/file block having .min.js instead of just .js.

register_block_script_handle() was incorrectly looking for view.min.asset.php, which does not exist, and caused the _doing_it_wrong() notice.

This adds a check for .min.js in the viewScript field of block.json and corrects it to .js in order to match the expected pattern of view.asset.php until a more permanent fix can be created.

Follow up to [51259].

Props ipstenu, pbiron, peterwilsoncc.
See #53397.

This ticket was mentioned in Slack in #core by jeffpaul. View the logs.


3 years ago

#49 @desrosj
3 years ago

In 51268:

Build/Test Tools: Revert [51259-51256,51265].

[51259] introduced a PHP notice that was not actually fixed by [51265]. Reverting these changes in order to investigate further.

See #53397.

desrosj commented on PR #1412:


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 @desrosj
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.

#52 @desrosj
3 years ago

In 51288:

Script Loader: Revert [51267].

This was missed in [51268] when reverting [51259-51260,51265].

Props pbiron.
See #53397.

#53 @SergeyBiryukov
3 years ago

[51288] looks good to backport to the branch.

#54 @desrosj
3 years ago

In 51291:

Script Loader: Revert [51267].

This was missed in [51268] when reverting [51259-51260,51265].

Props pbiron.
Merges [51288] to the 5.8 branch.
See #53397.

gziolo commented on PR #1412:


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 🙇🏻

#56 @youknowriad
3 years ago

In 51344:

Block Editor: Update packages with latest fixes for 5.8 RC2

Includes the following fixes:

  • [Block Library]: Less warnings when blocks try to render themselves.
  • Reset z-index on focused widget form
  • Refactor appender margin.
  • Fix slash inserter for widgets screen.
  • Widget screens: set html block as freeform content handler.
  • Widget Block: widget_id is undefined when a widget is placed.
  • Add <CopyHandler> to WidgetAreasBlockEditorProvider
  • Add width: 100% to components-base-control inside wp-block-legacy-widget
  • [Widgets editor] Replace the "technical" error notice a more user-friendly one
  • Fix legacy widget height overflow
  • Fix "Select all" behavior in the editor
  • Increase specificity of the NoPreview CSS rules to avoid conflicts with theme styles
  • Fix move to widget area checkmark
  • Replace legacy widget icon with its new version
  • [Block Library - Query Loop]: Set default block variations not to inherit from global query

See #53397.

#57 @desrosj
3 years ago

  • Keywords commit dev-reviewed added
  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopening to backport [51344].

#58 @desrosj
3 years ago

  • Owner set to desrosj
  • Resolution set to fixed
  • Status changed from reopened to closed

In 51346:

Block Editor: Update packages with latest fixes for 5.8 RC2

Includes the following fixes:

  • [Block Library]: Less warnings when blocks try to render themselves.
  • Reset z-index on focused widget form
  • Refactor appender margin.
  • Fix slash inserter for widgets screen.
  • Widget screens: set html block as freeform content handler.
  • Widget Block: widget_id is undefined when a widget is placed.
  • Add <CopyHandler> to WidgetAreasBlockEditorProvider
  • Add width: 100% to components-base-control inside wp-block-legacy-widget
  • [Widgets editor] Replace the "technical" error notice a more user-friendly one
  • Fix legacy widget height overflow
  • Fix "Select all" behavior in the editor
  • Increase specificity of the NoPreview CSS rules to avoid conflicts with theme styles
  • Fix move to widget area checkmark
  • Replace legacy widget icon with its new version
  • [Block Library - Query Loop]: Set default block variations not to inherit from global query

Merges [51344] to the 5.8 branch.
Fixes #53397.

#59 @peterwilsoncc
3 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopening for some last minute fixes.

#60 @peterwilsoncc
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 @desrosj
3 years ago

  • Keywords dev-reviewed commit added; dev-feedback removed

@peterwilsoncc The PRs look good to me.

#62 @peterwilsoncc
3 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 51362:

Block Editor: Update packages with latest fixes for 5.8 RC2

Includes the following fixes:

  • Query Block: Type validation of WP_Query parameters.

Props ntsekouras, stevehenty, peterwilsoncc, desrosj.
Fixes #53397.

#63 @peterwilsoncc
3 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopening to backport [51362]

#64 @peterwilsoncc
3 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 51363:

Block Editor: Update packages with latest fixes for 5.8 RC2

Includes the following fixes:

  • Query Block: Type validation of WP_Query parameters.

Props ntsekouras, stevehenty, peterwilsoncc, desrosj.
Merges [51362] to the 5.8 branch.
Fixes #53397.

desrosj commented on PR #1450:


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.

#67 @youknowriad
3 years ago

In 51421:

Block Editor: Include the fixes targetted for WordPress 5.8 RC3.

This includes the following fixes:

  • Safari: see if compositing layer size is more reasonable when position fixed divs are not inserted into content.
  • Site Logo Block: update Site Logo block UI and option syncing.
  • Fix moving inner blocks in the Widgets Customizer.
  • Allow themes to provide empty values for color.duotone and spacing.units
  • Update getTermsInfo() to workaround parsing issue for translatable strings.
  • Specify what settings can be part of settings.layout.
  • Update conditions to hide duotone panel.
  • Prevent entering invalid values in the Query Loop block config.
  • Prevent color panel from showing as empty.
  • Avoid calling gutenberg_ functions within code shipped through WordPress Core.

Props desrosj.
See #53397.

#69 @desrosj
3 years ago

In 51422:

Block Editor: Include the fixes targeted for WordPress 5.8 RC3.

This includes the following fixes:

  • Safari: see if compositing layer size is more reasonable when position fixed divs are not inserted into content.
  • Site Logo Block: update Site Logo block UI and option syncing.
  • Fix moving inner blocks in the Widgets Customizer.
  • Allow themes to provide empty values for color.duotone and spacing.units
  • Update getTermsInfo() to workaround parsing issue for translatable strings.
  • Specify what settings can be part of settings.layout.
  • Update conditions to hide duotone panel.
  • Prevent entering invalid values in the Query Loop block config.
  • Prevent color panel from showing as empty.
  • Avoid calling gutenberg_ functions within code shipped through WordPress Core.

Props desrosj, youknowriad.
Merges [51421] to the 5.8 branch.
Fixes #53397.

#70 @peterwilsoncc
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

#71 @peterwilsoncc
3 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

#72 @desrosj
3 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 51427:

Editor: Second round of package updates ahead of RC3.

Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj.
Merges [51426] to the 5.8 branch.
Fixes #53397.

youknowriad commented on PR #1500:


3 years ago
#74

The diff is looking good, I'll test it quickly and commit.

#75 @youknowriad
3 years ago

In 51443:

Block Editor: Backport fixes targetted for WordPress 5.8 RC4.

This includes:

  • Suggestion List: Check if a node exists to scroll into view.
  • Autocomplete: reset state for empty text.
  • Adds auxiliary class names for editor styles in the widgets editor.
  • Extract snackbars into a separate component.
  • Rich text: run input rules after composition end.
  • iframe: load inline styles.
  • Multi select: select all: restore ref callback.
  • Writing flow: allow select all from empty selection.
  • Post Excerpt: Fix excerpt_more filter conflict and remove wordCount attribute.
  • Add the percent unit to the default units in Core.

Props desrosj.
See #53397.

#77 @desrosj
3 years ago

In 51445:

Block Editor: Backport fixes targeted for WordPress 5.8 RC4.

This includes:

  • Suggestion List: Check if a node exists to scroll into view.
  • Autocomplete: reset state for empty text.
  • Adds auxiliary class names for editor styles in the widgets editor.
  • Extract snackbars into a separate component.
  • Rich text: run input rules after composition end.
  • iframe: load inline styles.
  • Multi select: select all: restore ref callback.
  • Writing flow: allow select all from empty selection.
  • Post Excerpt: Fix excerpt_more filter conflict and remove wordCount attribute.
  • Add the percent unit to the default units in Core.

Props desrosj, youknowriad.
Merges [51443] to the 5.8 branch.
Fixes #53397.

gziolo commented on PR #1412:


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.

gziolo commented on PR #1412:


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.

gziolo commented on PR #1412:


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.

aristath commented on PR #1412:


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 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.

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:

gziolo commented on PR #1412:


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 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.

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.

This ticket was mentioned in Slack in #hosting-community by ipstenu. View the logs.


3 years ago

#85 @flixos90
11 months ago

In 57009:

Themes: Fix block theme supports being added too early, leading to Customizer live preview bugs in 6.4.

The Customizer live preview broke because of [56635], however the root cause for the bug was a lower-level problem that had been present since WordPress 5.8: The block theme specific functions _add_default_theme_supports() and wp_enable_block_templates() were being hooked into the setup_theme action, which fires too early to initialize theme features. Because of that, theme functionality would be initialized before the current theme setup being completed. In the case of the Customizer, that includes overriding which theme is the current theme entirely, thus leading to an inconsistent experience.

This changeset fixes the bug by moving those two callbacks to the after_setup_theme action, which is the appropriate action to initialize theme features.

Props karl94, hellofromTonya, joemcgill, flixos90.
Fixes #59732.
See #18298, #53397, #54597.

#86 @flixos90
11 months ago

In 57010:

Themes: Fix block theme supports being added too early, leading to Customizer live preview bugs in 6.4.

The Customizer live preview broke because of [56635], however the root cause for the bug was a lower-level problem that had been present since WordPress 5.8: The block theme specific functions _add_default_theme_supports() and wp_enable_block_templates() were being hooked into the setup_theme action, which fires too early to initialize theme features. Because of that, theme functionality would be initialized before the current theme setup being completed. In the case of the Customizer, that includes overriding which theme is the current theme entirely, thus leading to an inconsistent experience.

This changeset fixes the bug by moving those two callbacks to the after_setup_theme action, which is the appropriate action to initialize theme features.

Props karl94, hellofromTonya, joemcgill, flixos90.
Merges [57009] to the 6.4 branch.
Fixes #59732.
See #18298, #53397, #54597.

Note: See TracTickets for help on using tickets.