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

Elementor: Social media appearance props not updating upon post content change #21982

Open
1 of 10 tasks
pls78 opened this issue Jan 21, 2025 · 0 comments
Open
1 of 10 tasks

Comments

@pls78
Copy link
Member

pls78 commented Jan 21, 2025

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

  1. 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
  2. Edit the post in Elementor
  3. open the Social media appearance modal from the Yoast sidebar
  4. With React DevTools, search for the FacebookWrapper component (pick the innermost one)
  5. Verify the imageFallbackUrl prop contains the post's image URL
  6. Close the modal and change the image in the post
  7. 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):
  • Block Editor
  • Gutenberg Editor
  • Elementor Editor
  • Classic Editor
  • Other:
  • Which browser is affected (or browsers):
  • Chrome
  • Firefox
  • Safari
  • Other:

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

  • I've searched for any related issues and avoided creating a duplicate issue.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant