Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Matomo work when it is installed in a directory #18306

Closed
tsteur opened this issue Nov 14, 2021 · 2 comments
Closed

Make Matomo work when it is installed in a directory #18306

tsteur opened this issue Nov 14, 2021 · 2 comments
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

Comments

@tsteur
Copy link
Member

tsteur commented Nov 14, 2021

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: 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 tsteur added Bug For errors / faults / flaws / inconsistencies etc. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical. labels Nov 14, 2021
@tsteur
Copy link
Member Author

tsteur commented Nov 14, 2021

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 #18132 is fixed, this issue might be fixed too. Or the other way around.

@tsteur tsteur added this to the 4.7.0 milestone Nov 14, 2021
@tsteur tsteur added 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. and removed Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical. labels Nov 15, 2021
@tsteur
Copy link
Member Author

tsteur commented Nov 15, 2021

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

@tsteur tsteur closed this as completed Nov 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
None yet
Development

No branches or pull requests

1 participant