I'm having an issue with a feature that is sometimes overridden and sometimes not. It varies from machine from machine and even on individual machines. I found that one of the exported fields (of type commentfield) was using a mix of numeric and string keys in the instance settings. ksort() doesn't exactly like this and results in inconsistent results. Using a natural sort would guarantee consistent results from the sort each time.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

BassistJimmyJam’s picture

Status: Active » Needs review
FileSize
393 bytes

Patch attached. Unfortunately, the flag SORT_NATURAL was not added until PHP 5.4 so I had to be a bit more creative.

logaritmisk’s picture

Status: Needs review » Reviewed & tested by the community

I have this patch on a features heavy site in production and everything is working fine.

mpotter’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
FileSize
402 bytes

Trying to get this to pass the testbot.

mpotter’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 425d04c. Need to keep an eye on any features Overridden caused by this patch.

Status: Fixed » Closed (fixed)

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