Home Conticreative Blogs The Joomla Blog Fix the beez modified date from 1999

Blogs - The Conticreative Joomla Blog

Fix the beez modified date from 1999

Attention: open in a new window. PDFPrintE-mail

Written by Marco Conti Saturday, 12 September 2009 13:02

Share |
User Rating: / 1
PoorBest 

In this article I uncover a bug in the Beez template that may affect those that use Beez "HTML" folder to override the default Joomla component chrome.

While writing an article on the Joomla date system I noticed that in my test site the "Last Updated" date in the article looked like this:

Last Updated on Saturday, September 12 1999

Naturally, it's not 1999 but 2009 (this is for future readers finding this article while browsing the web in their flying cars). I did a bit of searching and found a post that indeed defined it as a bug in the "beez" template. Unfortunately, the post did not have a fix, cure or cause.

I went back and I deactivated the template HTML folder, therefore eliminating the override and sure enough, the date now reverted to the right one. Clearly a bug in beez.

I went looking for the code to display the modified date for an article in beez and I found this snippet:

article->modified) && $this->params->get('show_modify_date')) : ?>

article->modified, JText::_('DATE_FORMAT_LC2'))); ?>

Location is: /templates/beez/html/com_content/article/default.php

Then I did the same search in the core Joomla code under /components/com_content/

This is what the core code looks like:

 article->modified) !=0 && $this->params->get('show_modify_date')) : ?>

article->modified, JText::_('DATE_FORMAT_LC2'))); ?>

 

Amazingly, the first test I did happened to fix the issue, so I have not had a chance yet to investigate why Beez displays this bug, but the fix is very simple. Just copy the first line of the core code and paste it in place of the first line of your Beez code like this:

OLD:

article->modified) && $this->params->get('show_modify_date')) : ?>

NEW:

article->modified) !=0 && $this->params->get('show_modify_date')) : ?>

The entire snippet ends up looking like this:

article->modified) !=0 && $this->params->get('show_modify_date')) : ?>

article->modified, JText::_('DATE_FORMAT_LC2'))); ?>

and the resulting date will show the right year instead of 1999. If anyone has the time to research this and post a comment before I get to it, you are more than welcome to let us all know what the issue can be. For now, this is how you fix it.

Cheers

/cc/

Trackback(0)

TrackBack URI for this entry

Comments (2)

Subscribe to this comment's feed

Show/hide comments
thanks
thanks, an unpleasant bug, now it's ok
Matt Janson , March 26, 2010 | url
www.cms-informer.com
thanks for posting, it helped me fix the issue
Eugene , February 23, 2010 | url

Write comment

smaller | bigger

busy

10 Minute Joomla! Tips Blog

Conticreative joomla book reviews

Independent joomla hosting reviews

Joomla Training

Conticreative offers Individual and Corporate training (in person or online) on Joomla, Wordpress, Zen Cart and other leading Open Source scripts.

[Read More...]

Books

Books we suggest...

 

Spreadfirefox Affiliate Button
switch the positions on