Drupal 7.7
Automatic Node Titles 7.x-1.0
Date 7.x-2.0-rc1
Token 7.x-1.0-beta7
I recently upgraded just the date module in the setup above, and the formatting of dates in Automatic Node Title stopped displaying correctly. If I enter a date field it is displayed in an incorrect format, for example 12/01/11T00:00:00 when it should be January 11, 2012. If I try to format the date field, the token text is set as the node title. For example, [node:field_date:custom:short] is not evaluated and is set as the actual node title.
I'm having trouble finding information so I apologize if this is actually a date or token issue. Any help is appreciated. Thanks.
Comments
Comment #0.0
richardbporter CreditAttribution: richardbporter commentedCorrect typo
Comment #1
cr@jba CreditAttribution: cr@jba commentedI've got the same issue. Just installed Automatic Nodetitle for the first time today and 'raw' date fields display, but when you apply any formatting you get the token text.
My setup is the same as rbp, apart from me having Drupal 7.9
(Great module, by the way - just wish I'd discovered it earlier!)
[11:20 - Small update: Have just tried it with 7.x-1.x-dev and any attempt to format a date results in a blank entry]
Comment #2
richardbporter CreditAttribution: richardbporter commentedGot this to work by enabling Entity Token. There is a conflict between date, token and entity token right now (I think). See http://drupal.org/node/691078
But now the day is just one day off, similar to this issue http://drupal.org/node/1197278.
Comment #3
StormTheGates CreditAttribution: StormTheGates commentedHaving the same issue. Can you elaborate a bit more on how you solved the issue? All autonodetitles come in with 00:00:00 appended. Figure it isnt getting my custom date format.
Comment #4
richardbporter CreditAttribution: richardbporter commentedAfter you enable Entity API and Entity Tokens, you should see a new token for the date field in the list of available tokens. It should have a hyphen instead of an underscore for the token. For example, [node:field-date] instead of [node:field_date]. Try the one with the hyphen.
Comment #5
StormTheGates CreditAttribution: StormTheGates commentedThank you for the response!
I am still having problems though, currently I have installed:
Token
Date
Entity API
Entity Token
When I have Token and Entity Token enabled at the same time I get a white page error with some menu text but no info. And when token is disabled no tokens at all.
Any ideas? Running Drupal 7.12, Token RC1, and the latest Date and Entity.
Comment #6
Canadaka CreditAttribution: Canadaka commentedI just started having this problem after updating a bunch of modules on my site.
I used to have it working with [node:field-bike-year:custom:Y] but it not just outputs a title as "[node:field-bike-year:custom:Y]".
In the list of available tokens I notice that the dashed version is no longer listed, only "field_bike_year". When I replace the rule using the underscore version it also does not work.
Date 7.x-2.3
Entity API 7.x-1.0-rc1
Token 7.x-1.0-rc1
It seems its the "Date" module where the problem lies or at least where there was a change that caused the problem. Its the only one of these modules that I updated, with the version from "2012-Apr-01".
Comment #7
willyk CreditAttribution: willyk commentedI've encountered similar issues when updating the Date and Token modules. One potential solution, is to check the evaluate PHP when setting the automatic node title options and then use PHP to format the date field as desired. For instance:
While you're not using the Custom Date formats you set in Drupal, this still gets the job done.
Comment #8
kruser CreditAttribution: kruser commentedGreat timing with that code, I needed it this morning! I made a modification to include a check for an end date:
Comment #9
lunk rat CreditAttribution: lunk rat commentedThank you for explaining this in #2. I used entity token and was able to get custom date formatting to work with auto_nodetitle
Comment #10
valiant_falstaff CreditAttribution: valiant_falstaff commented#8 worked great for me, thanks! Remember to replace the six instances of the machine name of the date field in his code - field_availability_date - with the machine name of your date field, which, in Drupal 7, you can find in the "Machine Name" column of admin/structure/types/manage/[YOUR CONTENT TYPE]/fields.
Comment #11
rudyard55 CreditAttribution: rudyard55 commentedThanks. #4 worked for me. use the hyphenated token, not the underscored one.
Comment #11.0
rudyard55 CreditAttribution: rudyard55 commentedTypo