Example for this news item, please (I am just trying to understand where is the problem - except next db query):
official URL: https://www.e107.sk/news/view/42/gaia-theme/openmind-theme-demo-available
canonical URL: (with the backslash)
All URLs have the same canonical URLs because they display the same content.
URL https://www.e107.sk/news.php?default.42 - doesn't exist and it redirects to news homepage with core e107, nothing with canonical URLs.
Don't forget about pdf or email URL of "news". Your plugin will not generate canonical links.
I forgot. It will be added some new versions :) Maybe, so little time.
For example by comparing core prefs URL settings with a request.
Yes, but there must be some system (logic) in URL settings, each part works differently. Nightmare.
With version 1 you could get always correct content with combination e_PAGE +e_QUERY, now not. And as soon you solve news + pages, then you will go on with the forum and you can start from the beginning. Not mention gallery plugin.
For me, this was just workaround. They will not solve this in the core and official plugin solves only news. And it didn't worked before.
I will add a new relational table between canonical URLs and gsitemap table. Why? Gsitemap table doesn't know ID of related record so you don't know if title or URL weren't changed. Or automatically add new records to the gsitemap page. It is planned for 2020 :) And of course, I asked for this to add in core (just 2 fields - source + ID), no it will not be added.
I need those tables in admin area mainly, but it doesn't mean that that txt file can't be generated from them (in fact it should be very easy) but the problem (at least for me) still left how to from requested URL get the correct canonical link.