Bug: Asset visibility settings not respected when exporting CMS-generated pages

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

  1. Create a CMS page template and associated CMS records.

  2. Add a custom JavaScript file to the project.

  3. Using the file’s Visibility settings, enable it only for the CMS page template.

  4. Open a CMS-generated page in local preview and verify that the JavaScript executes.

  5. Publish the website.

  6. 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!

Thank you for this and the other reports! We will fix this in our upcoming release next week.

The reason for these discrepancies is that the app has so many features that it will take a while to go through everything and make it works logically with the CMS. But we’re getting there and these bug reports help a lot!