I am running Drupal 8 with pathauto 8.x-1.0-beta1 on a live test site.

I set up a pattern for the article content type (inserting tokens from the available tokens display) with pattern as follows:

\[current-date:html_date]\[node:title]

I also tried this without the leading backslash, but either way the result is as follows:

This has the effect of stripping off my site URL from article addresses and returning a page not found error if I try either to visit the article as a visitor on my site or to edit it.

When I created an article with the title "article test", drupal set the URL of the article as:

http://www.current-date.com/article-test

I'm guessing there is something simple I am missing. Any clues what it could be?

Thank you.

Comments

femrich created an issue. See original summary.

ashutosh tiwari’s picture

Assigned: Unassigned » ashutosh tiwari

Hello Femrich

I have applied same setting on my local and applied the path pattern /[current-date:html_date]/[node:title], and its working fine for me. On your url http://www.current-date.com/article-test there is no date pattern.

Will you please elaborate more what is the issue and what setting you have made?

Have you selected entity type for which you want to apply this pattern?

Thanks

berdir’s picture

Status: Active » Postponed (maintainer needs more info)

Are you actually using \ instead of /? That would be wrong, you need to use /.

It also seems like a bad idea to use the current date for an alias, as it will be updatd when you re-save the node later. You probably want to use the created date of the node instead.

mably’s picture

Status: Postponed (maintainer needs more info) » Closed (outdated)

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.