Support » Plugin: PDF Embedder » Version 4.1 Breaks WordPress Page Editor

  • Resolved jaredfernandez


    Updated to Version 4.1 running WordPress 5.2.1. When trying to edit any page, the following error is shown:

    “The editor has encountered an unexpected error.”

    The full error message produced is:

    TypeError: Cannot read property 'defaults' of undefined
        at (
        at new t (
        at Yf (
        at qg (
        at hi (
        at Qg (
        at Rg (
        at Sc (
        at Z (
        at Kc (

    Note that disabling the Gutenberg plugin does not alleviate the issue.

    Only disabling the PDF Embedder plugin resolves the problem.

Viewing 15 replies - 1 through 15 (of 15 total)
  • I also get that same error.
    There is some conflict that started today.
    You can’t add a page or a post without this error:-

    “The editor has encountered an unexpected error”

    Only thing that stops the error is disabling PDF embedder.

    Please fix the problem ASAP.

    Plugin Support PDFG Support


    Hi @jaredfernandez and @xmetman,

    Apologies for the problem—there appears to have been an error when the plugin update was deployed. The developers are working on the solution now.

    Do you have the previous version to roll back to until this has been fixed? If you do not, please send an email to and I will try to find another way to get the 4.0 version to you to use in the meantime.


    I have the same problem.

    A workaround is to use the code editor and the “Short Code”..

    1) Upload your pdf to the media page
    2) Click on the pdf in the media page
    3) Copy the URL from the pdf in the media page
    4) Go back and edit your post in code editor view and use the short code from the PDF Embedder document, save and preview.

    Shortcode here for reference:
    [pdf-embedder url=””]

    Change the URL in the shortcode to your pdf of course..
    Why is this marked resolved?
    It’s still broken..

    Plugin Support PDFG Support


    Thank you for sharing your workaround @gordwait.

    I unintentionally clicked the mark resolve and reply field on my previous post. You are correct in that it has not yet been resolved.


    Ah, no worries. Cheers!

    Thread Starter jaredfernandez


    I just used the plugin “WP Rollback” to temporarily rollback to Version 4.0 which works fine for me until you are able to issue a fix.

    Thanks for the quick response!

    Plugin Support PDFG Support


    Would any of you be willing to share a login to your site for the developer to investigate? We haven’t been able to replicate this on our own testing environments so a site where the issue is happening would be super helpful.

    You can send credential confidentially to



    I’ve also been seeing the “unexpected error” message within the WP editor, and in case it helps with your troubleshooting, have noticed that (at least on our site), the problem seems to be a conflict with the “The Events Calendar” plugin ( When I disable either “PDF Embedder” or “The Events Calendar” on our site, the error in the editor goes away. I will however note that the error details that I receive seem to differ from what OP pasted above:
    TypeError: Cannot read property ‘MediaFrame’ of undefined
    at (https://<my domain>/wp-includes/js/media-models.min.js?ver=5.2.1:1:1062)
    at new t (https://<my domain>/wp-includes/js/dist/edit-post.min.js?ver=3.3.5:12:7318)
    at Yf (https://<my domain>/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.8.4:67:42)
    at qg (https://<my domain>/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.8.4:92:302)
    at hi (https://<my domain>/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.8.4:104:285)
    at Qg (https://<my domain>/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.8.4:144:217)
    at Rg (https://<my domain>/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.8.4:145:76)
    at Sc (https://<my domain>/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.8.4:158:109)
    at Z (https://<my domain>/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.8.4:156:492)
    at Kc (https://<my domain>/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.8.4:155:52)

    Hope this helps, and looking forward to (and thanks in advance for) the update that will fix this issue.

    We also use PDF Embedder and also ran into this problem. Disabling the plugin worked to restore Gutenberg. We are an local online newspaper and our journalist cannot write articles without it. Please fix asap.

    Thank you @wppdfsupport for the immediate work on the solution.
    In page editor, we get the following error message:

    This block has encountered an error and cannot be previewed

    I have received the previous version (4.0), when installed, it is automatically updated to 4.1 and the error persists.
    It is not possible to use the workaround because you can not edit any page / post

    Plugin Support PDFG Support


    @tomasapostol, if your WP configuration is set up to automatically install updates, that would need to be temporarily disabled so that you can use the 4.0 version without it immediately rolling forward to 4.1

    The developers have identified the issue and are doing some final tests before releasing the fix which should be rolling out by the end of the day. If anyone is willing to provide an admin login to their sites and FTP to the developers to test the fix on sites showing the error, please send credentials to (I’ve seen and replied to your email @jaredfernandez)

    Thank you for your patience.


    I am having the same issue. Gutenberg works with the PDF Embedder plugin disabled. As a workaround, until the PDF Embedder update is released, I have installed and am using the Classic Editor plugin to edit posts. That way I can keep PDF Embedder enabled for now.

    Plugin Support PDFG Support


    Hi everyone,

    ​I just wanted to let you know that the 4.2 update has been released and fixes the editor problem experienced with 4.1. If you rolled back your plugin to 4.0 or deactivated it, you can safely run the update and carry on.

    ​Thank you for your patience while we sorted this out.


Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Version 4.1 Breaks WordPress Page Editor’ is closed to new replies.