I've got a newly-updated-to-Runway site and it has changed some region permissions, which I didn't expect. The website owner (I've called the role 'Editor') can edit the content in the regions but they can't publish – it saves the changes as a draft but the 'Save as draft' checkbox is greyed out.
They needed the content out here ASAP so I did the honours as I'm the Primary Admin and I can uncheck the 'Save as draft' checkbox.
I then went to change their permissions and something strange is happening… I go to the region, then Region Options, and in the permissions section it looks like:
May be edited by
[x] Everyone
[x] Admin
[ ] Editor
Drafts may be published by
[ ] Everyone
[x] Admin
[ ] Editor
The problem is, when I check 'Everyone' in 'Drafts may be published by' and hit Save, it says 'Successfully updated' at the top and the checkboxes look right when I scroll down to check, but when I reload the page and scroll down the checkboxes go back to the way they were.
I've run the page with define('PERCH_DEBUG', true); in my config and I'm seeing a red line:
QuoteInvalid query: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'regionPublishRoles' in 'field list'
The full debug looks like this:
0 | recover(): ">[1] SELECT u.*, r.* FROM perch2_users u, perch2_user_roles r WHERE u.roleID=r.roleID AND u.userEnabled=1 AND u.userID=1 AND u.userHash='eb76dda1f33b22833c5d923c2cbfccef' LIMIT 1 |
0.0006 | update(): ">UPDATE perch2_users SET userHash='74bfd0f4702436550b00fce46982b5f0' WHERE userID='1' |
0.0036 | get(): ">[36] SELECT settingID, settingValue, userID FROM perch2_settings WHERE userID=1 OR userID=0 ORDER BY userID ASC |
0.0032 | add_new_apps(): ">[8] SELECT itemValue FROM perch2_menu_items WHERE itemType='app' |
0.0107 | find(): ">[1] SELECT * FROM perch2_content_regions WHERE regionID=45 LIMIT 1 |
0.0102 | all(): ">[2] SELECT * FROM perch2_user_roles ORDER BY roleTitle ASC |
0.0057 | get_menu(): ">[1] SELECT mi.*, p.privKey FROM perch2_menu_items mi LEFT JOIN perch2_user_privileges p ON mi.privID=p.privID WHERE mi.itemActive=1 AND mi.parentID=0 ORDER BY itemOrder ASC LIMIT 0, 1 |
0.001 | get_items(): ">[3] SELECT mi.*, p.privKey FROM perch2_menu_items mi LEFT JOIN perch2_user_privileges p ON mi.privID=p.privID WHERE mi.itemActive=1 AND mi.parentID=1 ORDER BY mi.itemOrder ASC |
0.0012 | get_value(): ">[1] SELECT itemTitle FROM perch2_menu_items WHERE itemType='app' AND itemValue='content' LIMIT 1 |
0.0004 | get_menu(): ">[1] SELECT mi.*, p.privKey FROM perch2_menu_items mi LEFT JOIN perch2_user_privileges p ON mi.privID=p.privID WHERE mi.itemActive=1 AND mi.parentID=0 ORDER BY itemOrder ASC LIMIT 1, 10 |
0.0002 | get_items(): ">[2] SELECT mi.*, p.privKey FROM perch2_menu_items mi LEFT JOIN perch2_user_privileges p ON mi.privID=p.privID WHERE mi.itemActive=1 AND mi.parentID=2 ORDER BY mi.itemOrder ASC |
0.0017 | title_panel(): ">File: /core/apps/content/modes/region.options.post.php |
0.0018 | __call(): ">Looking up missing property regionPublishRoles |
0 | get_value(): ">SELECT regionPublishRoles FROM perch2_content_regions WHERE regionID='45' |
0.0022 | get_value(): ">[0] Invalid query: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'regionPublishRoles' in 'field list' |
0.0028 | Queries: 12 |
0.0001 | Memory: 2.5148 |
How do I fix that 'Invalid query' issue…?