I’ve encountered another discrepancy between local preview and published CMS-generated pages in Bootstrap Studio 9.
When JavaScript and CSS files are configured to be visible only on a CMS page template, the JavaScript works correctly in local preview but is missing from the published CMS-generated pages.
Steps to reproduce
-
Create a CMS page template and associated CMS records.
-
Add a custom JavaScript file to the project.
-
Using the file’s Visibility settings, enable it only for the CMS page template.
-
Open a CMS-generated page in local preview and verify that the JavaScript executes.
-
Publish the website.
-
Open the same CMS-generated page in production.
Expected behavior
CMS-generated pages should inherit the asset visibility settings of their associated template, consistently across local preview, export and publishing.
Actual behavior
The JavaScript executes correctly in local preview but is missing from the combined script.min.js file served to the published CMS-generated page.
Workaround
Changing the visibility settings to include all pages, republishing and clearing the CDN cache resolves the issue.
I’ve successfully verified this workaround in production across multiple CMS-generated articles.
Although I encountered this issue while integrating both JavaScript and CSS files, I’ve specifically confirmed the JavaScript omission. CSS may be similarly affected.
It appears that the export process may not be inheriting asset visibility settings from CMS page templates when generating individual pages.
Thank you!