When importing a template that contains a class name that already exists in the installation, the __imported class name suffix is added by default. But only if the class name’s unique identifiers differ (those are not visible in the UI). Which is not the case when using ACSS classes as they come with a hard-coded identifier, that is the same on every installation.
But it might be best to not run this suffix __imported logic by default, and provide a setting for it instead. That way class names that already exist, are simply skipped by default.
I can’t replicate this issue? Could you share some temporary admin login details via PM with me, so I can have a look at your site?
Could you explain in more detail what you mean by that?
If you could share a short screencast in your PM as well, that’d be perfect. Thank you.
Imported the template, every class had an added __imported. Quite a few classes that I then had to delete. Hopefully there is a faster way to deleted unused classes as having to wait on your alert “Global Class Deleted” while I manually deleted what seemed like hundreds of classes was tedious.
I’d done a wee bit of work after my last backup and thought I should have a look at the shades of some of my colours. I made the mistake of importing the template without doing another backup.
On another site with an earlier version of Bricks I was able to import this template successfully but have since updated that site, as well, to Bricks 1.5 RC2.
Without the ability to import a template without Bricks messing with the classes means I’ll have to drop back to an earlier version until I find one that imports properly.
I was about to post this as a bug also, when I found this report. Imported Guillermo Dewey’s template to show ACSS colours and get all of the ACSS classes duplicated but with __imported added, plus they have no styling attributed to them, so the already existing ACSS styling doesn’t get used.
Now have to go through every imported style and delete it… Is there no way currently to select multiple classes and delete them?
@thomas Can you take a look at how Cwicly’s is handling classes? It has an external class manager (I know this will come to Bricks in future) with folders/buckets. You can set a color for the folder/bucket, import/export classes and all classes in the editor will show with that color to differentiate. Regarding import may be you can give an option to avoid importing classes with same name or import them with _imported.
Hi, it looks like even when deleting the imported layout with the misnamed classes the classes stay in the database in the options table (bricks_global_classes). Since there is no external way of managing imported or custom classes (if I understand this correctly), would a question “hey these clasdes already exist in the system. What do you want to do?” (overwrite, duplicate [here is where you add __imported], no not import) be a temporary solution? I’m not sure how difficult this is to do or implements but not having a place to manage imported classes that stay in the system is less then optimal.
Alternatively if all elements on this page are deleted, can you delete the imported classes as well?