opus icon indicating copy to clipboard operation
opus copied to clipboard

Error add wiki permissions

Open Julianhm9612 opened this issue 7 years ago • 7 comments

I create a new user and add various permissions at the role admins, in the table role permissions exist this permissions, but the application not recognize this.

Application:

image

Database:

image

Julianhm9612 avatar Sep 19 '18 19:09 Julianhm9612

Any updates on this? This yields the application totally unusable.

PHCCorso avatar Jan 10 '19 18:01 PHCCorso

to fix this problem you need execute this sql query:

INSERT INTO permissions ('id', 'name', 'created_at', 'updated_at') VALUES (1, 'admin', NULL, NULL), (2, 'view_page', NULL, NULL), (3, 'add_page', NULL, NULL), (4, 'delete_page', NULL, NULL), (5, 'add_comment', NULL, NULL), (6, 'delete_comment', NULL, NULL);

@PHCCorso @Julianhm9612

devmanx avatar Mar 08 '19 17:03 devmanx

@devmanx how do I execute this query? Sorry, I have no PHP experience at all.

daniellivingston avatar Jan 29 '20 00:01 daniellivingston

@daniellivingston You don't need php for that. Just open phpmyadmin and then click on SQL tab (you can see this button on image from first post in this thread) and then copy my sql to phpmyadmin and execute it :-)

devmanx avatar Jan 29 '20 09:01 devmanx

Hello! My apologizes as i'm not a powerfull db user: i encounter this error:

MariaDB [opus]> INSERT INTO permissions ('id', 'name', 'created_at', 'updated_at') VALUES (1, 'admin', NULL, NULL), (2, 'view_page', NULL, NULL), (3, 'add_page', NULL, NULL), (4, 'delete_page', NULL, NULL), (5, 'add_comment', NULL, NULL), (6, 'delete_comment', NULL, NULL); ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''id', 'name', 'created_at', 'updated_at') VALUES (1, 'admin', NULL, NULL), (2...' at line 1 Looks like there's a synthax error but i'm not used enough to find what and where :-/ Does any of you know what's hapening?

antipiot avatar Jun 17 '20 09:06 antipiot

Hello! My apologizes as i'm not a powerfull db user: i encounter this error:

MariaDB [opus]> INSERT INTO permissions ('id', 'name', 'created_at', 'updated_at') VALUES (1, 'admin', NULL, NULL), (2, 'view_page', NULL, NULL), (3, 'add_page', NULL, NULL), (4, 'delete_page', NULL, NULL), (5, 'add_comment', NULL, NULL), (6, 'delete_comment', NULL, NULL); ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''id', 'name', 'created_at', 'updated_at') VALUES (1, 'admin', NULL, NULL), (2...' at line 1 Looks like there's a synthax error but i'm not used enough to find what and where :-/ Does any of you know what's hapening?

Try this: INSERT INTO permissions (id,name,created_at,updated_at) VALUES (1, 'admin', NULL, NULL), (2, 'view_page', NULL, NULL), (3, 'add_page', NULL, NULL), (4, 'delete_page', NULL, NULL), (5, 'add_comment', NULL, NULL), (6, 'delete_comment', NULL, NULL);

The Synthax error is with the ' of the column names.

pstoneTI avatar Aug 10 '20 17:08 pstoneTI

Thanks for your answer! Sadly i have no time atm to try but will do for sure.

antipiot avatar Aug 11 '20 18:08 antipiot