Closed (fixed)
Project:
Rules
Version:
7.x-2.1
Component:
Rules Core
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
11 Apr 2011 at 01:30 UTC
Updated:
13 Dec 2019 at 01:04 UTC
Jump to comment: Most recent
Comments
Comment #1
mitchell commented>> I don't have clean url's enabled: could it be a problem?
No.
>> Removing the path alias condition makes the rule running fine.
I think you're supposed to fill in a value here, otherwise it will fail every time.
Comment #3
pmichelazzoI have the same issue here. Trying different methods and no one give a result.
Someone have a clue about it?
Thanks
Comment #4
mitchell commented(maintainer note: This obviously isn't very straight forward...)
First off, there isn't a condition in 7.x for "path has alias." You need to use a data comparison with [site:current-page:path] and contains. I think this contains part is the weakest link in usability. There are probably improvements to be made there. Anyway, here's something to try out:
Comment #5
videographics commentedI can paste this is and get a rule with a comparison action utilizing the 'contains' operator, but when creating new data comparison actions, "contains" is not an option.
Comment #6
mitchell commented...clarity is a WIP :p
That method was deprecated as of, #1319470: check for multiple selected options. Here's the actual diff:
http://drupalcode.org/project/rules.git/commitdiff/51826e3326df64bfa7eaf...
This was a bit difficult to track down, because the condition names are a bit wonky. "Is" and "Matches" are used in the code interchangeably with "Comparison."
Either way, Text comparison functionally makes more sense for this case than Data comparison, but that will have to be cleared up with improved help text.
If you are still looking for more info on how to set this up, see #1045964: How to do path detection, until there is an actual canonical description in the handbook. Soon........................
Comment #7
videographics commentedThanks for the clear run down on what's happening with this. Progress....
Comment #8
ntigh52 commentedHo to all,
There is a condition in 7.x for "path has alias." that dont work if i add a condition path = node/3 (for example), Why I need to use a data comparison with [site:current-page:path] and contains.
mitchell helped me a lot to solve the issue with the trick (use data comparison with [site:current-page:path] and contains),
but is ta not a bug ?
THanks/
Comment #9
tr commentedThis seems to have been answered. Note, "node/3" is not an alias - it is a path. "Path has alias" only works for path alias, that is, an *alternative* path that has been explicitly set for the node. If you edit your node and scroll down to the bottom and click on the "URL path settings" vertical tab, if there is no alias entered in that field then "Path has alias" will return false.
Comment #10
tr commented