Modification date always "now"
2 posts
• Page 1 of 1
Modification date always "now"
I don't really use content categories etc. on my site and my menus just contain links to individual content items. When I look at my sitemap, the modification dates always say the date and time that you request the sitemap. Eg. If I load my sitemap now (The XML version), then all of my content items are listed with a modification date of
Do I have to change a setting somewhere? Or is this a bug?
- Code: Select all
<lastmod>2008-04-28T20:30:47Z</lastmod>
Do I have to change a setting somewhere? Or is this a bug?
- lwillis
- Fresh Boarder

- Posts: 10
- Joined: Thu Apr 24, 2008 7:54 pm
Re:Modification date always "now"
I've done some digging, and the following changes seem to make it work for me.
In administrator/components/com_xmap/extensions/com_content.php, line 102:
Add an extra case statement for "content_item_link", e.g.
Then, in components/com_xmap/xmap.php, around line 263, change the last chunk of the forach statement as follows:
I wasn't sure exactly what this code was doing - but it seemed to "print" the node before it had gone off and got the modification date, so I've re-ordered it a bit and it seems to work :)
In administrator/components/com_xmap/extensions/com_content.php, line 102:
Add an extra case statement for "content_item_link", e.g.
- Code: Select all
break;
case 'content_typed':
case 'content_item_link':
global $database;
$database->setQuery("SELECT modified, created FROM #__content WHERE id=". $id);
$database->loadObject( $item );
if( $item->modified == '0000-00-00 00:00:00' )
$item->modified = $item->created;
$parent->modified = xmap_com_content::toTimestamp( $item->modified );
break;
Then, in components/com_xmap/xmap.php, around line 263, change the last chunk of the forach statement as follows:
- Code: Select all
XmapPlugins::printTree( $this, $item, $cache, $plugins ); // Determine the menu entry's type and call it's handler
if (isset($item->modified))
$node->modified = $item->modified;
$this->printNode($node);
$this->printMenuTree($node,$cache,$plugins);
I wasn't sure exactly what this code was doing - but it seemed to "print" the node before it had gone off and got the modification date, so I've re-ordered it a bit and it seems to work :)
- lwillis
- Fresh Boarder

- Posts: 10
- Joined: Thu Apr 24, 2008 7:54 pm
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest