Opened 3 years ago
Closed 3 years ago
#59105 closed defect (bug) (reported-upstream)
`blocks/footnotes.php` file overwrites global `$post_type` variable
| Reported by: | om4csaba | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Editor | Version: | 6.3 |
| Severity: | major | Keywords: | |
| Cc: | Focuses: |
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
Change History (6)
#3
@
3 years ago
There's a fix for this in https://github.com/WordPress/gutenberg/pull/53663.
#4
@
3 years ago
- Milestone 6.3.1 → 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
@
3 years 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
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
This will need to be fixed in the Gutenberg repo as the file lives there.