news sub categories with wrong template in search engine

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
JohnnyB
Dev Team Member
Dev Team Member
Posts: 731
Joined: Tue Nov 21, 2006 5:05 pm

Re: news sub categories with wrong template in search engine

Post by JohnnyB »

pierrepercee wrote:Sorry but I already tried: none of these solutions works...
if version 2.0 is to be published during 2015, I think that a fix should be considered for the 1.11.12.
Everyone knows that version 2.0 will be early adopted by the most intrepid webmasters. The others will wait a few months ... ;)
I just reviewed your site and exactly what is happening there is the expected behavior.
There are news tags using content_id 59 and 39 for detail pages.
(see http://www.formation-adhoc.com/page-appel.html)

If by chance there is a different detail page assigned in the News settings, that will create another possible link to the same article...
"The art of life lies in a constant readjustment to our surroundings." -Okakura Kakuzo

--
LinkedIn profile
--
I only speak/write in English so I may not translate well on International posts.
--
pierrepercee
Forum Members
Forum Members
Posts: 164
Joined: Thu Jan 10, 2013 8:02 am

Re: news sub categories with wrong template in search engine

Post by pierrepercee »

on the French forum bug was clearly confirmed and reproduced (by two other members).
http://www.cmsmadesimple.fr/forum/viewt ... d=5737&p=2
For those interested a temporary solution has even been found (thank Archeo here).
It remains to trace information to developers so that they can see what they can offer as a correction for the next version of 1.11.12.
If anyone can do it...
In any case, thank you for your contribution. :)
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1973
Joined: Mon Jan 29, 2007 4:47 pm

Re: news sub categories with wrong template in search engine

Post by Jo Morg »

If it is a bug or not I cannot confirm nor deny as I didn't have the time yet to try to reproduce it. However:
pierrepercee wrote:For those interested a temporary solution has even been found (thank Archeo here).
IMO that is not a solution! A canonical url has to be generated by the module, not produced from the request, otherwise any url that points to the same content is presented as canonical to the search engines. The canonical URL should be the preferred URL, and as unique as possible even if the request is made through a non preferred URL which is possible under a number of situations...
(As Jeff posted)
https://support.google.com/webmasters/a ... 9066?hl=en
pierrepercee wrote:Multiple ways (urls) to access one page is not good for SEO purpose. But in this case the page template (not the news detail template) changes.
That is not entirely correct.
In the world of content management and online shopping systems, it's common for the same content to be accessed through multiple URLs. With content syndication, it's also easy for content to be distributed to different URLs and domains entirely.
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
pierrepercee
Forum Members
Forum Members
Posts: 164
Joined: Thu Jan 10, 2013 8:02 am

Re: news sub categories with wrong template in search engine

Post by pierrepercee »

Ok,

I have said it's a "temporary solution", I know it's not the right/best solution. I do not say it's the solution.
I'll try to upload a more telling example but I have also a lot of work right now and it will take a little.
For duplicate content issues (2 different URL referring to an identical content) everyone does not share your views. I just would like to remind that if it was sufficient to follow the guidelines Google to really perform the profession of expert SEO disappear quickly.
JohnnyB
Dev Team Member
Dev Team Member
Posts: 731
Joined: Tue Nov 21, 2006 5:05 pm

Re: news sub categories with wrong template in search engine

Post by JohnnyB »

I'll try to upload a more telling example but I have also a lot of work right now and it will take a little.
I'd like to know more information about what you are trying to do by using different detailpage="" parameters in different news tags.

If it is to provide a different template (design/layout), then there may be another way to do this without creating different URLs pointing to the same content.

If it is absolutely necessary to have different article detail pages, then set force the canonical variable in your news detail template to have the URL pattern you need.

Suppose you have a link that points to detail page 39 and another that points to 59. If the one with 39 is the preferred link for search engines, then do a replace on that ID number in your detail template.

Something like this:

Code: Select all

