Make WordPress Core

Opened 9 months ago

Closed 9 months ago

#59105 closed defect (bug) (reported-upstream)

`blocks/footnotes.php` file overwrites global `$post_type` variable

Reported by: om4csaba's profile om4csaba Owned by:
Milestone: Priority: normal
Severity: major Version: 6.3
Component: Editor Keywords:
Focuses: Cc:

Description

The blocks/footnotes.php file in v 6.3 introduced a name collision with the global $post_type variable.

This name collision occurred because the blocks/footnotes.php file is not loaded within a function or method.

Now, WordPress sets the global variable in every context, such as the REST API, where this variable previously did not exist. As a result, any plugin or theme that relies on the global $post_type variable may experience a change in behavior.

See the impact on WooCommerce here: https://github.com/woocommerce/woocommerce/issues/39744

Changes introduced: [56298]
Related ticket: #58804

Change History (6)

#1 @isabel_brison
9 months ago

  • Milestone changed from Awaiting Review to 6.3.1

#2 @swissspidy
9 months ago

  • Component changed from Posts, Post Types to Editor

This will need to be fixed in the Gutenberg repo as the file lives there.

#4 @audrasjb
9 months ago

  • Milestone changed from 6.3.1 to 6.3.2

WP 6.3.1 is going to be released in the next few days, so let's move this ticket to 6.3.2 to give it more time to be committed and backported.

#5 @om4csaba
9 months ago

Hi @audrasjb,

I've noticed that the changes were committed via [56423]. Given this, it seems that the issue has been addressed.

Therefore, might closing this ticket rather than changing the milestone be more appropriate? I believe this would accurately reflect the status of the issue.

Thank you

#6 @audrasjb
9 months ago

  • Milestone 6.3.2 deleted
  • Resolution set to reported-upstream
  • Status changed from new to closed

You're right, thanks!
Fixed in [56423].

Note: See TracTickets for help on using tickets.