Fixed Enabling variations on child styles where the parent doesn't have variations misses most variation settings

willl

Well-known member
Affected version
2.3 Beta 4
In XF2.3 Beta 4, when you create a child style and enable variations on that child style, only a handful of style properties will actually have variations available if the parent doesn't have variations enabled.

Not entirely sure if this is a bug or "as expected", but I imagine most would find it useful to be able to create a version of a parent style with variations rather than having to re-invent the wheel on the style (allowing you to maintain common template updates and the like from the parent).
 
I can't reproduce this. Can you clarify which ones are missing? Only a handful of style properties have variations available to begin with (just color properties and the logo in the default style, I think), but even when the parent style has variations disabled the child style isn't missing any.
 
Most critically is all style properties under Color Palette and Basic Colors except for the following (under Basic Colors):

User-generated content link color
User-generated link hover color
Page chrome background color
Page chrome text color
Page sub-navigation background
Block footer text color
Text input box text color

and everything under Selected Items, Message state sections and Voting.

Essentially, if it's going to get flagged as inherited from the parent style (in this case one of our custom styles we've updated for 2.3 without using variations, which is in designer mode) it won't have variations available.
 
I still haven't been able to reproduce this locally, but it implies the has_variations flag of the property definition (separate from the style toggle) hasn't propagated down to all child style properties. It should be set regardless of the style toggle.

It's not obvious to me why this would be the case, but it's possible there's a code path I'm not seeing so I'll try a few other things. I take it this was an upgrade from 2.2 and the parent style had the properties customized prior to the upgrade? Was the child style added before or after 2.3?
 
Could it be related to the style import bug?

 
I still haven't been able to reproduce this locally, but it implies the has_variations flag of the property definition (separate from the style toggle) hasn't propagated down to all child style properties. It should be set regardless of the style toggle.

It's not obvious to me why this would be the case, but it's possible there's a code path I'm not seeing so I'll try a few other things. I take it this was an upgrade from 2.2 and the parent style had the properties customized prior to the upgrade? Was the child style added before or after 2.3?

Here's the core path of everything built:

Installed XF2.3 -> Copied addons & styles (designer-mode files) over to XF2.3 and installed them via CLI -> Disabled variations on all styles and updated all the templates to work with XF 2.3 -> Created a new child style under one of the upgraded styles, with Variations enabled on that child style.
 
More info here: Attempted to export a style with the latest update and import, turning on variations, and same issue.

Also attempted to set variations on the original style, same issue.

Wondering if this is impacting styles with designer mode enabled?
 
More info here: Attempted to export a style with the latest update and import, turning on variations, and same issue.

Also attempted to set variations on the original style, same issue.

Wondering if this is impacting styles with designer mode enabled?

Jeremy says it might be related. Reverting (and refreshing) fixes it for now.
 
Yeah, I think this mostly impacts imports of styles originally created in earlier versions of XF (whether imported from XML/archives or designer mode).
 
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.3.0 Beta 7).

Change log:
Inherit pushed parent property fields during designer mode imports
There may be a delay before changes are rolled out to the XenForo Community.
 
I was hoping to get to this in time for beta 6, but the changes required were a little different from the other report even though the underlying concept is the same. In future versions, we'll effectively ignore everything but the value if you're importing a property that is inherited. Note that this doesn't apply retroactively so you'll have to create a new style (or revert the properties) and import again.

Let me know if you run into further issues but this seemed to be handled properly in my tests.
 
Back
Top Bottom