go dating now 2 - Pathauto not updating

Using the default path pattern for content we placed: /[node:menu-link:parents:join-path]/[node:title] But the node has to be saved twice for it to take the proper path pattern.

pathauto not updating-86

That's a scary thing to do ;) An alternative, generic approach might be to do the alias generation at the end of the request, through an on Terminate event or maybe by using the needs_destruction service tag (has the advantage of only being called if it was instantiated).

Then it would always be after all the things were saved.

And we can't access that since we still work with entity hooks (correctly so, IMHO).

the only place where it would be available the global POST variables, but that's obviously not really a solution.

Follow the videos in the Setting Up a Web Environment With Drupal to get Drupal set up on your Windows, OSX (Mac) or Linux machine.

Some of the key points we'll be covering include: This video collection is intended for those who are completely new to Drupal, or for those that want to make sure that they have a solid foundation before moving on to more advanced projects.

So notice that when we clicked Save we jumped back to this Content listing page.

If we wanted to view this page we need to actually click on the link. Our page got refreshed and we see at the top that our URL has not changed.

The token in itself works so I believe this is more an issue with pathauto. The menu links is not available as a field on node save but I think that the information about the parent menu item and menu link title is available somewhere (in the form state maybe). maybe there is something to do on the Menu Link Content entity update/insert So maybe we should create a new tiny workaround module?

I understand that in fact it's not a bug in pathauto and neither in token module (even core is not the culprit I think).

You will have to find a different way to build your aliases for now.

Tags: , ,