Pathauto creates two aliases for all nodes. One is the correct alias but the other adds /feed to the end of the path.

Below is an example of it's behaviour:

name-of-node - node/1
name-of-node/feed - node/1/

I have noticed this was an issue previously but the issues raised then were apparently solved so I'm not sure what's going on here.

I have tried different patterns but they all do the same thing.
I tried the Dev release of Pathauto also. The same problem occurred.

Comments

greggles’s picture

Status: Active » Postponed (maintainer needs more info)

This is interesting.... I can't reproduce it, but I imagine that it might be the result of some leftover variables.

Can you paste in the results of:

select * from variable where name like 'pathauto%';

MediaMunkey’s picture

Here's the SQL dump.

INSERT INTO `variable` VALUES ('pathauto_blog_supportsfeeds', 's:4:"feed";');
INSERT INTO `variable` VALUES ('pathauto_ignore_words', 's:108:"a,an,as,at,before,but,by,for,from,is,in,into,like,of,off,on,onto,per,since,than,the,this,that,to,up,via,with";');
INSERT INTO `variable` VALUES ('pathauto_indexaliases', 'i:1;');
INSERT INTO `variable` VALUES ('pathauto_indexaliases_bulkupdate', 'b:0;');
INSERT INTO `variable` VALUES ('pathauto_max_bulk_update', 's:2:"50";');
INSERT INTO `variable` VALUES ('pathauto_max_component_length', 's:3:"100";');
INSERT INTO `variable` VALUES ('pathauto_max_length', 's:3:"100";');
INSERT INTO `variable` VALUES ('pathauto_modulelist', 'a:3:{i:0;s:4:"node";i:1;s:8:"taxonomy";i:2;s:4:"user";}');
INSERT INTO `variable` VALUES ('pathauto_node_applytofeeds', 'i:1;');
INSERT INTO `variable` VALUES ('pathauto_node_bulkupdate', 'b:0;');
INSERT INTO `variable` VALUES ('pathauto_node_editors_blog_pattern', 's:0:"";');
INSERT INTO `variable` VALUES ('pathauto_node_page_pattern', 's:0:"";');
INSERT INTO `variable` VALUES ('pathauto_node_pattern', 's:24:"[yyyy]/[mm]/[dd]/[title]";');
INSERT INTO `variable` VALUES ('pathauto_node_poll_pattern', 's:0:"";');
INSERT INTO `variable` VALUES ('pathauto_node_story_pattern', 's:0:"";');
INSERT INTO `variable` VALUES ('pathauto_node_supportsfeeds', 'N;');
INSERT INTO `variable` VALUES ('pathauto_quotes', 's:1:"0";');
INSERT INTO `variable` VALUES ('pathauto_separator', 's:1:"-";');
INSERT INTO `variable` VALUES ('pathauto_taxonomy_1_pattern', 's:10:"news/[cat]";');
INSERT INTO `variable` VALUES ('pathauto_taxonomy_2_pattern', 's:10:"news/[cat]";');
INSERT INTO `variable` VALUES ('pathauto_taxonomy_6_pattern', 's:18:"news/[vocab]/[cat]";');
INSERT INTO `variable` VALUES ('pathauto_taxonomy_applytofeeds', 'i:1;');
INSERT INTO `variable` VALUES ('pathauto_taxonomy_bulkupdate', 'b:0;');
INSERT INTO `variable` VALUES ('pathauto_taxonomy_pattern', 's:5:"[cat]";');
INSERT INTO `variable` VALUES ('pathauto_taxonomy_supportsfeeds', 's:6:"0/feed";');
INSERT INTO `variable` VALUES ('pathauto_transliterate', 'i:0;');
INSERT INTO `variable` VALUES ('pathauto_update_action', 's:1:"2";');
INSERT INTO `variable` VALUES ('pathauto_user_bulkupdate', 'b:0;');
INSERT INTO `variable` VALUES ('pathauto_user_pattern', 's:11:"user/[user]";');
INSERT INTO `variable` VALUES ('pathauto_user_supportsfeeds', 'N;');
INSERT INTO `variable` VALUES ('pathauto_verbose', 'i:0;');
INSERT INTO `variable` VALUES ('pathauto_version', 'a:2:{s:4:"text";s:9:"2005-9-18";s:5:"build";i:5;}');
greggles’s picture

