Skip to content

Fix PHP notice when an image with lightbox is deleted in the behaviors file - #55385

Merged
afercia merged 1 commit into
trunkfrom
fix/php-notice-on-image-deletion-behaviors-file
Oct 17, 2023
Merged

Fix PHP notice when an image with lightbox is deleted in the behaviors file#55385
afercia merged 1 commit into
trunkfrom
fix/php-notice-on-image-deletion-behaviors-file

Conversation

@afercia

@afercia afercia commented Oct 16, 2023

Copy link
Copy Markdown
Member

Follow-up to #55370

What?

Aookues the same fix from #55370 to the behaviiors file.

Why?

How?

Testing Instructions

Not sure how to make a theme use the behaviors.php file, but to my understanding thie file may be still used.
This change only applies the wame efix for the Image block from #55370

Testing Instructions for Keyboard

Screenshots or screencast

@afercia afercia added [Type] Bug An existing feature does not function as intended [Block] Image Affects the Image Block Backport to WP Beta/RC labels Oct 16, 2023
@afercia
afercia requested a review from spacedmonkey as a code owner October 16, 2023 13:40
@github-actions

Copy link
Copy Markdown

This pull request has changed or added PHP files. Please confirm whether these changes need to be synced to WordPress Core, and therefore featured in the next release of WordPress.

If so, it is recommended to create a new Trac ticket and submit a pull request to the WordPress Core Github repository soon after this pull request is merged.

If you're unsure, you can always ask for help in the #core-editor channel in WordPress Slack.

Thank you! ❤️

View changed files
❔ lib/block-supports/behaviors.php
@github-actions

Copy link
Copy Markdown

Flaky tests detected in c71c8ec.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/6534471543
📝 Reported issues:

@SiobhyB

SiobhyB commented Oct 16, 2023

Copy link
Copy Markdown
Contributor

@michalczaplinski, @afercia, 👋 , just wanted to double-check whether this should be backported for tomorrow's RC1 once merged?

@michalczaplinski
michalczaplinski self-requested a review October 16, 2023 16:07

@michalczaplinski michalczaplinski left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this @afercia !

Just a note that the behaviors.php file is kept in Gutenberg ONLY for backwards-compatibility with the previous version of the Lightbox, which used "behaviors" and will be removed in a future GB version. It was never shipped in Core and should not be backported now:

* This file will NOT be backported to Core. It exists to provide a
* migration path for theme.json files that used the deprecated "behaviors".
* This file will be removed from Gutenberg in version 17.0.0.

I removed the [backport to WP RC] label.

@michalczaplinski

Copy link
Copy Markdown
Contributor

@michalczaplinski, @afercia, 👋 , just wanted to double-check whether this should be backported for tomorrow's RC1 once merged?

@SiobhyB Nope, should not be backported!

@afercia

afercia commented Oct 17, 2023

Copy link
Copy Markdown
Member Author

Just a note that the behaviors.php file is kept in Gutenberg ONLY for backwards-compatibility with the previous version of the Lightbox, which used "behaviors" and will be removed in a future GB version.

Thanks for the clarification @michalczaplinski.
Then I guess it can be merged to fix the plugin previous implementation.

@afercia
afercia merged commit d7847d1 into trunk Oct 17, 2023
@afercia
afercia deleted the fix/php-notice-on-image-deletion-behaviors-file branch October 17, 2023 06:28
@github-actions github-actions Bot added this to the Gutenberg 16.9 milestone Oct 17, 2023
@getdave

getdave commented Jan 23, 2024

Copy link
Copy Markdown
Contributor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Block] Image Affects the Image Block [Type] Bug An existing feature does not function as intended

4 participants