@tsteur opened this Issue on November 14th 2021 Member

refs https://github.com/matomo-org/matomo/issues/18305 and https://github.com/matomo-org/matomo/issues/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: Changing getPiwikUrl 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 like getPiwikUrlWithPath and keep old behaviour for getPiwikUrl (maybe, to be looked at)

@tsteur commented on November 14th 2021 Member

Actually, I'm seeing the method getPiwikUrl is supposed to include the directory see https://github.com/matomo-org/matomo/blob/4.6.0-b3/core/SettingsPiwik.php#L193

Maybe we can instead check if there's an issue with that method and if something is not working there?

I guess once https://github.com/matomo-org/matomo/issues/18132 is fixed, this issue might be fixed too. Or the other way around.

@tsteur commented on November 15th 2021 Member

I'll actually close this one as we will investigate this as part of the other issue. No need to have the same issue twice

This Issue was closed on November 15th 2021
Powered by GitHub Issue Mirror