{if isset($entry->canonical)}
  {assign var='canonical' value=$entry->canonical|replace:'59':'39'}
{/if}
and then your links generated as:
http://monsite.fr/news/124/59/objet-essai-livre.html
will have a canonical set with:
http://monsite.fr/news/124/39/objet-essai-livre.html
"The art of life lies in a constant readjustment to our surroundings." -Okakura Kakuzo

--
LinkedIn profile
--
I only speak/write in English so I may not translate well on International posts.
--
pierrepercee
Forum Members
Forum Members
Posts: 164
Joined: Thu Jan 10, 2013 8:02 am

Re: news sub categories with wrong template in search engine

Post by pierrepercee »

@johnnyB
Thanks for your solution.. The first one given by Archeo works well at this time.
If CMSMS contains mutiple news detail templates and multiple page templates for me it's obvious you can use them with any combination without generating false canonical URL.

@jomorg
Let's have a quick look here :
http://www.formation-adhoc.com/

Home page : Simplex template (template name added at the begining of the body)

News tag is:

Code: Select all

{news summarytemplate='Summary_Simplex' number='2' detailpage='paad' detailtemplate='newstestdetail'}
Page "paad" has Simplexbis as page template (Simplexbis is a duplicated Simplex without aside columns)

"newstestdetail" is a new detail template but it's not the "by default news detail template".

On homepage, if you click on "plus->" under the only news it works well:
The url generated is (url rewriting is on):

Code: Select all

http://www.formation-adhoc.com/news/2/57/premiere-news/d,newstestdetail.html
Page template shown is "simplexbis" and news detail template is "newstestdetail"
BUT

If you look at canonical url in the source code you will find:

Code: Select all

http://www.formation-adhoc.com/news/2/15/premiere-news.html
Try this URL :
- the template page changes for the "by default" template page whitch is "Simplex". It should be "simplexbis" template !
- the news detail template changes for the "by default" news detail template whitch is "Sample". It should be "newstestdetail" template !
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1973
Joined: Mon Jan 29, 2007 4:47 pm

Re: news sub categories with wrong template in search engine

Post by Jo Morg »

The best workaround imo is JohnnyB's as it is dependent on the detail template (in this case newstestdetail) and generates a single unique usable canonical URL for a specific news page.
I'll need to test this particular use of News, just didn't have the time yet to do it.
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
JohnnyB
Dev Team Member
Dev Team Member
Posts: 731
Joined: Tue Nov 21, 2006 5:05 pm

Re: news sub categories with wrong template in search engine

Post by JohnnyB »

@pierrepercee:
Are you using this solution now?

Code: Select all

Canonical $ = $ _SERVER ['HTTP_HOST']. $ _ SERVER ['REQUEST_URI']
PHP $_SERVER['REQUEST_URI'] returns everything after the host including the query strings. So, I'm not sure how that will help. It will return the full path of the page being viewed.

If the path to a news article is http://www.formation-adhoc.com/news/2/57/premiere-news/d,newstestdetail.html
then $_SERVER['REQUEST_URI'] will return "news/2/57/premiere-news/d,newstestdetail.html"

If the same news article can be reached by http://www.formation-adhoc.com/news/2/123456/premiere-news/d,newstestdetail--2.html
then $_SERVER['REQUEST_URI'] will return "news/2/123456/premiere-news/d,newstestdetail--2.html"

The result is one article with 2 different URLs and two different Canonical links.

By definition, there should only be one canonical link. A canonical link tells the search engine which link is the preferred link. In other words, the one you want assigned SEO value.

It is true that the manner of which you are using the News module is unique. However, there are better ways to do what you want while providing SEO value, unique canonical addresses, and having different links to the same article.
"The art of life lies in a constant readjustment to our surroundings." -Okakura Kakuzo

--
LinkedIn profile
--
I only speak/write in English so I may not translate well on International posts.
--
Post Reply

Return to “The Lounge”