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

User creation fails in Matomo UI due to missing column #19965

Closed
Hiradur opened this issue Nov 7, 2022 · 2 comments
Closed

User creation fails in Matomo UI due to missing column #19965

Hiradur opened this issue Nov 7, 2022 · 2 comments
Labels
answered For when a question was asked and we referred to forum or answered it.

Comments

@Hiradur
Copy link

Hiradur commented Nov 7, 2022

Expected Behavior

When I invite a new matomo user, an invitation should be sent via email.

Current Behavior

User creation fails after entering the superuser password with SQLSTATE[42S22]: Column not found: 1054 Unknown column 'invited_by' in 'field list'.
I encountered this issue with version 4.12.1 and upgraded to 4.12.3 today, but it didn't fix the issue. I could successfully create users in the past using older versions of matomo.

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'invited_by' in 'field list'

Possible Solution

Is this caused by a missing DB migration?

Steps to Reproduce (for Bugs)

  1. go to Administration menu
  2. go to System -> Users menu
  3. click the Invite New User button
  4. enter user details
  5. click Invite User button
  6. SQLSTATE[42S22]: Column not found: 1054 Unknown column 'invited_by' in 'field list' should now be displayed for a brief time

Context

I need to create an account for a new member on our team.

Your Environment

  • Matomo Version: 4.12.3
  • PHP Version: 7.4.19
  • Server Operating System: Red Hat Enterprise Linux 8.6 (SELinux in enforcing mode)
  • Additionally installed plugins:
    • HeatmapSessionRecordings
    • FormAnalytics
  • Browser: Firefox 102.4.0esr
  • Operating System: Debian GNU/Linux 11
@Hiradur Hiradur added the Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. label Nov 7, 2022
@sgiehl
Copy link
Member

sgiehl commented Nov 7, 2022

Hi @Hiradur
Sorry to hear you are having trouble with the update. It seem the migration of 4.11. were not executed for you for some reason.
The user table should have been changed here: https://github.com/matomo-org/matomo/blob/4.x-dev/core/Updates/4.11.0-rc2.php#L62-L66

Might be hard to find the reason why that didn't work for you.
You can now either try to apply the required changes automatically. Or it might work to update the option table and set the option_value to 4.10.0 where the option_name is version_core. That way Matomo should automatically try to trigger the updates after Matomo 4.10.

@sgiehl sgiehl closed this as not planned Won't fix, can't repro, duplicate, stale Nov 7, 2022
@sgiehl sgiehl added answered For when a question was asked and we referred to forum or answered it. and removed Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. labels Nov 7, 2022
@Hiradur
Copy link
Author

Hiradur commented Nov 20, 2022

We discovered that all version_* rows in the option table were still at 4.8 (the version we used for the initial install) even though we installed numerous Matomo updates via Ansible in the meantime. We were never prompted in the UI to perform a database upgrade and are not sure why.
We remediated this issue by adding console core:update --yes to our Ansible role, which should ensure that the DB is always updated after we perform an update via Ansible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it.
Projects
None yet
Development

No branches or pull requests

2 participants