Please give us a description of what happened
While working on Add fallback for AVIF for X compatibility, I noticed both TwitterWrapper and FacebookWrapper components don't react to the post content's change. Specifically, the imageFallbackUrl prop doesn't change when it should (i.e., when adding/changing an image in the post body if no social image is specified).
This prevents the solution in the AVIF fallback PR to work in Elementor and might impact also other features.
To Reproduce
Step-by-step reproduction instructions
- Create a post in the Block editor, add an image in its body and don't set any social image in the
Social media appearance section
- Edit the post in Elementor
- open the
Social media appearance modal from the Yoast sidebar
- With React DevTools, search for the
FacebookWrapper component (pick the innermost one)
- Verify the
imageFallbackUrl prop contains the post's image URL
- Close the modal and change the image in the post
- Open the modal again and check the imageFallbackUrl` prop value
Actual results
The prop value is still the URL of the previous image, while it should have been update with the new one.
Screenshots, screen recording, code snippet
If possible, please provide a screenshot, a screen recording or a code snippet which demonstrates the bug.
Technical info
- If relevant, which editor is affected (or editors):
- Which browser is affected (or browsers):
Used versions
- Device you are using:
- Operating system:
- PHP version:
- WordPress version:
- WordPress Theme:
- Yoast SEO version:
-
Gutenberg plugin version:
-
Elementor plugin version:
-
Classic Editor plugin version:
- Relevant plugins in case of a bug:
Pay attention to the checkbox
Please give us a description of what happened
While working on Add fallback for AVIF for X compatibility, I noticed both
TwitterWrapperandFacebookWrappercomponents don't react to the post content's change. Specifically, theimageFallbackUrlprop doesn't change when it should (i.e., when adding/changing an image in the post body if no social image is specified).This prevents the solution in the AVIF fallback PR to work in Elementor and might impact also other features.
To Reproduce
Step-by-step reproduction instructions
Social media appearancesectionSocial media appearancemodal from the Yoast sidebarFacebookWrappercomponent (pick the innermost one)imageFallbackUrlprop contains the post's image URLActual results
The prop value is still the URL of the previous image, while it should have been update with the new one.
Screenshots, screen recording, code snippet
If possible, please provide a screenshot, a screen recording or a code snippet which demonstrates the bug.
Technical info
Used versions
Pay attention to the checkbox