Forums » Troubleshooting

date mis-displays in public view

(3 posts)
  • Started 2 months ago by sara
  • Latest reply from SheilaBrennan
  • This topic is not a support question
  1. sara | Member
    2 months ago # | |

    If one only enters a year in date and leaves month and day blank on the admin side, in public view the date shows up as 11.30.previous year.
    Example:
    admin side (edit), date: 1905 [blank] [blank]
    public view, date: 11.30.1904

    And even if one tries to enter zeros instead of leaving the Month and Day fields blank, one ends up with the same thing, and the zeros just disappear in any case.

    Similary, if one enters a year in date and a month but no day on the admin side, in public view it shows up as last day of previous month correct year.
    Example:
    admin side (edit), date: 2008 03 [blank]
    public view, date: 02.29.2008

    Any ideas on how to fix this?

  2. 2 months ago # | |

    Hi Sara,

    Thank you for making us aware of this bug. Our developers know about it and we'll update you when we know more about the problem.

    Sorry for the inconvenience.

    Sheila

  3. 1 month ago # | |

    Hi Sara,

    Kris helped me find a workaround that will show dates properly on the public pages. We are working on fixing the way that Omeka deals with dates for other releases, but for now you can modify the items/show.php file found in your public theme directory. If you echo the date only, it should show the proper date on the public pages.
    See here:

    <?php if($item->date): ?>
    
    <div id="date" class="field">
                <h2>Date</h2>
    
     <div class="field-value"><?php echo nls2p($item->date); ?>
    </div>
    </div>

    This should work, but if you have problems let me know.

    Sheila

RSS feed for this topic

Reply

You must log in to post.