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.
Hi,
I have problem in a "View". I add a date field from Content Type "mycontent type" in View and date field displays only the current date like April 17, 2015 in the front-end when "Formatter" is Date and time.
But when I choose "Formatter" --> Plain, I get the correct date(the date stored in back-end) with this format 2015-03-29 despite any of the available views for users that chose such as Long, Medium, Short or my Custom.
Any ideas what's going on? I try to clear cache and change field's display from Content Type page but nothing works...
Comment | File | Size | Author |
---|---|---|---|
date-plain.PNG | 2.2 KB | nikmoustakas | |
configdate-plain.PNG | 4.39 KB | nikmoustakas | |
date-date-and-time.PNG | 2.03 KB | nikmoustakas | |
configdate-date-and-time.PNG | 4.46 KB | nikmoustakas |
Comments
Comment #1
Lostboy22 CreditAttribution: Lostboy22 commentedCheck your view settings
Advanced, Contextual Filter, "When the filter value is NOT in the URL"
Comment #2
jcfiala CreditAttribution: jcfiala as a volunteer commentedHi! I'm having the exact same problem!
Only, I don't have the problem on my development machine. I exported the view and put it in a hook_views_default_view, and when it showed up on Staging, all the date of birth column showed was today's date! When the view reached production, the date of birth is again working correctly.
Following nikmoustakas's suggestion, I changed the field to 'Plain', and it's showing the correct date now, although not formatted.
The date for the user isn't part of the contextual filter, although the last name from the same entity is.
Any ideas? Again, this view is working properly in two out of three environments.
Comment #3
ThePixelMines CreditAttribution: ThePixelMines commentedI, too, am having an issue like this. I have a user account field that is pulling an ISO date from active directory (yyyy-mm-dd). Only when set to display as "Plain" will it display the entered date on the users account page or in a view. Any other format (including time ago) renders today's date.
If I add a date manually to the field (an account not connected to the LDAP server), the date works normally.
Comment #4
codechefmarc CreditAttribution: codechefmarc commentedI ran into this issue as well and I changed my date field from ISO format to UNIX format and that seemed to fix it.
Comment #5
bloomt CreditAttribution: bloomt commentedIs there any way to solve this issue without switching date formats?
Comment #6
mrdrewkeller CreditAttribution: mrdrewkeller commentedWas there ever another solution found for this without changing the formatter?
I just encountered this issue in a D7 site. As stated above changing the formatter to "Plain" fixes it for me.
Haven't been able to figure out what is causing the issue though.
Comment #7
DamienMcKennaComment #8
tripodcreative CreditAttribution: tripodcreative commentedI can confirm this issue is still occurring with the latest stable and beta release.
Comment #9
tripodcreative CreditAttribution: tripodcreative commentedChanging issue priority to critical as this breaks the primary function of the date displays.
Comment #10
DamienMcKenna"Critical" issues are primarily for things that break the data, so lets demote this slightly to "major". It also sounds like a bug
Lets get this sorted out for the next release.
Comment #11
steinmb CreditAttribution: steinmb as a volunteer commentedI think this should be the 7.x-2.x branch
Comment #12
DamienMcKennaRemoving this from the list for the next stable release, hopefully we'll get to it afterwards.