Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I've got a date field with following settings:
type: date
data: year, month, date (no hours, minutes, seconds!)
format: 10.12.2012 - 14:30 (can't choose only 10.12.2012 without hours and minutes, but at the nodes display form the date is shown correctly as 10.12.2012)
At the pathautos settings i use the fields token [node:field_datum]. It generates this in URL: 2012-12-10-000000.
That looks not very nice. Combinations like [node:field_datum:short] or something else causes an error.
What's wrong with it? What can I do?
Comments
Comment #1
stevetheboater CreditAttribution: stevetheboater commentedI had a similar issue and trial and error led me to a solution that worked: events/[node:field-event-date:value:custom:Y-m-d]/[node:title]
For you I guess this would become [node:field-datum:value:custom:Y.m.d]/[node:title] or very similar.
Just verified this on a second test site and in the process discovered that it only works if you have the latest version of Drupal core.
Comment #2
andrenoronha CreditAttribution: andrenoronha commentedHi, I tried [node:field_evento_data:value:custom:Y-m-d] but it gave me the invalid tokens error message.
I'm using the latest version of core: 7.22
What may be wrong?
Comment #3
dp85 CreditAttribution: dp85 commentedFound a solution without changing the Pathauto settings which works for me: #Comment 7745613