• Resolved Nathan Ingram

    (@nathaningram)


    Hi folks! Love the idea of this plugin. The Choose PDF button doesn’t seem to be working, but if we paste the URL in, it works fine. Wonder what’s up with the button, though?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Corey Salzano

    (@salzano)

    Hi Nathan, thanks for trying my plugin. I have not experienced this issue, so there must be something different between my site and yours. The plugin uses a JavaScript event handler to open a Media Library modal when the Choose PDF button is pressed.

    There might be some clues in your browser’s developer console that could help me reproduce the issue. I am preparing another release, and it would be nice to make sure your problem is addressed in the next version.

    Thread Starter Nathan Ingram

    (@nathaningram)

    Hey Corey! Console shows this js error on clicking the button:

    form-editor.js?ver=1.0.4:91 Uncaught TypeError: Cannot read properties of undefined (reading 'frames') at HTMLButtonElement.handleChooseClick (form-editor.js?ver=1.0.4:91:28)

    Plugin Author Corey Salzano

    (@salzano)

    The media library features aren’t loading for you. Are you editing the form with a user with custom permissions? Are you editing forms outside the dashboard?

    I cannot reproduce the error. If you are able & willing, please try the version of this plugin I’ve just pushed to github. I believe it contains the fix. Be careful not to activate two copies of the plugin at the same time: https://github.com/breakfastco/embed-pdf-gravityforms/archive/refs/heads/main.zip

    Plugin Author Corey Salzano

    (@salzano)

    I was able to reproduce this problem and confirm the fix I described in the previous message takes care of the issue. I am marking this thread as resolved, and I’ll launch the fix in an update here on .org this week.

    The problem is user capabilities. To test, I created a user with the Subscriber role and used User Role Editor to grant all Gravity Forms capabilities. The only core capability this user had is read. The user is able to edit forms, but has no Media Library capability without upload_files.

    Thread Starter Nathan Ingram

    (@nathaningram)

    Thanks Corey! I can also confirm the plugin update in the zip file you provided above does fix the issue.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Choose PDF Button Not Working’ is closed to new replies.