TYPO3-metaseo
TYPO3-metaseo copied to clipboard
Mount points canonical and MP default settings
If one uses MP_defaults or MP_mapRootPoints
the MP value might be added directly on typolink creation and will therefore not be ignored ony because it MP is set to exclude on query string.
I guess the easist solution is to remove those settings (and generated maps) and restore them after generation.
Btw. why is the MP change only done for blacklisted URLs? Shouldn't it be the other way around? Only generate a canonical tag if it is not on the blacklist?
Please send us following information for easier bug hunting:
MetaSEO version
TYPO3 version
TYPO3: 6.2.14 MetaSEO current develop branch with corresponding noMP / blacklist setting.
Thanks. As far as I see, you already did some investigation. I'd appreciate if you came up with a more in detail description of the reproduction steps and the proposal you'd like to see implemented in the next release of MetaSEO. A patch would be perfect ;)
We simply need to reproduce and verify that a bug exists (info what exactly you did and what exactly goes wrong is needed) and if a later patch/PR really fixes it.
Reported current develop branch commit-ID is 4fb5ba0cec92adaffbe2f55ce486ebc0f9d7b49c
Did you already test against the 1.0.8 release?
OK. Might create a path for it.
To reproduce you have to have set the
config.MP_defaults
or config.MP_mapRootPoints
Would do it in the first test without realurl active.
Then have metaseo setup in the way that it does set the canonical tag to without the MP parameter.
Open an URL that has the MP parameter set and ensure that parameter is also defined via MP_defaults
or MP_mapRootPoints
.
By setting noMP
and the corresponding blacklist regex
What will happen then is that the MP will be excluded from addQueryString
.
However, due to MP_defaults
or MP_mapRootPoints
it will be added again.
Maybe will I post an example TypoScript configuration or EXT later.
So lets' say you have set MP_defaults to add to links that go to page UID 10 add the MP: 5-9
And you now have the URL:
http://test.typo3.dev/index.php?id=10&MP=5-9
Now the canonical URL is configured to remove the MP parameter via Seo which means that the query string will be appended without the MP parameter which would look like this:
http://test.typo3.dev/index.php?id=10
However, du to MP_defaults being set to add the MP parameter 5-9 to links to page UID 10 the following will still be the result:
http://test.typo3.dev/index.php?id=10&MP=5-9
Yes, if you could send us the corresponding configuration code (MP... config and MetaSEO config) that would help a lot to reproduce.
Please tell us if you start working on a patch (to avoid duplicate coding).
Will attach corresponding code and SQL for pages table (to have a sample) sometime later this week. Probably over the weekend as I am currently busy with other things.
Before you do changes please make sure that you pull from the latest develop branch before you start (f8d985a8b137798c072b407bc212341521286724 or later).
There have recently been a lot of coding style changes via #89. Just to avoid later conflicts when we merge.
OK. But didn't find the time the last weekend. Not sure about this weekend either. In the worst case scenario I should find time in two weeks. I am on vacation then :)
That's still good news. Just make sure you pull from latest develop shortly before you start.
For various reasons other things took precedence. Maybe I will be able to take a more detailled look at it in March.
@AndreasA could you please try again with metaseo v2.0.1+, which got released in the meantime? I'm not aware that we fixed this issue in the meantime, but sometimes we fix things unknowingly.
I currently don't have a page where this is relevant, so I would have to test it from the beginning. If I have time and don't forget about it, I will test it :)
@AndreasA Metaseo 2.0.2 got released today. Again, I'm not aware that this issue is fixed. However, it would be great if you could test if this issue still exists. It could easily happen that this got fixed in the core or in realurl or in metaseo 2.0.x.