• Resolved invisibleira

    (@invisibleira)


    Hi,
    This plugin has been really useful, and it’s functioning well for us in Gutenberg, except when we go into an old post that has an image that’s been given a credit, and is being edited in classic mode under Gutenberg. In that situation, the post cannot be re-saved/saved after editing, and there is a javascript console error:
    media-credit-tinymce.min.js?wp-mce-4940-20190515:3 Uncaught (in promise) TypeError: t.breplace is not a function
    at media-credit-tinymce.min.js?wp-mce-4940-20190515:3
    at RegExp.[Symbol.replace] (<anonymous>)
    at String.replace (<anonymous>)
    at o (media-credit-tinymce.min.js?wp-mce-4940-20190515:3)
    at zw.A.wpGetImgCaption (media-credit-tinymce.min.js?wp-mce-4940-20190515:3)
    at zw.<anonymous> (media-credit-tinymce.min.js?wp-mce-4940-20190515:3)
    at dp.c.fire (tinymce.min.js?ver=4940-20190515:2)
    at zw.fire (tinymce.min.js?ver=4940-20190515:2)
    at vp (tinymce.min.js?ver=4940-20190515:2)
    at sy (tinymce.min.js?ver=4940-20190515:2)

    I’ve disabled all other plugins, and still experience the error if Media Credit is enabled (but not if it’s disabled). Any help or thoughts in fixing much appreciated!
    Thanks

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author pepe

    (@pputzer)

    Thanks for the report, I’ll look into it. I can’t promise a quick fix because I’ll probably have to code a proper upgrade routine from shortcodes to blocks, but I will try at least find a workaround for the time being.

    Thread Starter invisibleira

    (@invisibleira)

    Pepe,
    Thank you–much appreciated!
    Regards,
    Ira

    Plugin Author pepe

    (@pputzer)

    Hi @invisibleira, sorry for the long delay. Can you verify that the bug still occurs with WordPress 5.3? If so, please give some additional information about your browser and a step by step guide to triggering the issue. I have not been able to trigger it in my stripped-down development environment.

    Here’s what I tried:

    • Enable Media Credit and Classic Editor plugins
    • Create a post containing an image with a credit
    • Disable Classic Editor plugin
    • Edit the previously created post and add some text to the Classic block
    • Save the new post
    Plugin Author pepe

    (@pputzer)

    Hi @invisibleira, can you help me tracing this?

    Plugin Author pepe

    (@pputzer)

    Hi @invisibleira, I think I found the bug (it’s a typo in a code path that is only relevant if the Classic Editor markup is broken).

    Will be fixed in 4.1.0.

    • This reply was modified 4 years, 11 months ago by pepe.
    • This reply was modified 4 years, 11 months ago by pepe. Reason: Found bug!
    Plugin Author pepe

    (@pputzer)

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘javascript error when using Classic mode and post containing credit’ is closed to new replies.