After removing 3rd Party Bric, Blocs still publishes JS & CSS

I published and uploaded a Site for a customer, and a few days later their Webmaster called me up and wanted to know “what all those strange JS & CSS files” on the server were used for.

So after some testing I found out the following:

If I add a 3rd party Bric to a page, and then delete it at some later date, Blocs still publishes the JS & CSS files for the 3rd party Bric, even though it is not used anymore in the project.

Furthermore, the linked references to the 3rd party Bric are still written in the source code.

So if you like to experiment or try out a 3rd party Bric, just bear in mind that the code is there forever. Once you add something you can’t go back.

Not good.

This is indeed a particularity in Blocs, the files are not removed from the page simply by deleting the bric. Actually you can go to the page settings and remove the files from there.

1 Like

As Lucas mentioned the page attachments will need to be removed manually and I agree it is not ideal, but something that would normally be spotted automatically when checking pages for Seo and other settings before upload. This applies to all brics that require page attachments from what I can tell.

As Flashman says you need to remove them manually from global project settings if you are not using them. We had the same problem with duplication. Since it includes on the page where owl is used and also in global project area. Just remove them from global and it will be fine.

It should remove resources when the last instance of a bric is deleted. I’m going to check in on this for the next wave of updates to the developer API.

3 Likes