Skip to content

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

@pls78

Description

@pls78

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions