Closed (outdated)
Project:
Rules
Version:
7.x-2.x-dev
Component:
Module Integrations
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
10 Sep 2012 at 02:55 UTC
Updated:
8 Sep 2018 at 08:34 UTC
Jump to comment: Most recent
Comments
Comment #1
diwant commentedI am able to export Rules Components but they don't show up on my 'Create Feature' screen. A cache clear they still don't show up. I'm going to try the latest entity dev version now.
Comment #2
diwant commentedWhat I'm trying:
I am trying to save my flat rate shipping rules (different rates for different situations) which are rules components into a feature.
What's happening:
The feature is enabled and not overridden. Yet my shipping rules aren't there.
How I got Features to export them:
I set up the rules components, exported them to a buffer text file, reupped my site from scratch with drush make and site install, and then imported the rules components and they show up in the Create Feature screen. Otherwise they don't show up there.
Importing is weird:
If I import it (with features or with import/export and copy pasting to a buffer text file) without creating a throwaway shipping rule, it complains,
If I import after creating a throwaway shipping rule (and with the feature that supposedly holds it enabled), I have to check 'override'. It will import in this case and I see it at admin/config/workflow/rules/components but not at admin/commerce/config/shipping/services/flat-rate. Hmm.
I think Drupal Commerce is still figuring out how to work with Features, and it's wonderful but it's going to be a pain to set up the individual commerce rules every time I spin the site up. Anyone have a better approach for me?
Comment #3
dgtlmoon commentedI'm having a somewhat similar issue with ubercart, although I think the actual issue is with rules
i've created my rule defaults include file, based on the 'export' rule output, which gets read when i clear the cache and revert all my features, however when i view the conditions of this rule, the conditions are empty, ideas? is this what you're experiencing?
in the file mymodule.rules_defaults.inc
Comment #4
diwant commentedNo that's not how I'm going about it, but a rules_default file seems like it might be a good fix at including commerce rules. However I haven't tried it myself.
Would you be able to try after increasing the weight of your module in the system table? I can show you how, but that would force your module hooks to run after commerce is set up and that may fix things.
Comment #5
dgtlmoon commentedFantastic! I increased the module weight and that resolved my issue, I wonder why? (btw: i'm using ubercart not commerce)
Comment #6
diwant commentedMy guess is now commerce modules get a chance to set up their rules, etc. before your module code tries to use those rules. Glad it worked for you!
I don't have the same set up so I don't know if this approach resolves the issue, though I feel like I might have tried it.
Comment #7
tr commentedI'm not sure this is relevant anymore, and there is a mixture of different problems and solutions above.
If you are still having problems with the current version of Rules please open a new issue with a complete list of steps for reproducing the problem.