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

usermeta table #29

Closed
silsbyc opened this issue May 21, 2024 · 5 comments
Closed

usermeta table #29

silsbyc opened this issue May 21, 2024 · 5 comments
Assignees

Comments

@silsbyc
Copy link

silsbyc commented May 21, 2024

I get errors saying the table doesn't exist for the calls in src/controller/class-editoria11y-api-results.php:186 and class-editoria11y-api-dismissals.php:202

It appears that this is related to the definition of $user_meta = $wpdb->prefix . 'usermeta' on src/admin.php:754, src/controller/class-editoria11y-api-dismissals.php: 168, and src/controller/class-editoria11y-api-results.php:121.

Not sure if this is specific to our database, or Wordpress Multisite in general, but our usermeta tables cannot be called directly using SQL with the same structure as a site table. They are a network-wide table as opposed to site-specific tables. If this is just because of our database, you can close this, and I'll just figure out a workaround.

Deleting these specific variable definitions, and the portions of the direct DB calls that used those variables seems to have stopped the errors. I realize this means I won't be able to attribute specific dismissals to specific users. But is there anything else that would be affected by removing these direct DB calls?

@itmaybejj
Copy link
Owner

itmaybejj commented May 21, 2024

Oh dear.

No; these DB calls are not needed for any recording purposes at all -- they are just there to replace the user ID number with their human readable nice name on the dashboard.

How do you access user information? Will WP_User_Query work? If so, I can replace the join against the user table with a second DB hit to run a WP_User_Query to get a list of nicknames.

@silsbyc
Copy link
Author

silsbyc commented May 21, 2024 via email

@itmaybejj
Copy link
Owner

🫡 Let's hope 1.0.16 works then

@itmaybejj itmaybejj self-assigned this May 22, 2024
@itmaybejj
Copy link
Owner

Oh...missed one, in the CSV export. I'll include that in the next release.

@itmaybejj
Copy link
Owner

fixed in 1.0.17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants