• Resolved wordpressjuval

    (@wordpressjuval)


    Hello,
    5.3.1 (in case you were wondering)

    I’ve run into an issue with updating my signing secret for stripe. Attempting to change it will always revert to the previous value. Inspection on the page showed javascript errors (export keyword was unexpected).

    I have identified a quick fix: there seems to have been a double import – where tec-ky-module was in the tribe_assets list in main.

    That is unnecessary as an import, as this is already imported by tec-ky.js

    I simply commented the line

    //[ ‘tec-ky-module’, ‘vendor/ky/ky.js’, [], null, [ ‘module’ => true ] ],

    in common/src/Tribe/Main.php

    as a workaround.

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

    (@juanfra)

    Hi @wordpressjuval,

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

    I was unable to reproduce that, unfortunately. Are you using any other plugin that could be also including the ky library?

    Best,
    Juan.

    Thread Starter wordpressjuval

    (@wordpressjuval)

    Honestly I don’t know for certain – and I don’t want to mess with it too much right now (I’m messing about on a production site and I’m trying to sell tickets, I already lost a sale or two as a result of this ) – but I do seem to recall it happening even when I disabled most plugins.

    (btw – keeping that comment on also broke the payment so I had to put it back)

    this is still happening, the minute I enter the stripe settings page.

    and as far as ky library, best I could do to guess right now is:
    $ find . -name ‘ky.*’
    ./event-tickets/common/vendor/ky/ky.min.js
    ./the-events-calendar/common/vendor/ky/ky.min.js

    Plugin Contributor Juan Aldasoro

    (@juanfra)

    Hi @wordpressjuval,

    Thank you for the information.

    Can you please check if the ky library is imported as type="module" in your admin?

    Yes, commenting that line will prevent the asset to be registered and as a result, the checkout won’t be working. In the meantime, I’d highly recommend you not to comment it.

    Perfect, those two files you shared are from our common module, which is kind of the submodule that we use for common functionality. That should be loaded only once.

    Would you please share your WP, The Events Calendar, and Event Tickets versions with me?

    Best,
    Juan.

    Thread Starter wordpressjuval

    (@wordpressjuval)

    I’m not sure how to check your first question for certain, but it doesn’t appear to be so:

    <script src=’XXXXXXXXXXXXX/wp-content/plugins/event-tickets/common/vendor/ky/ky.min.js?ver=4.14.16′ id=’tec-ky-module-js’></script>
    <script src=’XXXXXXXXX/wp-content/plugins/event-tickets/common/vendor/ky/tec-ky.js?ver=4.14.16′ id=’tec-ky-js’></script>

    event tickets is 5.3.1
    calendar is 5.14.1

    WP is 5.9.2

    error from the console is as expected tbh:
    Uncaught SyntaxError: Unexpected token ‘export’
    Uncaught SyntaxError: Cannot use import statement outside a module

    First error line was in ky.min.js?ver=4.14.16:8
    second was tec-ky.js?ver=4.14.6:1

    I also have a warning message about no paypal launch being found but I assume that’s to be expected since it’s not meant to be enabled.

    N

    let me know how else I can help in debugging ??

    Plugin Contributor Juan Aldasoro

    (@juanfra)

    Thank you for the follow-up. This is helpful!

    Indeed, what’s happening is that your script doesn’t have the type="module", hence that script is not “treated” as module and it’s triggering that error.

    Is this happening only in the admin section? Or is it also happening while trying to check-out? Are you using any plugin that could be trying to optimize JavaScript or anything like that?

    Best,
    Juan.

    Thread Starter wordpressjuval

    (@wordpressjuval)

    Hi!

    It appears to be only happening in the admin section – in the tickets-checkout I get the following:

    <script type=”module” src=’https://XXXXX/wp-content/plugins/event-tickets/common/vendor/ky/ky.min.js?ver=4.14.16&#8242; id=’tec-ky-module-js’></script>
    <script type=”module” src=’https://xxxxx/wp-content/plugins/event-tickets/common/vendor/ky/tec-ky.js?ver=4.14.16&#8242; id=’tec-ky-js’></script>

    Plugin Contributor Juan Aldasoro

    (@juanfra)

    Hi @wordpressjuval,

    Thanks for the follow-up.

    Are you using The Events Calendar on your site as well? If so, which version?

    Best,
    Juan.

    Thread Starter wordpressjuval

    (@wordpressjuval)

    sent in a previous post – events calendar is 5.14.1

    Plugin Contributor Juan Aldasoro

    (@juanfra)

    Sorry for that, I must have missed it.

    Which host are you on? Are you using any plugin that could be trimming the type="module" from the JavaScript libraries that we mentioned above?

    Best,
    Juan.

    Thread Starter wordpressjuval

    (@wordpressjuval)

    Hi Juan!

    Truthfully I don’t know to answer your questions fully –

    The host I’m running on is a self hosted virtualized – with a rather low version of ubuntu (I can’t do a distupgrade because of reasons of my hosting provider) – using plesk.

    The plugins that are activated – not sure what would strip anything out – but I have the following:

    akismet 4.2.2
    amr shortcode any widget 4.0

    colorlib 404 customizer 1.0.96
    colorlib login cust 1.3.1
    conditional field contract form 7 2.1.2
    contact form 7 5.5.6
    event tickets 55.3.1
    fancybox for wordpress 3.3.3
    gdpr cookie consent 2.1.1
    jetback 10.7
    pixelyoursite 8.2.18
    shapely companion 1.2.6
    simple custom post order 2.5.6
    events calendar 5.14.1
    yoast duplicat post 4.4
    yoast seo 18.4.1

    if you have any suggestions as to which one you want me to deactivate happy to test – but I don’t want to mess about too much since it’s a production set up.

    Thread Starter wordpressjuval

    (@wordpressjuval)

    btw I already tested it without the shapely companion, fancybox and amr shortcodes (a few candidates I picked out). Still same problem.

    Plugin Support Abz

    (@abzlevelup)

    Hello @wordpressjuval,

    Thanks for getting back to us. We do not recommend it doing on your production site — it would be best if you could do the testing on a Staging Site.

    Could you try to deactivate all other plugins except for our plugins to see if that makes a difference and make sure that the plugins are up-to-date? Moreover, could you switch to the default theme? Please read carefully the article about Testing for Conflicts before doing anything.

    I would also suggest using a third-party plugin, Health Check Plugin — this plugin can be really helpful when testing for conflicts.

    Let me know how it goes on your end.

    Best,
    Abz

    Thread Starter wordpressjuval

    (@wordpressjuval)

    Ah! I found the culprit! Unfortunately I couldn’t do as you described (since there is no staging site, sadly. I’m too lazy to do the right thing) – but I was able to mess with the themes a bit. Checked all the plugins, didn’t realize themes can mess the admin console so much.

    The offender is the theme “shapely”. It is up-to-date but they might be doing something funky. Haven’t had the chance to dig in yet on why.

    Thank you very much for the assist. I’ll go find some functioning themes.

    God I hate WordPress sometimes ??

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Changing signing secret for stripe fails silently + fix’ is closed to new replies.