Support » Plugin: FancyBox for WordPress » Uncaught TypeError: Cannot read property ‘title’ of undefined

  • Resolved nikkins82


    Hello, I am unable to initiate a lightbox when clicking on an image. When I click on an image, nothing fires on the frontend. The lightbox does not appear.

    I add a Gallery in the Gutenberg editor and select link to Media File. The console serves up a TypeError when clicking on an image.

    Newly installed v3.2.6 via and running WP 5.3
    My environment is not available to share, unfortunately but I can provide some screenshots.

    All settings are default.
    Do No call jQuery – Off
    Load JavaScript in Footer – Off

    Uncaught TypeError: Cannot read property 'title' of undefined
        at HTMLAnchorElement.caption ((index):155)
        at HTMLAnchorElement.<anonymous> (jquery.fancybox.js?ver=1.3.4:793)
        at Function.each (vendor.js?ver=1.0.0:2)
        at FancyBox.addContent (jquery.fancybox.js?ver=1.3.4:667)
        at new FancyBox (jquery.fancybox.js?ver=1.3.4:553)
        at (jquery.fancybox.js?ver=1.3.4:3068)
        at HTMLAnchorElement._run (jquery.fancybox.js?ver=1.3.4:3355)
        at HTMLAnchorElement.dispatch (vendor.js?ver=1.0.0:3)
        at HTMLAnchorElement.m.handle (vendor.js?ver=1.0.0:3)

    Any help would be appreciated, thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support mplusb


    Hello @nikkins82,

    Thank you for reaching out to us!
    Can you please check the page source and see if you have another Fancybox script there?


    Thread Starter nikkins82


    Hi, thanks for the quick response! I only see two fancybox scripts and looks correct. I believe it is a jQuery conflict on my end. Sorting it out now and will reach back out if that does not resolve the issue. Thanks again!

    Plugin Support mplusb


    No worries!




    I have the same problem: ndex):748 Uncaught TypeError: Cannot read property ‘children’ of undefined
    at HTMLDivElement.<anonymous> ((index):748)
    at HTMLDivElement.dispatch (jquery.js?ver=1.12.4-wp:3)
    at HTMLDivElement.r.handle (jquery.js?ver=1.12.4-wp:3)
    at Object.trigger (jquery.js?ver=1.12.4-wp:3)
    at Object.a.event.trigger (jquery-migrate.min.js?ver=1.4.1:2)
    at HTMLDivElement.<anonymous> (jquery.js?ver=1.12.4-wp:3)
    at Function.each (jquery.js?ver=1.12.4-wp:2)
    at a.fn.init.each (jquery.js?ver=1.12.4-wp:2)
    at a.fn.init.trigger (jquery.js?ver=1.12.4-wp:3)
    at B (FancyProductDesigner-all.min.js?ver=5.0.5:18)
    at Object.A [as success] (FancyProductDesigner-all.min.js?ver=5.0.5:18)
    at i (jquery.js?ver=1.12.4-wp:2)
    at Object.fireWith [as resolveWith] (jquery.js?ver=1.12.4-wp:2)
    at x (jquery.js?ver=1.12.4-wp:4)
    at XMLHttpRequest.c (jquery.js?ver=1.12.4-wp:4)

    My site is very slow. Conflict with the main plug.
    Any leads will be appreciated.


    Plugin Support mplusb


    Hi @cohenprinting1,

    That does not seem to be an error from our plugin unfortunately.
    It seems to be from Fancy Product Designer. You will have to reach out to them regarding this as they know their product the best.


    Broke with this error. In the plugin file (quickly) replaced the. This is not a complete solution, in which it would be better to introduce an attribute check.

    Lines from +-206 replace:

    $caption = ‘function( instance, item ) {return “”;}’;
    $caption = ‘function( instance, item ) {‘ .
    ‘var testing = jQuery(this).context.title;’ .
    ‘var caption = jQuery(this).data(\’caption\’) || \’\’;’ .
    ‘if ( item.type === \’image\’ && testing.length ) {‘ .
    ‘caption = (caption.length ? caption + \'<br />\’ : \’\’) + \'<p class=”caption-title”>\’+testing+\'</p>\’ ;’ .
    ‘}’ .
    ‘return caption;’ .

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Uncaught TypeError: Cannot read property ‘title’ of undefined’ is closed to new replies.