To reproduce, create some vocabularies and terms in taxonomy. Then enable Pathauto and go to Pathauto settings. Leave everything as defaults, but go to "Taxonomy term path settings" and expand it. Blank out the "Internal feed alias text" field to disable this feature, check "Bulk generate" and save. It will create paths for all your terms, but if you visit a term the RSS feed URL will be default (expected, we disabled it).

Now back in Pathauto settings put something in the "Internal feed alias text" field (I just put the word "feed" back). Check "Bulk generate" and save. Nothing! It doesn't bulk generate the feed aliases. It ignores them.

CommentFileSizeAuthor
#2 628662_pathauto_bulktaxonomyfeed.patch1008 bytesxenophyle

Comments

xenophyle’s picture

I am also seeing this problem. It looks like taxonomy_pathauto_bulkupdate() is testing whether an alias for the taxonomy term exists before creating the feed alias, rather than checking if the the feed alias exists.
If the term alias already exists, you won't get your feed alias.

xenophyle’s picture

Version: 6.x-1.2 » 6.x-1.x-dev
Status: Active » Needs review
StatusFileSize
new1008 bytes

I've made a patch that takes a rather timid/conservative approach but seems to do the job. In taxonomy_pathauto_bulkupdate, it was checking whether the taxonomy term existed, and if not it called _taxonomy_pathauto_alias to create the taxonomy alias and, if requested, the feed alias as well. I added a condition to call _taxonomy_pathauto_alias if the feed alias does not exist. I also noticed that the count of how many aliases were created is off, since it doesn't count the taxonomy aliases and the taxonomy feed aliases separately, but I made no attempt to fix it.

A more aggressive solution might be to divide the _taxonomy_pathauto_alias function to handle creating the two types of aliases separately. This could fix the count issue too.

dave reid’s picture

Issue tags: +bulk

Tagging all the bulk alias issues for #713238: RFC: Pathauto Bulk module.

hawleyal’s picture

Status: Needs review » Needs work

not compatible with postgres

  • warning: pg_query() [function.pg-query]: Query failed: ERROR: syntax error at or near "'/feed'" at character 116 in /*/includes/database.pgsql.inc on line 139.
  • user warning: query: SELECT tid, vid, name, src, dst FROM term_data LEFT JOIN url_alias ON CONCAT('taxonomy/term/', CAST(tid AS CHAR)), '/feed') = src WHERE src IS NULL AND vid <> 0 AND (vid = '1' OR vid = '2') LIMIT 1000 OFFSET 0 in /*/sites/research.msu.edu/modules/pathauto/pathauto_taxonomy.inc on line 94.
dave reid’s picture

Status: Needs work » Closed (duplicate)

This will be fixed with #201151: Use batch API to perform path alias bulk updates. As such I'm going to mark it as a duplicate of that issue.