Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
It seems there is an underlying issue with order:order-status.
If you try to edit the "Update order status on full payment" rule's condition "NOT Data comparison", the DATA VALUE for order:order-status is not accessible and trying to save (with no change made or one elsewhere) yields a "An illegal choice has been detected. Please contact the site administrator" error.
As a side effect, creating a rules trying to make use of order:order-status is impossible.
Strangely, the rule seem to work on incoming orders however.
Drupal core 7.2, with latest dev version of Rules and Entity API.
Comment | File | Size | Author |
---|---|---|---|
#1 | ubrulesstatus.png | 50.05 KB | RogueM |
Comments
Comment #1
RogueM CreditAttribution: RogueM commentedOK, here is a screenshot. I;m using the latest dev for UB (16-June), Rules and Entity. This makes it almost impossible to do any kind of useful rules at my end, so I hope this can be looked at, or I can receive advise as to what I could do to solve the matter.
Comment #2
longwaveFix committed.
Comment #3
RogueM CreditAttribution: RogueM commentedhum, sorry, I should have been more explicit in my report. I just grabbed the latest UB dev, and this is indeed fixed for this particular rules, but theere are others affected... I assumed wrongly that the fix would come at a different level.
I'm happy to list all the UB provided rules that have an unmodifiable order:order-status DATA VALUE, but for example the same applies to the "Grant or renew purchased roles" rule.
EDIT: sorry, I got the rule name wrong the first time, will post with full list when I've had a look.
Comment #4
RogueM CreditAttribution: RogueM commentedhere's the list I could compile, hopefully complete:
rule "E-mail an order update notification" condition "NOT Data comparison"
rule Editing reaction rule "Update order status on full payment" condition "NOT Data comparison"
rule "Grant or renew purchased roles" condition "NOT Data comparison"
rule "Grant or renew purchased roles" condition "Data comparison"
hope it helps.
Comment #5
longwaveThis worked for me initially, but on testing again it had stopped working. uc_order_status_options_list() needs to be in uc_order.module instead of uc_order.info.inc. This has been committed.
Comment #6
RogueM CreditAttribution: RogueM commentedhum, I still can't edit the rules, field values are not returned. I've also lost the previous fix for the "Update order status on full payment" rule, but that would be expected based on what you said here above.
Comment #7
longwaveAre you using the -dev release or downloading from git? The -dev release may not have updated yet, though you could use this patch to bring your copy up to date.
Comment #8
RogueM CreditAttribution: RogueM commentedah, I work with dev builds, not git. Grabbed yesterday's version assuming that the commit had found it's way there. Not sure how to get the git version, and if it's safe enough (our site is live and don't have the means to test otherwise). If I figure it out I might give it a go when I have more time to do a full backup.
Comment #9
RogueM CreditAttribution: RogueM commentedI'm well impressed with myself, managed to apply the patch without trouble! Anyway, yes Dave, the patch therefore git version fixes this issue in full as far as I can see. Great job!
Comment #10
TR CreditAttribution: TR commentedMark as" fixed" when fixed. It will be changed to "closed (fixed)" automatically after two weeks with no comments.