Trouble with Custom Code Not Rendering Correctly in Wix Studio

Hello

I’m working on a custom website design in Wix Studio & I’m encountering an issue where my custom JavaScript code isn’t rendering correctly on the live site. The code works fine in the preview mode but once the site is published, certain elements fail to load as expected & I get an error in the browser’s developer console. :slightly_smiling_face:

I’ve double-checked the code for any syntax issues and even tried simplifying it; but the issue persists. :innocent:

The specific problem involves dynamically loaded content that relies on a third-party API. In preview mode; the API calls seem to be working fine, but after publishing, I’m getting intermittent failures where the content doesn’t load, and no data is returned. I’ve also tested the API calls directly through a different platform & they work fine there, so I’m wondering if there’s a problem with the way Wix Studio handles external calls in production. :innocent:

Has anyone else run into similar issues with custom JavaScript code not functioning as expected after publishing a Wix Studio site? :thinking: Checked https://support.wix.com/en/article/studio-editor-adding-a-custom-element- splunk admin documentation guide for reference .

Any suggestions on how to debug this, or any known best practices for using external APIs in Wix Studio; would be greatly appreciated.

Thank you ! :slightly_smiling_face: