Support » Plugin: Modal Guten Block » Image click doesn’t work

  • Hi There,
    This plugin is a great idea but unfortunately Image Click option doesn’t work.
    When you select an image it produces the following error in the console:

    Uncaught TypeError: Cannot read properties of undefined (reading 'url')
        at o (blocks.build.js?ver=1634614057:1)
        at m.onSelect (media-utils.min.js?ver=8e557d69e3ef2356d081c60830d157a1:2)
        at p (backbone.min.js?ver=1.4.0:2)
        at f (backbone.min.js?ver=1.4.0:2)
        at c (backbone.min.js?ver=1.4.0:2)
        at h.Collection.n.trigger (backbone.min.js?ver=1.4.0:2)
        at h.Collection._onModelEvent (backbone.min.js?ver=1.4.0:2)
        at p (backbone.min.js?ver=1.4.0:2)
        at f (backbone.min.js?ver=1.4.0:2)
        at c (backbone.min.js?ver=1.4.0:2)
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author merbmerb

    (@merbmerb)

    Hi

    Thanks for the feedback, I just tried doing this and I did not have a problem. Did the error occur in the editor i.e. you selected the image you wanted to use for the trigger or when running the page?

    Thread Starter neko_in_space

    (@olgri)

    This happens on the edit screen.

    You add the block.
    Change Show On to ‘Image Click’.
    Click on the plus icon to open Media Library.
    Click on an image and click the Select button.
    This step is where the error appears.

    I have just disabled all plugins except the Modal Block, switched to a default theme and removed all other blocks from the page but the same error still appears.

    WP 5.8.1
    PHP 7.4

    Plugin Author merbmerb

    (@merbmerb)

    OK, I found the problem. By default, the code loads the medium-sized image, but if the image is too small then a medium image is never created and thus causes the error. It’s something I will provide a fix for but in the meantime, you could upload a larger version of that image (you can always select a smaller version for the image click).

    I hope that helps

    Plugin Author merbmerb

    (@merbmerb)

    OK I just released v1.4.1 with a fix for this

    Thread Starter neko_in_space

    (@olgri)

    Awesome, thank you so much!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Image click doesn’t work’ is closed to new replies.