Developer forum

Forum » Dynamicweb 9.0 Upgrade issues » 9.10.12: ColorSwatch outputs name of color instead of value when using GetString()

9.10.12: ColorSwatch outputs name of color instead of value when using GetString()

Roald Haahr
Reply

We recently upgraded a project from 9.9.5 to 9.10.12 and now colors in emails are all messed up. The reason, I discovered, is that GetString now produces the name of the color rather than the HEX code. Using GetValue will product that value. The website is running Rapido 3.4.2, so just a headsup for other Rapido users facing this problem after upgrade. One problem is the line in EmailHelpers.cshtml.

Converter.ToString(Pageview.AreaSettings.GetItem("Layout").GetItem("Emails").GetString("HeaderAndFooterFontColor")) (Will output name of the color)
Converter.ToString(Pageview.AreaSettings.GetItem("Layout").GetItem("Emails").GetValue("HeaderAndFooterFontColor")) (Will output HEX code)

Replies

 
Frederik Rossen
Frederik Rossen
Reply

Any updates on this? 

I just upgraded a project for a customer and we've used the method above to inline-style certain elements according to the brandcolors selected in the backend, and I need to know if I should use GetValue in the future, or if its an error that will be fixed in the next minor update.

 
Frederik Rossen
Frederik Rossen
Reply
This post has been marked as an answer

Update: I just got a response from support, and they're saying this new behaviour is intended.

Votes for this answer: 1

 

You must be logged in to post in the forum