HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Odd SQL causing error when editing permissions

I recently updated to 2021.12 from quite an old version. If I try to edit permissions on roles I get the dreaded "something went wrong" page. Looking at the debug, the query seems sketchy:

'select distinct p.ID as `ID`, c., p.Name as `Name`
from `GDN_c` `c`
left join `GDN_p` `p` on c. = p.ID'

That query looks odd for a numebr of reasons - there is no GDN_c or GDN_p tables in the database. that c. in the select part seems to be missing a field name.

Any thoughts?

Comments

  • KasparKaspar Moderator

    https://open.vanillaforums.com/discussion/37988/sql-error-when-editing-or-removing-role-something-has-gone-wrong

    That might help you in the right direction.

    I recall there being a couple of discussions, perhaps around the same time, but none other popped up in my search.

  • Thanks @Kaspar . The solution fo that seems to work for them was " resetting the Permission table with a copy from a fresh install."

    Any idea where I can get a dump of what that table should look like without setting up a new hosting somewhere and doing a fresh install?

  • Ignore the above. I had a site I wasn't using so did a quick install. It worked.

    In case anyone find this post in the future, there were the steps I used to fix:

    • did a fresh install of vanilla somewhere else. Downloaded the GDN_permissions table thenfrom his new installttted that install
    • l only did the above to get the table data. I hvae tried to attach that data to this post. If that works then no need to repeat the above, just use the attached acked up GDN_permissions on the live site (i just renamed the existing table)onan the SQLly eems to be fixeddid
Sign In or Register to comment.