I have experienced this twice now on a Drupal 8 site.

Pathauto is at its current version, and Drupal is 8.2.6.

What is happening is sometimes nodes 'lose' their aliases and revert back to being `node/1234` both on the front end, and the admin - even though they have alias records. The page cache maximum for the site is currently set to 1 hour.

Both times I was able to trigger this, these were the actions I was doing just before I noticed the aliases were now back to their paths:

- Implement a couple .htaccess rules to redirect an old non-Drupal URL to its new Drupal landing page
- Performed a database backup to a backup I had made 15 minutes prior

In both cases it happened. At first I thought maybe I messed up the .htaccess rule, and commented that out and pushed back live. That redirect is handled via event now. But then it happened again, with the database backup.

In both cases, only clearing the cache (either in the admin, or `drush cr`) fixed the problem. So what is causing it? How can I prevent this from happening again?


kevinquillen created an issue. See original summary.

Berdir’s picture

Berdir’s picture

To be more specific.

Pathauto doesn't do anything related to using or not using aliases. It just generates them, as long as they correctly exist in the url_alias table then I'm 99% sure your problem has nothing to do with this module.

kevinquillen’s picture

You may be right. What controls whether or not the alias shows instead of system path? I am going to try and duplicate this locally from both cases where it occurred.

kevinquillen’s picture

Hmm, interesting. As I was investigating, breadcrumbs from Menu Breadcrumb also stopped showing. They re-appeared upon clearing cache. Must be related in some way.

macosxvn’s picture

@kevinquillen, I have same issue on my site. But i don't have the backup cron. Did you found something or any idea to fix this issue ?

david.gil’s picture

Same problem in my install, any ideas if some of you solve it?

kevinquillen’s picture

Only clearing the cache (with drush cr) fixed the problem for me, and it has only happened that one time.

I don't think this is related to Pathauto, but I am not sure where to move the issue to.

Berdir’s picture

Status: Active » Postponed (maintainer needs more info)

I still think the most likely cause is the core issue that I mentioned above, setting to needs more info, everyone who has this problem, I'd suggest you try the core patch.

david.gil’s picture

david.gil’s picture

Status: Postponed (maintainer needs more info) » Active