Fix features integration to don't put the whole rule objects in $data, but only an id mapping.

CommentFileSizeAuthor
#1 Snap1.png23.71 KBamitaibu

Comments

amitaibu’s picture

StatusFileSize
new23.71 KB

I'm not sure if it is related - haven't had the time to look at the code yet, but in the image you can see something is wrong (Array) appears instead of the rule name.

dawehner’s picture

features[rules][] = "Array"

in the info file.
So updating the feature is not really nice :)

pvhee’s picture

Interested in this fix as well. Is a new release of the Rules module planned once this is in?

amitaibu’s picture

I have also noted a case where I had a rule and a rule-set, and after exporting by category, the rules were duplicated (i.e same rule was exported twice, with a different name).

fago’s picture

@#2: That shouldn't occur with the latest features module any more.

@duplicated rules: This occurs as one rule is provided by the feature module and the one is the original one of the db. I think you shouldn't activate a feature on the site you built it.

amitaibu’s picture

> I think you shouldn't activate a feature on the site you built it.

I think this assumption contradicts the way you work with features. A feature is something you update as you work. For example imagine an image gallery feature which is enabled, and I decide to change one of it's views. then I can drush features update image_gallery, and the views is re-exported to code.

fago’s picture

Yep, once you initially installed the feature, you can updated it. But when you created the feature the first time, you should use another fresh site, no? Else you end up with both versions, the db version and the feature version.

fago’s picture

@original issue: "Fix features integration to don't put the whole rule objects in $data, but only an id mapping."

I had a short look at this and I don't think it's worth to change that. It would be cleaner to only pass the mapping around and to get the data just in the last step, however I realized changing that right now would mean rewriting quite some code that already works fine. So I don't think it's worth the troubles, so let's stay with it like it's now.

For any other feature related issues, please open separate issues.

fago’s picture

Status: Active » Closed (works as designed)
fago’s picture

oh sry, there was still an "Array" problem. See #597330: Selecting a rule category shows 'Array' under the Rules component for that.

mitchell’s picture

Component: Provided module integration » Provided Module Integrations

Updated component.

jcisio’s picture

Status: Closed (works as designed) » Closed (won't fix)

The other issue was reverted. So I guess this one is "won't fix": no Features in 6.x-1.x.

jcisio’s picture

Status: Closed (won't fix) » Closed (works as designed)

Revert the status. The other issue is probably outdated. To export a rule, it requires tagging.