Adriano Faria Posted December 30, 2018 Posted December 30, 2018 Regarding this: https://invisioncommunity.com/forums/topic/430442-links-directory/?do=findComment&comment=2770214 The user doesn't has comments enabled in the app but the IPS\core\extensions\core\Sitemap\Content::generateSitemap() rely in the comment date: $data = array( 'url' => $node->url(), 'lastmod' => $node->getLastCommentTime() ); The getLastCommentTime() in my node model returns the last added record: public function getLastCommentTime() { return $this->last_link_date ? \IPS\DateTime::ts( $this->last_link_date ) : NULL; } At least, it should, as it has data. Below in generateSitempa() still has: $data = array( 'url' => $item->url() ); $lastMod = NULL; if ( isset( $item::$databaseColumnMap['last_comment'] ) ) { $lastCommentField = $item::$databaseColumnMap['last_comment']; if ( is_array( $lastCommentField ) ) { foreach ( $lastCommentField as $column ) { $lastMod = \IPS\DateTime::ts( $item->$column ); } } else { $lastMod = \IPS\DateTime::ts( $item->$lastCommentField ); } } if ( $lastMod ) { $data['lastmod'] = $lastMod; } So is this something I can "fix" on my app by using the Sitemap extension or is something in the core ? Thank you.
Daniel F Posted December 30, 2018 Posted December 30, 2018 This was already improved for 4.4.0 . I've changed it this way, that your content item will be able to modify the lastModificationDate used in the sitemap. More info TBA in the 4.4 3rd party dev topic:)
Recommended Posts
Archived
This topic is now archived and is closed to further replies.