Hi!,

I've installed pathauto on my (new) drupal 8.4 installation with composer.
Enabled the module, set a pattern for my "database" content type in the form of "database/[node:title]" and for the 200 items i've got, i bulk generated all the aliasses.

All the aliasses are being made, al the generated aliasses do appear in the list of aliasses, but all of them return a 404 when accessed.

I've also tried creating a test database-item by hand with an automatically generated alias, but that also returns a 404, although an alias is assigned. This to rule out bulk generation of aliasses.

Feels like the code that tells drupal the called url belongs to a node isn't invoked. Anyone got an idea?

Comments

swigle created an issue. See original summary.

swigle’s picture

Any updates on this?
I've setup a whole new D8.4 site with basically nothing installed, required pathauto with composer and this still doesn't work. Aliasses are created but don't work when trying to access the paths.

swigle’s picture

Title: Automatig generated aliasses return 404's » Automatically generated aliasses return 404's
gg24’s picture

Hi @swigle,

I tested the bug on Drupal 8.4.x and Pathauto 8.x-1.x mentioned by you but not able to reproduce this issue.

I followed the mentioned below steps:-

  1. Created a url pattern for Article content type as article/[node:title]
  2. Bulk generated all the url aliases for rest of the nodes.
  3. Tried accessing all the urls from list tab.
  4. I am able to fetch all the urls.

Please help me in understanding the issue better if I missed anything above.

Thanks!

swigle’s picture

@gg24 Thanks for your reply!

I don't know what else to tell you...
I'm currently running version dev-1.x 59a7bef of pathauto, created a new contenttype "news" and added a pattern news/[node:title].
When i create a node (or bulk update) a path is assigned, but when accessing the path, i get a 404 not found.

Update:
I just deinstalled the pathauto-module and enabled it again (same version). Set a pattern for news (same one), created a new news-page and now it works!
Weird thing is, the pages created before when it was still "broken", still don't work, even if i generate new aliasses for them by bulk or resave the nodes by hand and check automatic creation of the alias. These seem permanently broken.

Luckily i'm still building the site, so all content needs to be entered, so in my case this seems fixed for my purposes, but it's still weird that it broke, especially when i still have "broken" nodes in the site...

Anyway, thanks for your help. "did you try turning it off and on again" actually worked this time (although i allready tried of course)
:)

gg24’s picture

Status: Active » Closed (cannot reproduce)

Hi @swigle,

Its good that after re-installing this works for you. As you mentioned it is not working for old nodes. I feel that as you ran bulk update earlier, this could have done some mess within the database, you can try editing one of among those nodes and create an alias manually for that and try saving and accessing it.
Anyways seems this issue should not be opened. So I am closing this issue. If you still feel this should be active pls feel free to do so.

Thanks!

swigle’s picture

I've finally figured out wat the problem was. I was already on to a new project where i had exactly the same issues. Turns out the problem is caused by multiple languages...

So for other google'rs:
When creating a pattern you can select for which languages the pattern should act. As per the description below this choice i thouht not checking any box, would result in the pattern working for all languages... It doesn't

Check all languages manually, and it'll work nicely (again)

giorgio79’s picture