Plugin

Archived
Forum
(read-only)

Rein de Vries does not actively monitor this forum
(but you can still get help from other EE users).


For official support, visit the official support site »

Google Sitemap Lite

ExpressionEngine 2, ExpressionEngine 3

Back to this add-on's main page
View Other Add-ons From Rein de Vries

     

You must be logged in to post.

Structure lastmod is always now

Bug Report

michael.hebert
michael.hebert

Looking at version 1.11

//get the last modified data
$result $this->EE->db->get_where('channel_titles', array('entry_id' => $entry_id))->row();
if(!empty(
$date->edit_date))
{
 $date 
date('Y-m-d',$this->EE->localize->timestamp_to_gmt($date->edit_date));
}
else
{
 $date 
date('Y-m-d');

channel_titles data is put in $result, but then we check $date->edit_date, which is always empty. Furthermore, the edit_date we get back is in a stupid format that’s neither usable as a timestamp or a string, e.g. 20160127155023, so you need to do some massaging to it first to get it in a yyyy-mm-dd format, for example:

$date substr($result->edit_date04).'-'.substr($result->edit_date42).'-'.substr($result->edit_date62); 
Reinos
# 1
Developer
Reinos

IF you want to create a Pull Request for it, you can do it here; https://github.com/reinos/ee_google_sitemap_lite

michael.hebert
# 2
michael.hebert

Done!

Reinos
# 3
Developer
Reinos

thanks, i`ll check it later this week.