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

Upgrade to Matomo 4.12 breaks Matomo when DeviceDetectorCache plugin is installed #19768

Closed
tsteur opened this issue Sep 25, 2022 · 9 comments
Closed
Assignees
Labels
Regression Indicates a feature used to work in a certain way but it no longer does even though it should.
Milestone

Comments

@tsteur
Copy link
Member

tsteur commented Sep 25, 2022

Upgraded to Matomo 4.12-rc1 and got this result:

image

Looks like there was a breaking API change in that release causing this issue. The only way to fix this was to manually revert to the previous Matomo version.

Seems there was this change matomo-org/plugin-DeviceDetectorCache@e7ddda8 but if we released that, it would actually break Matomo for heaps of users who are on an older version as required Matomo version wasn't adjusted.

@tsteur tsteur added the Regression Indicates a feature used to work in a certain way but it no longer does even though it should. label Sep 25, 2022
@justinvelluppillai justinvelluppillai added this to the 4.12.0 milestone Sep 26, 2022
@peterhashair
Copy link
Contributor

peterhashair commented Sep 28, 2022

@tsteur Could we update here, to matomo:>=4.0.0-rc1,<4.12-rc1. Then release a new version for that plugin, update the again with matomo: >=4.12-rc1,<5.0,0-b1

https://github.com/matomo-org/plugin-DeviceDetectorCache/blob/082cf4f2543545a58b7ff699825cb66b20a02697/plugin.json#L7

@tsteur
Copy link
Member Author

tsteur commented Sep 28, 2022

We would certainly need to release a new version of that plugin and require matomo: >=4.12-rc1,<5.0,0-b1 (not sure it was already included in a beta version maybe?).

I'm not sure about also releasing another update with matomo:>=4.0.0-rc1,<4.12-rc1. It probably should work but would need to make sure to maybe release this update before the other one. I haven't tested this though what happens in that case and when they update to Matomo 4.12 etc.

We would need to release these updates ASAP to prevent people running into problems when they upgrade. I believe Matomo should be updating plugins together with core and it should prevent this issue in most cases although I'm not 100% sure (would need to be double checked). It'll remain a problem for people upgrading manually where they'll need to make sure to also update the plugin.

@peterhashair
Copy link
Contributor

Generate a PR that updates plugin.json and CHANGELOG.md, @AltamashShaikh will release 4.3.0 should fix this one. will test it after release.

@peterhashair peterhashair self-assigned this Oct 3, 2022
@sgiehl
Copy link
Member

sgiehl commented Oct 5, 2022

@peterhashair did you do any testing with Matomo and that plugin?

This issue was most likely not solved by simply increasing the minimum required matomo version in the plugin. The latest DeviceDetectorCache plugin is compatible with previous Matomo versions. But Matomo became incompatible with older versions of the plugin. So updating Matomo without updating the plugin can cause this problem.

That is actually a case we currently are not able to handle cleanly. As we don't have a possibility to define that a plugin update is required. As @tsteur mentioned, we could have released a version of the plugin, without the changes, and mark it as compatible til Matomo 4.12.0. But even that would not solve the problem for all Matomo users, as Matomo might not yet use that plugin version when an update is triggered. But it would at least solve the problem for a couple of cases....
But now that you have already released a new version, I'm not sure if the market place would be able to handle that correctly if we release another version with a lower version number now 🤔

Btw. The error actually only occurs with PHP 8. Seems PHP 7 was not yet that strict with method compatibility

@sgiehl sgiehl reopened this Oct 5, 2022
@sgiehl sgiehl modified the milestones: 4.12.0, 4.12.1 Oct 5, 2022
@peterhashair
Copy link
Contributor

@sgiehl yes, I thought to release a lower version, with 4.11 comparable plugin.json, then release a newer 4.3 with 4.12 comparable plugin.json. But the plugin team released 4.3. Then I have no idea what to do. Could we release a lower version after the 4.3 release?

@sgiehl
Copy link
Member

sgiehl commented Oct 6, 2022

@tsteur Does the marketplace accept releases that are lower then the latest version, but within the same major version?

@tsteur
Copy link
Member Author

tsteur commented Oct 6, 2022

I think it would let you release that. It's also supported to release updates for eg your 3.X-dev etc. The marketplace should then remove any version it's not compatible with AFAIK.

What would be important

  • The version number should increase
  • The new release should have no overlap with the previous release in terms of the required Matomo version. For example, one require could be matomo: >=4.12-rc1,<5.0,0-b1 and the other one matomo: <4.12-rc1,<5.0,0-b1. Otherwise it was for example matomo: >=4.12-rc1,<5.0,0-b1 and matomo: <4.12.0,<5.0,0-b1 and someone was using eg 4.12-rc1 then it would return the most recently published version when we would want them to use the version that is compatible with matomo: >=4.12-rc1,<5.0,0-b1

@sgiehl
Copy link
Member

sgiehl commented Oct 7, 2022

I have now released 4.2.4, which is compatible to 4.12.0-b3 and a 4.3.1 which is compatible as of 4.12.0-b3

@tsteur is it normal that after releasing 4.2.4, the marketplace reported that version as the latest one, even though a 4.3.0 had been released before? Released the 4.3.1 to fix that...

@sgiehl sgiehl closed this as completed Oct 7, 2022
@tsteur
Copy link
Member Author

tsteur commented Oct 10, 2022

@sgiehl I think that be expected currently for the user interface on plugins.matomo.org. The API would then suggest the correct version depending on their specific Matomo install (the UI on plugins.matomo.org doesn't pretend to be a specific Matomo version so it shows all). I do wonder though if you were on Matomo 4.3.1 if it would recognise that 4.3.0 is actually a better fit. Probably not. Good you released two updates 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Regression Indicates a feature used to work in a certain way but it no longer does even though it should.
Projects
None yet
Development

No branches or pull requests

4 participants