Not able to replace a file with its new version when it contains particular line | XM Community
Solved

Not able to replace a file with its new version when it contains particular line

  • 15 August 2019
  • 1 reply
  • 14 views

Userlevel 5
Badge +6
  • Level 3 ●●●
  • 197 replies
Hallo,
I have a file with scripts stored in the files library. It is used in many surveys created by different people. I've written a new version of one of its functions and therefore I need to replace the current file with a new one. So far I have been doing this by clicking "Edit" and "Choose another file from your computer". Unfortunately, this time it doesn't work. I found out that the problem is in this line of my script: `jQuery('#scriptDiv').html('<script async defer crossorigin="anonymous" src="https://connect.facebook.net/'+ lang + '/sdk.js#xfbml=1&version=v3.0"></script>'); ` When I remove it, everything works fine. I'm also able to upload my script with this line as a new file. However, this doesn't solve my problem since I need to use the original URL which is already used by many surveys. Would anyone have an idea what to do with this?
icon

Best answer by fleb 16 August 2019, 13:48

View original

1 reply

Userlevel 5
Badge +6
Finally, I asked my coworker and he found out, that the problem was that Qualtrics tried to automatically recognize the type of file and suggested to modify the problematic line in following way: `jQuery('#scriptDiv').html('<' + 'script async defer crossorigin="anonymous" src="https://connect.facebook.net/'+ lang + '/sdk.js#xfbml=1&version=v3.0"></script>');` which solved my problem.

Leave a Reply