I had a couple of Nodequeues added to a feature and was finding that they were showing up as 'Overridden' even though I hadn't really made any changes. Reverting the feature didn't affect this status. It turns out that the entries for a queue in the nodequeue_roles and nodequeue_types tables maybe stored in a different order to what's specified in the features's default settings. The order in which the data is stored doesn't really affect functionality but it does affect the Feature's status because Features module uses MD5 hashes (of the code required to create each nodequeue) to work out what has and hasn't changed.

To fix this issue we simply need to ignore the ordering of the items in the 'roles' and 'types' arrays. We do this by sorting these arrays once loaded in the the fe_nodequeue_queue_features_export_render() method.

Patch attached.

Comments

hiddentao’s picture

Status: Needs review » Patch (to be ported)
13rac1’s picture

Status: Patch (to be ported) » Needs review
StatusFileSize
new796 bytes
new1.16 KB

Patch fixes broken "Overridden" status on features supplying Nodequeues. Two files attached:

Applying all three to current dev:

user@dev:/var/www/sites/all/modules/features_extra$ patch -p0 < features_extra-features_get_default.patch
patching file fe_block.module
patching file fe_nodequeue.module
patching file fe_taxonomy.module
user@dev:/var/www/sites/all/modules/features_extra$ patch -p0 < features_extra-769660.patch
patching file fe_block.module
patching file fe_nodequeue.module
patching file fe_taxonomy.module
user@dev:/var/www/sites/all/modules/features_extra$ patch -p0 < fe_nodequeue-array-ordering-879588-769660.patch
patching file fe_nodequeue.module
kmonty’s picture

sub

wizonesolutions’s picture

Status: Needs review » Fixed
StatusFileSize
new878 bytes

Thank you for the contribution! Committed to 6.x-1.x (modified patch attached).

wizonesolutions’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Status: Fixed » Patch (to be ported)

Actually, this might need porting. toleillo, if this is not an issue in 7.x-1.x, please mark fixed.

toleillo’s picture

Status: Patch (to be ported) » Needs review
pfrenssen’s picture

Status: Needs review » Fixed

This has been fixed in commit 9f11aac almost two years ago.

Status: Fixed » Closed (fixed)

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