SimplePortal

Development => Bugs => Topic started by: emanuele on February 28, 2015, 03:04:10 PM

Title: StandAlone mode and canonical URL
Post by: emanuele on February 28, 2015, 03:04:10 PM
I think it may be a bug, but I couldn't test properly yet so I may be wrong (is that unusual? I don't think so. :P).

Forum:
http://forum.domain.com/index.php
Standalone home page:
http://www.domain.com/index.php
Apparently in that setup the canonical url for the standalone home page is set to:
http://forum.domain.com/index.php

I'll try to test it more deeply in the next days, in the meantime if you have any idea I'm all ears. :angel:
Title: Re: StandAlone mode and canonical URL
Post by: [SiNaN] on August 01, 2015, 08:35:09 AM
From what I see and according to my tests, the canonical tag is not set on portal page at all, be it set to front page or standalone. It never gets set automatically, but explicitly in BoardIndex.php, Display.php, MessageIndex.php and so on. The only problem that I can see is that the canonical URL on board index is set to $scripturl and it leads to portal page when it's running on front page mode. We should probably change that to ?action forum if portal page replaces the board index as the front page. Let me know if I'm missing something. I'll be moving this to Bug Reports board, by the way.
Title: Re: StandAlone mode and canonical URL
Post by: emanuele on August 06, 2015, 02:55:44 PM
Yeah, I guess it's not possible to guess what the canonical url is by the path... it should be know beforehand. And anyway, with the standalone page it shouldn't really matter.

I don't remember exactly how canonical is set in the template, but it may be worth removing it completely if possible from the standalone page (i.e. if the template checks for !empty$context['canonical_url']) empty out the variable), otherwise like in the example I made above, it would point to $scripturl, that may differ from the url of the standalone page.
Title: Re: StandAlone mode and canonical URL
Post by: [SiNaN] on August 06, 2015, 03:19:41 PM
I don't see the canonical tag set on any portal page, both when running on standalone mode and front page mode. We don't set it and it's not set automatically.

The only issue that I see is when portal is running on front page mode, the canonical tag for forum board index is set to $scripturl. It should be $scripturl?action=forum since portal replaces the board index as $scripturl when running on front page mode.
SimplePortal 2.3.8 © 2008-2024, SimplePortal