Forum

Thread tagged as: Problem, Error

Diagnostic Error "user_role_privileges' doesn't exist

I am having some problem setting up additional users for my Perch site. Only admin users can login. I don't know how I got to this problem, but I fear this error showing up in the diagnostic may be related?

Any help appreciated.

Nathan Rothenberger

Nathan Rothenberger 0 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Where does the error appear? Is there any context to it?

On any page of the perch interface w/ diagnostics turned on.

Photo for Reference

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok, got it. That's certainly a problem.

Can you try forcing an update?

/perch/core/update/?force=update

Seems to just refresh and land me on the dashboard.

Still currently running 2.4.3 and seeing the error in the diagnostic.

Rachel Andrew

Rachel Andrew 394 points
Perch Support

The first thing to do then would be to update Perch. We offer support for the latest version of the software 2.4.3 is very very old at this point.

Indeed, I have intended to update, but as this has been a problem for a while I didn't want to risk the losing whatever is in the database. I have backups, but as mysql/backend dev is not really my forte I have been hesitant. I will update and see how things go.

Thanks Rachel and Drew

Rachel & Drew,

So I updated to the latest, Perch, or attempted to. Upon initial login, it threw an error regarding what looks to be this exact problem.

https://cl.ly/image/3A193O2I291I

Help? I have backups of everything so I can roll back, but this seems like an issue that needs to be fixed and may be out of my wheelhouse.

Any suggestions?

I chose to accept the errors and continue. Here is the complete debug message on the dashboard.

https://cl.ly/image/0S0K090n2J3B

Drew McLellan

Drew McLellan 2638 points
Perch Support

Does the perch2_user_role_privileges table now exist?

Here is a shot of database in phpMyAdmin, running on MAMP. It shows up in the sidebar but not as one of the tables listed in the structure tab.

https://cl.ly/image/3F0X2B1X333B

Again, all this backend stuff is not my area of expertise. Please advise.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Can you check if the table needs repairing?

Sorry for a probably stupid/newb question but, HOW would one do that exactly?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Try

REPAIR TABLE perch2_user_role_privileges

and see what that does.

I'm assuming as a SQL command?

It says the query executed successfully but threw an error.

https://cl.ly/image/3L2U0t0K3l3E

Looks like my image didn't upload correctly, here it is for reference.

https://cl.ly/image/0X0D0z2v2P3i

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok, can you try this:

DROP TABLE `perch2_user_role_privileges`;

and then

CREATE TABLE `perch2_user_role_privileges` (
          `roleID` int(10) unsigned NOT NULL,
          `privID` int(10) unsigned NOT NULL,
          PRIMARY KEY (`roleID`,`privID`)
        ) ENGINE=MyISAM DEFAULT CHARSET=utf8;