Posted by greg.harvey on November 10, 2009 at 1:34pm
| Project: | Pathauto |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (duplicate) |
| Issue tags: | bulk |
Issue Summary
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.
Comments
#1
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.
#2
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.
#3
Tagging all the bulk alias issues for #713238: RFC: Pathauto Bulk module.
#4
not compatible with postgres
#5
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.