The function conditional_fields_load_dependencies() is unable to return its values in a sensible order because of the way it builds it's references across two different keys with only a single query. This is most probably fine in most places, but it does cause problems in features where the ability to diff a features change is important.

The function conditional_fields_features_export_render() will the same output in a different order depending on other non-featured changes that you might make, or when you come to apply the same feature on different sites. This means that a feature in it's default state will actually have code changes when you come to update - and then it's a pain for me to have to diff the file to find if it's actually changed or if only the order has changed.

The short answer is, around line 52 we need this:

      $info = $dependencies[$entity][$bundle];
      ksort($info['dependents']);

Apologies if this sounds rather direct - the problem is far more complicated (to explain) than it is to fix!

Comments

SocialNicheGuru’s picture

where does this apply?

peterpoe’s picture

Issue summary: View changes
Status: Active » Fixed

Committed, thanks.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.