elegantthemes / Divi-Beta

8 stars 0 forks source link

D5 :: bug with a disabled background on a D4 module #101

Open elzadj opened 1 month ago

elzadj commented 1 month ago

Problem Description

  1. Describe what you did When we import a D4 Module with Background -> 'Use background colour' set to No, the background gets the first palette colour, i.e. blue by default.

  2. Describe what you expected to happen The module (a simple CTA in that case) should look like this: -Maxi-Theme-Dev-10-18-2024_03_53_PM

  3. Describe what actually happened Instead, we get the blue bg on D5:

-MaxiBlocks-10-18-2024_04_05_PM

D4-cta-test-MaxiBlocks-10-18-2024_04_33_PM

D5 generates code for CTA with "unknownAttributes":{"use_background_color":"off"} :

<!-- wp:divi/placeholder --><!-- wp:divi/section -->
<!-- wp:divi/row {"module":{"advanced":{"columnStructure":{"desktop":{"value":"4_4"}}}}} -->
<!-- wp:divi/column {"module":{"advanced":{"type":{"desktop":{"value":"4_4"}}}}} -->
<!-- wp:divi/cta {"title":{"innerContent":{"desktop":{"value":"D4: cta"}},"decoration":{"font":{"font":{"desktop":{"value":{"color":"#000000"}}}}}},"content":{"decoration":{"bodyFont":{"body":{"font":{"desktop":{"value":{"color":"#000000"}}}}}},"innerContent":{"desktop":{"value":"\u003cp\u003eYour content goes here. Edit or remove this text inline or in the module Content settings. You can also style every aspect of this content in the module Design settings and even apply custom CSS to this text in the module Advanced settings.\u003c/p\u003e"}}},"button":{"innerContent":{"desktop":{"value":{"text":"Click Here"}}}},"builderVersion":"4.27.2","modulePreset":"default","unknownAttributes":{"use_background_color":"off","template_type":"module"}} /-->
<!-- /wp:divi/column -->
<!-- /wp:divi/row -->
<!-- /wp:divi/section --><!-- /wp:divi/placeholder -->

Detailed Steps To Reproduce

Please provide a detailed list of exact steps that reproduce the issue.

  1. Create a simple CTA on D4, disable the Use background colour in the Background settings: -Maxi-Theme-Dev-10-18-2024_04_37_PM

  2. Export it, and then import into D5, here is an example json for import: D4 test CTA.json

  3. Add imported module to a page, check the BG.

System Information