Support

Account

Home Forums Bug Reports Youtube auto embed triggers Unsaved Changes alert in wysiwyg

Solving

Youtube auto embed triggers Unsaved Changes alert in wysiwyg

  • Steps to reproduce:
    1) Add an ACF wysiwyg custom field to pages
    2) Add an embeddable Youtube URL to the field
    3) Save

    Then: If the wysiwyg is set to Visual the auto embed happens (you see the video) then you get “Changes you made may not be saved.” alert when you navigate away, though no changes have been made. No error occurs with the wysiwyg in Text mode, or if you remove the Youtube URL and add the it to the main content. This only happens on the ACF wysiwyg.

    What should happen: no alert should appear unless an actual change has been made. Seems when the auto embed happens the page-changed monitor (?) thinks a change has been made

    Happens on fresh install of WordPress and ACF Pro.

  • Hi @innermedia

    I am afraid that I am unable to replicate this on my end. Would it be possible to share a screen recording? Perhaps there is a step I could be missing.

  • Hi James, thanks for looking into this. On further investigation it seems to be a conflict with Woocommerce. The bug does not appear without Woocommerce installed and active, so the steps to reproduce are…

    1) install fresh WordPress
    2) install ACF Pro
    3) install Woocommerce
    4) add ACF wysiwyg field to pages
    5) add an embeddable youtube video URL to the wysiwyg field on a page (video appears)
    6) Save page

    Now when you navigate away you get “Changes you made may not be saved.”. Sometimes you have to click on the page (say, to close the ‘page updated’ message) to get the ‘unsaved changes’ message when navigating away, but other times it appears just by reloading via browser address bar.

    Disable woocomemrce and the problem goes away. Add the youtube URL to the main content rather than the ACF wysiwyg and the problem does not occur (this only occurs with auto embed URLs in the ACF wysiwyg).

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Youtube auto embed triggers Unsaved Changes alert in wysiwyg’ is closed to new replies.