• Resolved webworka

    (@webworka)


    Hi,

    I have a page running that uses the Plugin Ad-Inserter Pro. This Plugin brings some inline Javascript to tha page, having this line of Code:

    name=name.replace(/[\[\]]/g,"\\$&");

    If I activate the CDN option in W3TC this line is replaced with this one:

    name=name.replace(https://{mycdnurl}/[\[\]]/g,"\\$&")
    Where {mycdnurl} is the URL of our CDN.

    This breaks the whole javascript because the syntax is no longer valid. Also this does not make any sense.

    Is there a way to disable the inline replacement of the CD-URL?

    Best Regards,
    Oliver

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter webworka

    (@webworka)

    I found the problem :-/

    The reason was a misconfiguration in the advanced section of the CDN settings. The field Custom file list: had one line with the domain name of the page in it. This lead to a strange replacement in the inside js and also the action of form elements.

    I removed the line and now everything works fine.

    Plugin Contributor gidomanders

    (@gidomanders)

    Good to hear you solved the problem! We were trying to find the problem in the code but had not found anything yet, so we’re glad we can mark this as non-issue.

    • This reply was modified 6 years, 9 months ago by gidomanders.
    Thread Starter webworka

    (@webworka)

    Just as an remark: This misconfiguration also has the affect that you can no longer login to the backend because the action of the login-form is also replaced with the CDN-URL

    Plugin Contributor gidomanders

    (@gidomanders)

    I’ll see if we can do something about that ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘CDN URL is inserted into inline Javascript’ is closed to new replies.