I ran into this issue where the alias was not being checked correctly against previous aliases and it was creating duplicate aliases. I tried everything to resolve it and I finally decided to dig into the code and I found this issue. I believe it must having something to do with the server setup. The reason I am mentioning it is I am hoping it can be resolved so I don't have to avoid updating the module in the future. I usually don't like editing a module's code but this is the only way I could fix it. Basically, on line 596 of pathauto.module. There is a line of code that checks for a database query count...

return $query->execute()->rowCount() > 0;

but that seemed to always return false and I believe it is because that count function does not work. I switched it to the following and now it works.

return $query->countQuery()->execute()->fetchField() > 0;

Do you have any thoughts on if this will be resolved in the future? Thanks for the great module.

Files: 
CommentFileSizeAuthor
#2 pathauto-2826707-2.patch410 bytespifagor

Comments

nammourdesigns created an issue. See original summary.

pifagor’s picture

Priority: Normal » Major
Status: Active » Needs review
FileSize
410 bytes

good idea, here's Patch