feature revert for an exported rules didn't work for me using latest dev version, though reverting using the rules ui worked fine

Comments

fago’s picture

Title: Feature revert doesn't » Rules always appear as overridden.

I tracked the bug down - the problem is not reverting but that it just appears always as overridden.

See #1062526: components appear always overridden if the default hook makes use of a hook-group for the bugfix.

fago’s picture

Title: Rules always appear as overridden. » Rules always appear as overridden in Features
dasjo’s picture

yep, reverting works. also features containing rules are detected to be overridden/default correctly.

so, i guess we just need the rules ui to reflect this correctly :)

fago’s picture

Status: Active » Fixed

With the mentioned issue committed, this should be fixed. Please re-open if there are still troubles.

dasjo’s picture

Status: Fixed » Needs work

as stated, features correctly detects the rules-containing feature to be in default state.

the problem is, that that the rules ui itself shows the rule with status overridden. one has to manually revert the rule in order to set it to state default.

this may not really a bug, but more a question of consistency: from my understanding rules' interpretation of "overridden" is "lives in db, may equal to version code" while features interpretation of overridden is "lives in db and is different from code"

fago’s picture

I see. I think the problem here is that you still have the originally created rule in the db when the feature is activated, thus it is marked as overridden. Not sure how this could work though, isn't it the same for other exportables e.g. views?

dasjo’s picture

i just checked: in views, if i revert a view its state is being set to default again. the same is true for feeds

fago’s picture

Status: Needs work » Postponed (maintainer needs more info)

oh, sry I see what's your problem now. However, reverting rules works fine for me? Maybe, the overridden status has been exported in you rule?

dasjo’s picture

Status: Postponed (maintainer needs more info) » Fixed

hmm seems to work now :)

Status: Fixed » Closed (fixed)

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

mitchell’s picture

Component: Feature module support » Provided Module Integrations

Moving to "Provided Module Integrations" component.