Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Oct 17, 2023

Conversation

afercia
Copy link
Contributor

@afercia afercia commented Oct 16, 2023

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 6.7 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta labels Oct 16, 2023
@github-actions
Copy link

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

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:

@michalczaplinski michalczaplinski removed the Backport to WP 6.7 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta label Oct 16, 2023
@SiobhyB
Copy link
Contributor

SiobhyB commented Oct 16, 2023

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

Copy link
Contributor

@michalczaplinski michalczaplinski left a comment

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
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
Copy link
Contributor Author

afercia commented Oct 17, 2023

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
56 checks passed
@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
Copy link
Contributor

getdave commented Jan 23, 2024

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants