Make Matomo work when it is installed in a directory #18306
Labels
Bug
For errors / faults / flaws / inconsistencies etc.
duplicate
For issues that already existed in our issue tracker and were reported previously.
not-in-changelog
For issues or pull requests that should not be included in our release changelog on matomo.org.
Milestone
refs #18305 and #17945 and potentially quite a few more.
I see we often use
Settings::getPiwikUrl
. But this only returns a host, not the directory.In quite a few places like https://github.com/matomo-org/matomo/blob/4.6.0-b3/core/DataTable/Renderer/Rss.php#L56 we only use
getPiwikUrl
which doesn't include the directory and we generate a wrong URL.Maybe we need to adjust the method to also consider the path potentially? But then we might also need a
getPiwikHost
method where it only returns the host (eg when we generate the option for the console--matomo-domain=$HOST
). Note: ChanginggetPiwikUrl
could cause a lot of regressions in various plugins. It might not be a good idea and we might need to change this in Matomo 5. So we would need something maybe rather likegetPiwikUrlWithPath
and keep old behaviour forgetPiwikUrl
(maybe, to be looked at)The text was updated successfully, but these errors were encountered: