@mskala opened this Issue on April 15th 2022

Expected Behavior

Expected to be able to use the Matomo dashboard normally in Firefox version 67 after updating to Matomo 4.9.0.

Current Behavior

Blue header on dashboard displays normally, but page is otherwise blank. All links in the header have same broken behaviour, displaying header but nothing else, except that on the configuration page, the sidebar ("personal/system/privacy/etc.") displays in addition to the header.

Browser console displays these error messages:

TypeError: translation.replaceAll is not a function
[index.php:780:361](https://files.northcoastsynthesis.com/piwik/index.php?module=Proxy&action=getCoreJs&cb=12746d9156d9358740bc57d731cb3e82)
Error: [$injector:nomod] http://errors.angularjs.org/1.8.2/$injector/nomod?p0=piwikApp.service [index.php:97:168](https://files.northcoastsynthesis.com/piwik/index.php?module=Proxy&action=getCoreJs&cb=12746d9156d9358740bc57d731cb3e82)
TypeError: r is undefined
[index.php:3:11313](https://files.northcoastsynthesis.com/piwik/index.php?module=Proxy&action=getUmdJs&chunk=1&cb=12746d9156d9358740bc57d731cb3e82)
TypeError: o is undefined
[index.php:3:15305](https://files.northcoastsynthesis.com/piwik/index.php?module=Proxy&action=getUmdJs&chunk=2&cb=12746d9156d9358740bc57d731cb3e82)
Error: [$injector:modulerr] http://errors.angularjs.org/1.8.2/$injector/modulerr?p0=piwikApp&p1=%5B%24injector%3Anomod%5D%20http%3A%2F%2Ferrors.angularjs.org%2F1.8.2%2F%24injector%2Fnomod%3Fp0%3DpiwikApp%0AF%2F%3C%40https%3A%2F%2Ffiles.northcoastsynthesis.com%2Fpiwik%2Findex.php%3Fmodule%3DProxy%26action%3DgetCoreJs%26cb%3D12746d9156d9358740bc57d731cb3e82%3A97%3A168%0AMe%2F%3C%2F%3C%2F%3C%40https%3A%2F%2Ffiles.northcoastsynthesis.com%2Fpiwik%2Findex.php%3Fmodule%3DProxy%26action%3DgetCoreJs%26cb%3D12746d9156d9358740bc57d731cb3e82%3A116%3A503%0Ab%40https%3A%2F%2Ffiles.northcoastsynthesis.com%2Fpiwik%2Findex.php%3Fmodule%3DProxy%26action%3DgetCoreJs%26cb%3D12746d9156d9358740bc57d731cb3e82%3A116%3A25%0AMe%2F%3C%2F%3C%40https%3A%2F%2Ffiles.northcoastsynthesis.com%2Fpiwik%2Findex.php%3Fmodule%3DProxy%26action%3DgetCoreJs%26cb%3D12746d9156d9358740bc57d731cb3e82%3A116%3A277%0Ag%2F%3C%40https%3A%2F%2Ffiles.northcoastsynthesis.com%2Fpiwik%2Findex.php%3Fmodule%3DProxy%26action%3DgetCoreJs%26cb%3D12746d9156d9358740bc57d731cb3e82%3A133%3A201%0Ar%40https%3A%2F%2Ffiles.northcoastsynthesis.com%2Fpiwik%2Findex.php%3Fmodule%3DProxy%26action%3DgetCoreJs%26cb%3D12746d9156d9358740bc57d731cb3e82%3A98%3A76%0Ag%40https%3A%2F%2Ffiles.northcoastsynthesis.com%2Fpiwik%2Findex.php%3Fmodule%3DProxy%26action%3DgetCoreJs%26cb%3D12746d9156d9358740bc57d731cb3e82%3A133%3A49%0Afb%40https%3A%2F%2Ffiles.northcoastsynthesis.com%2Fpiwik%2Findex.php%3Fmodule%3DProxy%26action%3DgetCoreJs%26cb%3D12746d9156d9358740bc57d731cb3e82%3A137%3A153%0Ac%40https%3A%2F%2Ffiles.northcoastsynthesis.com%2Fpiwik%2Findex.php%3Fmodule%3DProxy%26action%3DgetCoreJs%26cb%3D12746d9156d9358740bc57d731cb3e82%3A112%3A57%0AWc%40https%3A%2F%2Ffiles.northcoastsynthesis.com%2Fpiwik%2Findex.php%3Fmodule%3DProxy%26action%3DgetCoreJs%26cb%3D12746d9156d9358740bc57d731cb3e82%3A112%3A370%0AEe%40https%3A%2F%2Ffiles.northcoastsynthesis.com%2Fpiwik%2Findex.php%3Fmodule%3DProxy%26action%3DgetCoreJs%26cb%3D12746d9156d9358740bc57d731cb3e82%3A111%3A45%0A%40https%3A%2F%2Ffiles.northcoastsynthesis.com%2Fpiwik%2Findex.php%3Fmodule%3DProxy%26action%3DgetCoreJs%26cb%3D12746d9156d9358740bc57d731cb3e82%3A441%3A117%0Ai%40https%3A%2F%2Ffiles.northcoastsynthesis.com%2Fpiwik%2Findex.php%3Fmodule%3DProxy%26action%3DgetCoreJs%26cb%3D12746d9156d9358740bc57d731cb3e82%3A4%3A27151%0AfireWith%40https%3A%2F%2Ffiles.northcoastsynthesis.com%2Fpiwik%2Findex.php%3Fmodule%3DProxy%26action%3DgetCoreJs%26cb%3D12746d9156d9358740bc57d731cb3e82%3A4%3A27914%0Aready%40https%3A%2F%2Ffiles.northcoastsynthesis.com%2Fpiwik%2Findex.php%3Fmodule%3DProxy%26action%3DgetCoreJs%26cb%3D12746d9156d9358740bc57d731cb3e82%3A4%3A29707%0AJ%40https%3A%2F%2Ffiles.northcoastsynthesis.com%2Fpiwik%2Findex.php%3Fmodule%3DProxy%26action%3DgetCoreJs%26cb%3D12746d9156d9358740bc57d731cb3e82%3A4%3A29892%0A [index.php:97:168](https://files.northcoastsynthesis.com/piwik/index.php?module=Proxy&action=getCoreJs&cb=12746d9156d9358740bc57d731cb3e82)

Possible Solution

Remove the call to replaceAll that was introduced to source file "plugins/Morpheus/javascripts/piwikHelper.js" by commit afbe9c262577864716e3386468f0eb93b79ea2d5 . Reverting that commit on my local copy, and removing the cached file "tmp/assets/asset_manager_core_js.js" which seems to be generated from that one, seems to fix the problem with no obvious downside. Presumably, whatever this commit was intended to solve will remain unsolved without the call to replaceAll. Some other way of replacing the percent signs (possibly just "replace") might be appropriate.

Add an automated test to make sure future versions will not be released containing calls to replaceAll.

Add a policy of human testing with an older browser on release candidates before releasing them.

Add a policy that a browser-breaking change will not be made without both warning users of the change and providing a path to opt out of the change.

Steps to Reproduce (for Bugs)

  1. Attempt to use Matomo dashboard in a browser that does not support replaceAll, such as Firefox 67.

Context

This bug makes the Matomo dashboard/admin interface impossible for me to use at all. Independently of the technical issue, the fact that this occurred without warning on a routine update, creating emergency downtime for my business, reduces my trust in Matomo and my likelihood of buying any further services from the Matomo organization in the future.

Your Environment

  • Matomo Version: 4.9.0
  • PHP Version: 7.4.20
  • Server Operating System: Linux
  • Additionally installed plugins:
  • Browser: Firefox 67
  • Operating System: Linux
@justinvelluppillai commented on April 18th 2022 Contributor

Thanks for reporting this @mskala. We will release a patch fix for this issue in Matomo 4.9.1 shortly.

Please also note that Firefox 76 reached end of life more than 5 months ago. I'd recommend upgrading your browser if possible.

@mskala commented on April 18th 2022

Cold, dead fingers.

@cadeyrn commented on April 22nd 2022

Please also note that Firefox 76 reached end of life more than 5 months ago. I'd recommend upgrading your browser if possible.

Even worse, the extended support release Firefox ESR 78 reached end of life five months ago. Firefox 67 (used by the issue opener) is no longer supported since almost three years (!). There are so many reasons to update the browser: https://www.mozilla.org/en-US/security/known-vulnerabilities/firefox/

Accoording to https://caniuse.com/?search=replaceAll all browsers with exception of the Internet Explorer support String.replaceAll. The Internet Explorer is no longer supported since Matomo 4.6. So I don't think Matomo should include a polyfill for that. If someone is still using a three years old browser, well… it's the own fault.

@mskala commented on April 22nd 2022

I don't think a Web site statistics system should depend upon running Javascript in order to display statistics at all, much less specific Javascript features of some recent browsers. Web site statistics are data, not code. But that's not really relevant here. What is relevant is that Matomo worked in my installation before 4.9.0; it doesn't work in 4.9.0; either it'll start working again, or I will stop using it; and I filed the issue in an effort to help, if the development team agrees that having it continue to work is desirable.

Why I am unwilling to use a more recent browser is not relevant to the issue and although I can write at length on that topic, I don't think a discussion of it would be helpful to Matomo development. I won't participate in such a discussion here, though comments by others about it will certainly bear on my interest in continuing to use or help Matomo.

@Findus23 commented on April 23rd 2022 Member

I don't think a Web site statistics system should depend upon running Javascript in order to display statistics at all, much less specific Javascript features of some recent browsers. Web site statistics are data, not code. But that's not really relevant here.

I agree here and the access to the data itself is not locked behind Javascript at all. All data in Matomo is accessible via the reporting API and with the E-Mail reports even most graphs can be accessed as server-rendered images.

What is relevant is that Matomo worked in my installation before 4.9.0; it doesn't work in 4.9.0; either it'll start working again, or I will stop using it; and I filed the issue in an effort to help, if the development team agrees that having it continue to work is desirable.

With the change of https://github.com/matomo-org/matomo/pull/19110 Matomo has already started working here in this case. So the only thing missing is a patch release including that fix and that should arrive soon.
And indeed reporting this fact here is useful as I doubt we would have noticed it otherwise.

Why I am unwilling to use a more recent browser is not relevant to the issue and although I can write at length on that topic, I don't think a discussion of it would be helpful to Matomo development.

I think a discussion about this is helpful in that it helps on how to make the decisions of "Which browser versions will Matomo officially support, which versions will not be intentionally broken and fixes will be accepted and which versions are too old and supporting them would harm too much other work (e.g. in making things less secure for other users)".
I personally think only officially supporting browsers that receive security patches (so the latest versions plus long term support versions) seems like a reasonable trade-off. That way Matomo keeps working for everyone in secure setups like they would expect. And if you have a very specific setup where this is not possible (e.g. want to advocate the usage of another browser that doesn't support a feature needed by Matomo), then we can talk about it here and worst case someone can fork Matomo to adapt it to this specific setup.

@MatomoForumNotifications commented on April 26th 2022

This issue has been mentioned on Matomo forums. There might be relevant details there:

https://forum.matomo.org/t/empty-view-in-matomo/45692/9

This Issue was closed on April 26th 2022
Powered by GitHub Issue Mirror