Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
Tom King Posted February 13, 2015 Posted February 13, 2015 Hi all,Hopefully this is in the correct thread!I have unearthed a 'duplicate page content' issue on our forum whereby the page ending / is the same page as /?page=1If that has confused you, let me try to explain a little better...Take this forum thread;http://www.bolsovercruiseclub.com/forum/topic/1419-your-first-pop-concert/The above URL and;http://www.bolsovercruiseclub.com/forum/topic/1419-your-first-pop-concert/?page=1...are the same page and so create a 'duplicate page content' issue...This I believe is affecting every forum post and so creating a vast number of errors...Does anyone know of a fix or maybe a plugin?Many thanksAC
TSP Posted February 13, 2015 Posted February 13, 2015 Hi, I noticed the same thing a while ago and did this change to a 3.4.7 install:Find file admin/applications/forums/app_class_forums.phpFind line 199 or close to it /* Add canonical tag */ $this->registry->getClass('output')->addCanonicalTag( ( $this->request['page'] ) ? 'showtopic=' . $topic['tid'] . '&page=' . $this->request['page'] : 'showtopic=' . $topic['tid'], $topic['title_seo'], 'showtopic' );Replace with /* Add canonical page */ # HW_CUSTOM do not add page=1 to canonical if visited with &page=1 in URL $this->registry->getClass('output')->addCanonicalTag( ( $this->request['page'] && $this->request['page'] != 1 ) ? 'showtopic=' . $topic['tid'] . '&page=' . $this->request['page'] : 'showtopic=' . $topic['tid'], $topic['title_seo'], 'showtopic' );Use whatever comment you want of course, I just use HW_CUSTOM in the comment to have it easy to find any modified code I have later.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.