#74735 WPBakery replaced URLs in javascript incorrectly

Landing Forums Jupiter WordPress Theme WPBakery replaced URLs in javascript incorrectly

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • Seymour Segnit

    After upgrading WPBakery plugin to the latest version, some site behaviors have been changed.
    There’s a javascript block in a page looks like this:

    (...skipped...)
                var selectedDate = new Date(parseInt(selected)),
                  isodate = selectedDate.toISOString().substring(0, 19),
                  isodateembed = isodate.split(':').join('%'+'3A'),
                  efname = jQuery('#nf-field-68').val(),
                  localOption = {hour12: false, year: 'numeric', month: '2-digit', day: '2-digit', hour: '2-digit', minute: '2-digit', second: '2-digit'},
                  startLocal = selectedDate.toLocaleString('zh-cn', localOption).replace(/\//g, '-').replace(' ', 'T'),
                  endLocal = new Date(selectedDate.getTime() + 36e5).toLocaleString('zh-cn', localOption).replace(/\//g, '-').replace(' ', 'T'),
                  tzname = jstz.determine().name(),
                  calLocation = encodeURIComponent(https://www.magfast.com/launch-event/?WELCOME=${efname}&id=5a5fbd5e4c7a65.28214768&evergreen_webinar_start_utc=${isodate}&drip_first_name=${efname}&evcode=cons1),
                  calDescription = encodeURIComponent(`Your link to the event room is:
    https://www.magfast.com/launch-event/?WELCOME=${efname}&id=&evergreen_webinar_start_utc=${isodate}&drip_first_name=${efname}&evcode=cons1This is a fun, fast-paced special event.You will receive your gorgeous premium charger worth at least $30 FREE just for attending.1: Arrive early - a lot of folks booked for this.2: Use a laptop or desktop if possible - you want to see this stuff up close!3: Share on Facebook and we will upgrade your FREE gift to the surge-protected model valued at $40!Come early!
    https://www.magfast.com/launch-event/?WELCOME=${efname}&id=&evergreen_webinar_start_utc=${isodate}&drip_first_name=${efname}&evcode=cons1`),
                  share_url = /vsq/thanks/?date_start=${startLocal}&date_end=${endLocal}&timezone=${tzname}&title=FREE MAGFAST Wall Event&description=${calDescription}&location=${calLocation}&organizer=MAGFAST&organizer_email=hello@magfast.com&privacy=public,
                  event_url = '/launch-event/?WELCOME='+efname,
                  ehour = parseInt(selectedDate.format('HH')), //update to parse hour as 0-23 not 1-24 for next page
                  option24 = (("0" + (ehour - 1)).slice(-2)),
    (...skipped...)

    and the page rendered has the following output:

               var selectedDate = new Date(parseInt(selected)),
                  isodate = selectedDate.toISOString().substring(0, 19),
                  isodateembed = isodate.split(':').join('%'+'3A'),
                  efname = jQuery('#nf-field-68').val(),
                  localOption = {hour12: false, year: 'numeric', month: '2-digit', day: '2-digit', hour: '2-digit', minute: '2-digit', second: '2-digit'},
                  startLocal = selectedDate.toLocaleString('zh-cn', localOption).replace(/\//g, '-').replace(' ', 'T'),
                  endLocal = new Date(selectedDate.getTime() + 36e5).toLocaleString('zh-cn', localOption).replace(/\//g, '-').replace(' ', 'T'),
                  tzname = jstz.determine().name(),
                  calLocation = encodeURIComponent(https://www.magfast.com/launch-event/?WELCOME=${efname}&id=5a5fbd5e4c7a65.28214768&evergreen_webinar_start_utc=${isodate}&drip_first_name=${efname}&evcode=cons1),
                  calDescription = encodeURIComponent(`Your link to the event room is:
    <blockquote class="wp-embedded-content" data-secret="q9wJ2VuhNK"><a href="https://www.magfast.com/launch-event/">Launch Event</a></blockquote><iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted" style="position: absolute; clip: rect(1px, 1px, 1px, 1px);" title="“Launch Event” — MAGFAST Chargers. A Family of Premium Magnetic Chargers" src="https://www.magfast.com/launch-event/embed/#?secret=q9wJ2VuhNK" data-secret="q9wJ2VuhNK" width="600" height="338" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>This is a fun, fast-paced special event.You will receive your gorgeous premium charger worth at least $30 FREE just for attending.1: Arrive early - a lot of folks booked for this.2: Use a laptop or desktop if possible - you want to see this stuff up close!3: Share on Facebook and we will upgrade your FREE gift to the surge-protected model valued at $40!Come early!
    <blockquote class="wp-embedded-content" data-secret="aP5z8fxfbR"><a href="https://www.magfast.com/launch-event/">Launch Event</a></blockquote><iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted" style="position: absolute; clip: rect(1px, 1px, 1px, 1px);" title="“Launch Event” — MAGFAST Chargers. A Family of Premium Magnetic Chargers" src="https://www.magfast.com/launch-event/embed/#?secret=aP5z8fxfbR" data-secret="aP5z8fxfbR" width="600" height="338" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>`),
                  share_url = /vsq/thanks/?date_start=${startLocal}&date_end=${endLocal}&timezone=${tzname}&title=FREE MAGFAST Wall Event&description=${calDescription}&location=${calLocation}&organizer=MAGFAST&organizer_email=hello@magfast.com&privacy=public,
                  event_url = '/launch-event/?WELCOME='+efname,
                  ehour = parseInt(selectedDate.format('HH')), //update to parse hour as 0-23 not 1-24 for next page
                  option24 = (("0" + (ehour - 1)).slice(-2)),
    (...skipped...)

    Note the URLs in Description variable have been replaced incorrectly.
    This doesn’t happen with the previous version of WPBakery plugin. Is there any option to disable this rewrite inside javascript?

    Nodari Support Team

    Hello Seymour

    We need some more information about your problem, where can I see it and how to replicate it? can you also add a screenshot?

    We all updated Wpbackery plugin and we don’t have the same problem, it was also not reported from our customers, so, I think something special happens only on your site,

    For better assistance please include access details to your website in the ticket and mark it as a private

    Thanks

    Private
    Seymour Segnit
    This reply has been marked as private.
    Tatyana Hutsol Support Team

    Hello,

     

    I don’t see any problems in this content https://take.ms/qO5cJ .

    Could you please specify what is wrong there and show your screenshots?

     

    Much appreciated.

    Regards.

    Private
    Seymour Segnit
    This reply has been marked as private.
    Private
    Mohsin Al-Rabieai Support Team
    This reply has been marked as private.
    Private
    Seymour Segnit
    This reply has been marked as private.
    Mohsin Al-Rabieai Support Team

    Hi Seymour,

    Maybe if the WPBakery still processes it incorrectly, you can do it with defining a shortcode inside your child theme. It’s easy actually and required only 2 lines of code:

    https://www.wpbeginner.com/wp-tutorials/how-to-add-a-shortcode-in-wordpress/

    Can you try this as well?

    Bests

    Private
    Seymour Segnit
    This reply has been marked as private.
    Private
    Mohsin Al-Rabieai Support Team
    This reply has been marked as private.
Viewing 10 posts - 1 through 10 (of 10 total)
You must be logged in to reply to this topic. Login