First of all: Very good module.

I have one problem with rules. I have set up a rule when book page is updated an alert should be set. It works. But I have an URL alias for my book pages e.g.

http://at.test.com/magazin-titelseite/reisemagazin/betreutes-reisen-durc...

in the rule I tried the following tokens:

[node:title]

and

[node:title]

the result is:

http://at.test.com/magazin/reisemagazin/Betreutes%20Reisen%20durch%20das...(Oberösterreich,%20Vorarlberg)

which is different from the URL alias e.g.
Capital Letters: Betreutes vs. betreutes
and - character: betreutes-reisen vs. Betreutes%20Reisen

Comments

baff’s picture

Copy and paste was no good idea, here again the tokens

[node:bookpath]
[node:bookpathalias]

baff’s picture

It has nothing to to with book tokens - the problem exists for all Url Aliases (pathauto module)

baff’s picture

Title: URL aliases / rules / book » URL aliases (pathauto module) & rules
icecreamyou’s picture

Project: Application Toolbar (Appbar) » Pathauto

I don't know why this was posted in the Appbar queue. Appbar doesn't have anything to do with tokens or aliases.

greggles’s picture

Project: Pathauto » Rules

I guess this is really about Rules?

The tokens you mention are not the style of tokens that Pathauto uses afaik.

baff’s picture

OK I understand now. Thanks!

tnanek’s picture

Title: URL aliases (pathauto module) & rules » Working with Pathauto
Version: 6.x-1.x-dev » 7.x-2.0

This is definitly an issue with Rules. Pathauto handles punctuation (including spaces) just fine according to its settings. Rules just hasn't applied those settings to its aliases.

When generating aliases, I believe Rules should check if Pathauto is installed, and if so, try to make use of its settings, since they are extensive, and already in existence. If not, just use the default to not necessitate the dependency (Rules clearly has more applications than paths, so why require that).

And this is still present in Rules 7.x-2.0 at the very least.

I may get around to patching this over the coming weekend latest, since it's functionality I need; will update this issue if that is done.

tnanek’s picture

Title: Working with Pathauto » Working with Rules
Project: Rules » Pathauto
Version: 7.x-2.0 » 7.x-1.x-dev
Component: Documentation » Miscellaneous

Okay, on checking out api's, integration with Rules seems to commonly be put on the other module.

* To see the similar issues, take a look at the Rules integration tagged issues, see that most are not with Rules specifically.
* To see the api functions for implementation, see the rules api on drupalcode.org
* I'm not precisely sure where the change needs to happen, but as a start, here is the path module's implementation within rules.

I may work on this further as well, but I believe this is accurately categorized now.

tnanek’s picture

Issue tags: +rules integration

Adding the aforementioned tag.

dave reid’s picture

Status: Active » Postponed (maintainer needs more info)
Issue tags: -rules integration

There's nothing really for Pathauto to do here though. I'm not sure what feature this is actually requesting? It made more sense for Rules to use Pathauto's cleanstring functions if available when setting URLs for things in Rules.

tnanek’s picture

Title: Working with Rules » Working with Pathauto
Project: Pathauto » Rules
Version: 7.x-1.x-dev » 7.x-2.x-dev

Sorry for the misassaigned issue tags prior.

On looking at the source of rules, more particularly at where the path module is evaluated (to be applied), I found a relevant @todo, in order to apply a variable for taking the place of spaces; once this todo is done, it will use a custom function to clean up the alias (see rules_clean_path() in the file linked to above).

Meanwhile, I don't see why not to make use of pathauto in the default application, thus I'm working on a patch for that at the moment. Likely the best place to make use of it is just after tokens are substituted, before that is merged with the full path; I just have to locate where that is and it will be done quickly.

tnanek’s picture

Status: Postponed (maintainer needs more info) » Active

Updating status.

fago’s picture

Status: Active » Closed (duplicate)

Yep, that's planned for a long time. Let's do it - see #403170: Add ctools, pathauto rules path cleaning callbacks and settings.

mitchell’s picture

Component: Miscellaneous » Provided Module Integrations

Updated component.