Status: Postponed (maintainer needs more info) » Active

this is basically what I thought - can you run this against your db:

delete from variable where name = 'pathauto_node_supportsfeeds';

If that works then I'll make an update that will do that for everyone.

Thanks for your help debugging this!

greggles’s picture

Looking at pathauto.install I see it's getting set there. Weird!

So, two things:

1) unset the variable
2) stop setting it in the install

greggles’s picture

Status: Active » Fixed

I just committed a fix for this to the DRUPAL-5--2 branch. Thanks for the report.

MediaMunkey’s picture

No problem. Thanks for the fix btw, seems to do the job :)

TBarregren’s picture

Status: Fixed » Active

Sorry to re-open this bug, but the problem is still there.

1) As suggested above, I deleted pathauto_node_supportsfeeds from the variable-table:

  mysql> delete from variable where name = 'pathauto_node_supportsfeeds';
  Query OK, 1 row affected (0.00 sec)

I also verified that it was really deleted:

  mysql> select * from variable where name = 'pathauto_node_supportsfeeds';
  Empty set (0.00 sec)

2) Next, I visited admin/build/path/delete_all and deleted all aliases.

3) Then, I visited admin/settings/pathauto and checked Bulk generate aliases for nodes that are not aliased for nodes, taxonomy and users. (I have also tried with Create feed aliases both checked and unchecked.)

4) Now, on admin/build/path I see that Pathauto in addition to abc/def for node/1 also has generated abc/def/feed for node/1/.

5) Finally, back in MySQL, I see that the variable is back again:

  mysql> select * from variable where name = 'pathauto_node_supportsfeeds';
  +-----------------------------+-------+
  | name                        | value |
  +-----------------------------+-------+
  | pathauto_node_supportsfeeds | N;    |
  +-----------------------------+-------+
  1 row in set (0.00 sec)
MediaMunkey’s picture

There is actually a little more to the fix then just that. If you take a look at the CVS message that greggles added (http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/pathauto/pa...), you'll notice that the following code needs to be added to the pathauto.install file.

/**
 * Delete the pathauto_node_supportsfeeds
 *
 */
function pathauto_update_3() {
  $items = array();
  variable_del('pathauto_node_supportsfeeds');
  return $items;
}

just attach it to the end of the file and all should be good. :)

Alternatively apply the patch http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/pathauto/pa...

MediaMunkey’s picture

Status: Active » Fixed
TBarregren’s picture

I am embarrassed that I didn't thought of the cache. Thanks!

greggles’s picture

I think it might be more than that...but I'm hopeful that you are right.

greggles’s picture

@TBarregren - so, the problem is solved for you?

Anonymous’s picture

Status: Fixed » Closed (fixed)
ruharen’s picture

Version: 5.x-2.0-beta2 » 5.x-2.0
Status: Closed (fixed) » Active

I have to reopen this.

I've deleted that variable you mentioned above, but pathauto still creates a /feed alias for my blog nodes.
I've double-checked that the variable is deleted and I'm sure it is.

I can't understand why is this happening.

Also, when I delete the node, the correct alias gets deleted to, but not the /feed alias...

MediaMunkey’s picture

I don't see how you can still be having this problem.
If you have the latest copy of Pathauto and you have deleted the culprit variable from your database this shouldn't be happening.

I'm guessing you updated Pathauto from a version that had this problem, correct?
In that case make sure that you have run the update script as this should delete that variable and clear up this issue.

If this doesn't work the only other thing I can think of is to get rid of all your Pathauto variables and the Pathauto module folder and reinstall a fresh copy of the latest Pathauto.
Again, if this doesn't work then I honestly don't know why that is and your best bet would be to have greggles take a look at the situation.

ruharen’s picture

Status: Active » Fixed

I think I haven't replaced correctly pathauto on the last update.

The problem has solved after uninstalling pathauto, deleting its folder and reinstalling.

Thanks for helping :)

MediaMunkey’s picture

Status: Fixed » Closed (fixed)

Good to see you fixed the situation, and better yet that there wasn't some bug still in the code :)

greggles’s picture

Just a note that this was added back in http://drupal.org/node/216245 because og module uses that. The UI for controlling it is now present again so sites that don't need/want this feature can just turn it off.