Support » Plugin: Event Tickets and Registration » window.A11yDialog is not a constructor

  • Resolved garbagedisco

    (@garbagedisco)


    There seems to be an issue with event tickets and it prevents people buying tickets.

    I’m getting the following error which is relating to the JS file (dialog.min.js) added by Event Tickets Pro

    window.A11yDialog is not a constructor

    The setup is as follows
    WP 5.7
    Event Ticket: Version 5.1.1
    Event Ticket Pro: Version 5.2.1
    Event Calendar: Version 5.4.0.2
    Event Calendar Pro: Version 5.4.0.2

Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Contributor Juan Aldasoro

    (@juanfra)

    Hi,

    Thank you for reaching out to us! I hope you’re doing well.

    I’m sorry to hear that you’re experiencing this! Ideally that library shouldn’t be included in Events Calendar Pro, but it can be included in The Events Calendar (the free version) which looks outdated. The latest version of The Events Calendar is 5.5.0.1. Can you please try upgrading to that version?

    Best,
    Juan.

    Thread Starter garbagedisco

    (@garbagedisco)

    I think I wrote down the wrong numbers before sorry about that but I have updated tall again to the latest and this is still happening;

    Running:
    WP 5.7
    Event Ticket: Version 5.1.2.1
    Event Ticket Plus: Version 5.2.2.1
    Event Calendar: Version 5.5.0.1
    Event Calendar Pro: Version 5.5.0.2

    Error in console:

    jquery.min.js:2 jQuery.Deferred exception: window.A11yDialog is not a constructor TypeError: window.A11yDialog is not a constructor
        at https://example.com/wp-content/plugins/the-events-calendar/common/src/resources/js/dialog.min.js:1:267
        at Array.forEach (<anonymous>)
        at HTMLDocument.t.init (https://example.comk/wp-content/plugins/the-events-calendar/common/src/resources/js/dialog.min.js:1:220)
        at e (https://example.com/wp-includes/js/jquery/jquery.min.js:2:30005)
        at t (https://example.com/wp-includes/js/jquery/jquery.min.js:2:30307) undefined
    jquery.min.js:2 Uncaught TypeError: window.A11yDialog is not a constructor
        at dialog.min.js:1
        at Array.forEach (<anonymous>)
        at HTMLDocument.t.init (dialog.min.js:1)
        at e (jquery.min.js:2)
        at t (jquery.min.js:2)

    These errors only fire on pages where a ticket is added.

    It completely prevents the person from buying tickets.

    On a side note, I’ve noticed in my account that under websites nothing is listed at all, despite adding the api keys to the plugins, would this be related?

    Plugin Contributor Juan Aldasoro

    (@juanfra)

    Hi @garbagedisco,

    Thank you for the follow-up and the valuable information.

    Let me ask you a couple more questions:

    – Are you maybe using a plugin/theme that could be adding its own version of jQuery?
    – Are you using the Attendee Registration modal for these tickets you mention? Or they’re plain tickets without attendee fields?

    Thanks,
    Juan.

    Thread Starter garbagedisco

    (@garbagedisco)

    1: The theme I’m using is 100% custom built by myself and calls in jQuery from the Google CDN, just before the footer like so;

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
    <?php
    	wp_footer();
    ?>

    Originally I deregistered jQuery loading via WP to prevent 2 copies of the libary loading in.

    I have tested this with and without the jQuery loaded from Google’s CDN and the error remains in place with just the WP version.

    2: The attendee registration isn’t active, but they are limited quantities

    Thread Starter garbagedisco

    (@garbagedisco)

    Another small update on this.

    On my local machine running the site with a port number eg: http://localhost:4012 I don’t get the error and the user is able to purchase tickets

    On the staging server using a subdomain eg: (https://staging.example.com) it fails.

    Is this somehow related to the fact no domains/websites are added in my account?

    The setups are identical apart from the domain name.

    Plugin Contributor Juan Aldasoro

    (@juanfra)

    Hi @garbagedisco,

    Thank you for the follow-up.

    As WordPress already has its own version of jQuery it is highly discouraged to include any other version on the theme or from a plugin. That’s because there’s the possibility that it could trigger conflicts with the different jQuery versions and the implementations on top of it. The site, ideally, should use the jQuery version that comes with WordPress.

    I don’t think it could be related to the fact that is not registered in your account. That could be a thing when it comes to updates, but not this type of functionality. Have you performed the tests for conflicts? It not, I’d kindly ask you to do so.

    Best,
    Juan.

    Thread Starter garbagedisco

    (@garbagedisco)

    Hi again,

    I totally agree that disabling it isn’t an idea approach to take if you use a lot of plugins, I very rarely use anything other than ACF Pro so its not an issue for me normally.

    After disabling all plugins and switching to the 2021 theme I still have the same error

    jquery.min.js?ver=3.5.1:2 jQuery.Deferred exception: window.A11yDialog is not a constructor TypeError: window.A11yDialog is not a constructor
        at https://example.com/wp-content/plugins/the-events-calendar/common/src/resources/js/dialog.min.js?ver=4.13.0.1:1:267
        at Array.forEach (<anonymous>)
        at HTMLDocument.t.init (https://example.com/wp-content/plugins/the-events-calendar/common/src/resources/js/dialog.min.js?ver=4.13.0.1:1:220)
        at e (https://example.com/wp-includes/js/jquery/jquery.min.js?ver=3.5.1:2:30005)
        at t (https://example.com/wp-includes/js/jquery/jquery.min.js?ver=3.5.1:2:30307) undefined
    S.Deferred.exceptionHook @ jquery.min.js?ver=3.5.1:2
    t @ jquery.min.js?ver=3.5.1:2
    setTimeout (async)
    (anonymous) @ jquery.min.js?ver=3.5.1:2
    c @ jquery.min.js?ver=3.5.1:2
    fireWith @ jquery.min.js?ver=3.5.1:2
    fire @ jquery.min.js?ver=3.5.1:2
    c @ jquery.min.js?ver=3.5.1:2
    fireWith @ jquery.min.js?ver=3.5.1:2
    ready @ jquery.min.js?ver=3.5.1:2
    B @ jquery.min.js?ver=3.5.1:2
    jquery.min.js?ver=3.5.1:2 Uncaught TypeError: window.A11yDialog is not a constructor
        at dialog.min.js?ver=4.13.0.1:1
        at Array.forEach (<anonymous>)
        at HTMLDocument.t.init (dialog.min.js?ver=4.13.0.1:1)
        at e (jquery.min.js?ver=3.5.1:2)
        at t (jquery.min.js?ver=3.5.1:2)

    This is running in Chrome Version 89.0.4389.114 (Official Build) (x86_64) on a Mac
    (I should have mentioned that at the start)

    The same issue is present in Firefox 87.0 (64-bit) – also a Mac

    Plugin Contributor Juan Aldasoro

    (@juanfra)

    Hi,

    Thank you for the follow-up.

    Is there any chance I can check that on your site? I can’t replicate in my install.

    Best,
    Juan.

    Thread Starter garbagedisco

    (@garbagedisco)

    Yes of course, I’ll contact you via slack with the login

    Plugin Contributor Juan Aldasoro

    (@juanfra)

    Thanks @garbagedisco!

    As a follow-up of what we chatted about, the JS library was excluded in your site. I will mark this one as resolved, but please let me know if you need further assistance.

    Have a fantastic day 🎉
    Juan.

    Thread Starter garbagedisco

    (@garbagedisco)

    Just confirming that this is now working as expected.

    For anyone who might have the same issue at any point, I had a blanket exclude on node_modules directories in my .gitignore file, this was causing a required file within the plugin to be excluded from the deployment.

    This can now be considered as closed, thanks again for the help @juanfra

    @garbagedisco Thank you for posting the solution, I had the exact same issue with my .gitignore ignoring node modules via a blanket exclude. I always wondered what the odds were that a plugin would pull a file right from node_modules lol

    • This reply was modified 2 years, 6 months ago by jakobmetro.

    +1 to garbagedisco for posting the solution.

    @juanfra no other plugin I’ve come across has ever included a node_modules folder in their distro. Developers typically do not commit these files into their repository. It would be great if these files could be moved into a different folder to help prevent future issues.

    Concur with @redwiregareth. You should 100% be doing a build task to include the used modules into your final .js file.

    I’ve just had this same issue.

    Just adding my solution here… My SiteGround caching plugin was deferring render-blocking JavaScript. I turned that off which fixed the issue.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘window.A11yDialog is not a constructor’ is closed to new replies.