Forum Discussion

Michael_Jenkins's avatar
Michael_Jenkins
Icon for Cirrostratus rankCirrostratus
Jun 01, 2015

<apm_do_not_touch> in JS file failing</apm_do_not_touch>

So we have an application that uses the @cc_on statement within a javascript file, and the APM is trying to rewrite it. Problem is (as stated in SOL3910) that the rewrite breaks the code because it doesn't rewrite properly.

 

According the the SOL3910, adding the tag around an HTML element works to tell APM to ignore rewriting this section. The problem is that this fix doesn't (fully) work in JS files because the tag is an html tag.

 

While adding the tag around the section will work to keep APM from rewriting the code, because it's in a JS file, the syntax is invalid and causes other JS errors. I've tried embedding the tag in a comment (many different ways) but it doesn't work, and APM will continue to rewrite the code.

 

I doubt there's a javscript statement we can use to do the same thing here and cause APM to ignore rewriting it, but wanted to see if anyone else had a similar issue before or ideas on resolution.

 

  • Hello Michael, 

     

    Sorry for bumping your thread, but do you have found a solution to your problems ?

     

    Best regards,

  • APM_DO_NOT_TOUCH is a part of the HTML-rewrite-patcher, there isn't a corresponding one for JS files.

    You might want to try "minimal patching" mode:

    There are also some other settings such as "javascript patching" which you can disable.

     

    We generally recommend to avoid usage of Portal Access for new deployments. The primary reason it was developed was for older web apps that required multiple hosts and ports that were difficult to tunnel through a single URL. Modern apps typically do not have this concern and can be published with a single DNS enty / port combination.