Issue removing custom js from page

Hi there,

I have a staging website here:


I updated PRO and WPML.

The issue is, that in certain language variants of the contact us page (kapcsolat), there is an extra line at the bottom of the page displaying " n".

Now, after some inspection, I managed to find that these pages have a certain custom js applied to them, so I tried to remove them. After I save the changes and reload the website, the custom js does not get updated, and still displays the code that should have been deleted. I tried testing for plugin conflicts, made sure everything relevant was up to date.

Can you help?

Thanks, will attach a login.

Hi @Pbalazs89,

Thanks for reaching out.
I have checked and found that you have added the script with the n in the Page JS and also added the script tag, which is not needed while adding the script through the Page JS or Global JS.
Your code will look like the following.

function gtag_report_conversion(url) 
{
    var callback = function() 
    {
        if (typeof(url) != 'undefined') 
        {
            window.location = url;
        }
    };
    gtag('event', 'conversion', {
         'send_to': 'AW-811953955/Et6zCP29gNADEKPelYMD',
        'value': 1000.0,
        'currency': 'HUF',
        'event_callback': callback
    });
    return false;
}

Please remember that the above code will work if copied as it is and doesn’t conflict with any existing style.
Please note that the code provided serves only as a guide to help you get started custom coding on your own if there’s no option offered in our theme or the products we bundle.
We really do not provide support for custom codes which means we can’t fix it in case it conflicts with something on your site nor will we enhance it. Further customization should be directed to a third-party developer or you can avail of One, where we answer the questions beyond normal theme support.

Thanks

Hi Tristup, Thanks for checking, but this is exactly my issue. I can’t delete the code from Page JS. I delete, save, and then refresh the editor, and the code reappears. Is it possible to delete this from the database, or what would you suggest?

Hi @Pbalazs89,

I have checked and found the problem you described here. It seems that the issue is related to the Server Level Cache, I would suggest you contact your hosting provider to purge all the server-level cache and let us know if you find the same issue after that.

Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.