Thank you for the fantastic Bricks 2.0 beta—new component variations are an absolute game-changer. While testing today’s beta, I encountered two separate issues in the Builder. You can reproduce both with the same simple component:
Reproduction Steps
Create a component, e.g.: div with class .card .
Add a Global Classes property with two options:
card--primary
card--secondary
Connect that Global Classes property to the component’s class attribute.
Select the component instance and choose the “Primary” variant.
Save and Refresh the Builder.
Bug 1. PHP Warning with External Files
With CSS Loading Method set to External Files, saving and refreshing produces this warning:
Warning: foreach() argument must be of type array|object, string given
in …/bricks/includes/assets.php on line 3271
Switching to Inline Styles removes the warning.
Bug 2. Component Classes Order Resets on Save/Refresh
When you select a variant on the component instance, the Builder initially applies styles in the correct order (base .card first, then .card--primary).
After you save and refresh the builder, the variant <style> block is injected before the base <style>, so the .card--primary rules no longer override the base styles:
thank you for your report. First, it’s better if you create the separate reports, if there are two issues. That way, we can link the correct internal tasks to the correct reports - and we can link other reports to this topic as well.
But, checking the reports:
#1: I was unable to replicate this issue. Can you send me your component, just to check if I can replicate it with yours?
#2: Yep, I was able to replicate this one, and I’ve added it to the bug tracker.