[resolved] All users except Admin: Uncaught exception error

Permalink
UPDATE:
ACE DEV WILL W. DID A FULL DELETE-AND-REINSTALL (site copied from old BlueHost installation) WHICH ELIMINATED THE ISSUES.

Hi all, we had a working installation of v5.7.x on BlueHost. Copied it to WebHostingHub. It seems to work fine except:

Any user except admin who logs in generates this UE error (see attached) involving "Unable to get permission key for edit_page_multilingual_settings"

When this happens, the site is hung (cannot log out, page refresh has no effect) until cache/cookies are cleared. Add'l troubleshooting:

1. deleted user, created a new user belonging to group 'Admin'

...but no luck. Only the original admin can log in without generating the error.

Thanks,
Charlie

1 Attachment

chm
 
willwood replied on at Permalink Reply
I'm not 100% sure what the issue was. But this was the full error message that was being shown when someone was logged into the website (who was not the main admin user):

Uncaught exception 'Exception' with message 'Unable to get permission key for edit_page_multilingual_settings' in /home/burked5/public_html/concrete/src/Permission/Response/Response.php:98 Stack trace: #0 /home/burked5/public_html/concrete/src/Permission/Response/Response.php(110): Concrete\Core\Permission\Response\Response->validate('edit_page_multi...', Array) #1 /home/burked5/public_html/concrete/src/Permission/Checker.php(76): Concrete\Core\Permission\Response\Response->__call('canEditPageMult...', Array) #2 /home/burked5/public_html/concrete/src/Permission/Checker.php(76): Concrete\Core\Permission\Response\PageResponse->canEditPageMultilingualSettings() #3 /home/burked5/public_html/concrete/elements/page_controls_footer.php(294): Concrete\Core\Permission\Checker->__call('canEditPageMult...', Array) #4 /home/burked5/public_html/concrete/elements/page_controls_footer.php(294): Concrete\Core\Permission\Checker->canEditPageMultilingualSettings() #5 /home/burked5/public_html/concrete/src/View/View.php(308): i


If someone was logged into the website, this error message was displayed in a Bootstrap red warning box towards the bottom of the page. The admin bar was missing from the top, although it was still possible to access the dashboard.

I tried various things for CHM to resolve the issue, but could not find any obvious fix. This included things like turning multilingual support on and off, clearing the website cache, purging and creating new members, toggling tidy URLs on and off etc.

In the end, I deleted the entire database and website. I migrated the website from the old hosting company to the new one a second time. And it worked without any problem. So I can only assume something got "screwed up" during the first attempt to migrate the website between hosting companies.

Thought I'd post the details here for the benefit of anyone else searching and encountering the same problem. The website is running Concrete 5.7.2 and is presently using the Elemental theme.
danielgwood replied on at Permalink Reply
Just encountered this issue on my site, after upgrading from 5.7.2.1 to 5.7.3.1 over the weekend.

I'll share my fix below in case it helps anyone else, but it comes with no guarantee, and as it does involve manually fixing your C5 DB, it's your choice.

Not wanting to migrate an entire site and only having 20 mins to fix it in, I fixed the literal error - "Unable to get permission key for edit_page_multiingual_settings".

If you dig around in the C5 DB you'll find a PermissionKeys table, in which there are lots of similarly named items. I didn't have a row for edit_page_multilingual_settings, so I figured I'd try adding it. Searching the concrete5.7 GitHub repo I foundhttps://github.com/concrete5/concrete5-5.7.0/blob/master/web/concret... the file in which all of these permission names are defined when you install C5. Lo and behold, the missing permission.

I copied the details from here into my database:
INSERT INTO `c5db`.`PermissionKeys` (
`pkID` ,
`pkHandle` ,
`pkName` ,
`pkCanTriggerWorkflow` ,
`pkHasCustomClass` ,
`pkDescription` ,
`pkCategoryID` ,
`pkgID`
)
VALUES
(99, 'edit_page_multilingual_settings', 'Edit Multilingual Settings', 0, 0, 'Controls whether a user can see the multilingual settings menu, re-map a page or set a page as ignored in multilingual settings.', 1, 0);


This fixed the issue.
willwood replied on at Permalink Reply
@danielgwood: Thanks for your reply. I didn't think to look at or change anything in the database itself. I don't like to poke these things too hard, unless I'm certain I know what I'm doing!

Hopefully your fix will be of help to any others stumbling upon this thread. Thanks for taking the time reply and share your fix.
RobRoyThe1st replied on at Permalink Reply
Thankyou @danielgwood! This worked!