I'm not sure this is really a bug, but there's no setting for "poor UI" so that's as close as I can get. Userreview adds a section to path auto with some handy tokens for grabbing the reviewed node's title. Unfortunately, it didn't work. I spent a lot of time tracing through the code and finally figured out that the pathauto_create_alias() function was being called twice and the second time was wiping out the [reviewed item title] token. I couldn't figure out what the heck was doing it until it dawned on me that the calling module is passed into the function. Turns out the culprit was "node".

Suddenly it clicked and I looked at the pathauto settings page again. Sure enough, reviews are also under the node fieldset. So I copied the pattern there and that fixed it.

Further experiments showed that you don't need to put a pattern down in the usernode section. You only need it in the node section for reviews.

I figured I'd post this and hopefully save others from tearing their hair out. :) Even better would be if the userreview section could be taken out of the pathauto settings and just leave the review paths under node along with the tokens.

On a related note, if there is a space in the title, it gets replaced with a + regardless of the fact that I have spaces set to change to - in pathauto. Perhaps on this line:

$placeholders[t('[reviewed item title]')] = $reviewed_node->title;

it could retrieve what pathauto has spaces set to turn into and do a string replace. Either that or figure out why it's bypassing the normal space replacing function, but I'm not up for tracking that down myself tonight.

Michelle

Comments

gerd riesselmann’s picture

Status: Active » Fixed

Yes, the naming "userreview settings" for this section may be misleading, as it handles aliases for urls of type "/userreview/of/[node id]", which lists all reviews for the given node. This url can be used to provide an extended view of a node's user reviews, but in most cases this is not necessary.

As for the problem with "+": This has been fixed. pathauto_cleanstring() needed to be called.

Anonymous’s picture

Status: Fixed » Closed (fixed)