Skip to content
This repository has been archived by the owner on Feb 9, 2021. It is now read-only.

JS error when setting admin groups permmissions #269

Open
FLIKI opened this issue Dec 19, 2016 · 9 comments
Open

JS error when setting admin groups permmissions #269

FLIKI opened this issue Dec 19, 2016 · 9 comments

Comments

@FLIKI
Copy link

FLIKI commented Dec 19, 2016

v5.1.0
New admin interface: adm/admins/admins-groups-permissions
Trying to set a new admin group permmission returns js error:

jquery-2.1.0.min.js:4 POST http://10.0.0.99/stalker_portal/server/adm/admins/save-admins-group-permissions 500 (Internal Server Error)

send @ jquery-2.1.0.min.js:4
ajax @ jquery-2.1.0.min.js:4
ajaxPostSend @ devoops.js?ver=5.1.0:702
(anonymous) @ admins-groups-permissions?id=14:12404
dispatch @ jquery-2.1.0.min.js:3
r.handle @ jquery-2.1.0.min.js:3

@FLIKI
Copy link
Author

FLIKI commented Feb 18, 2017

Just updated to 5.1.1
The problem remains.
jquery error

stalker_portal/server/adm/admins/save-admins-group-permissions 500 (Internal Server Error)
send @ jquery-2.1.0.min.js:4
ajax @ jquery-2.1.0.min.js:4
ajaxPostSend @ devoops.js?ver=5.1.1:707
(anonymous) @ admins-groups-permissions?id=12:12751
dispatch @ jquery-2.1.0.min.js:3
r.handle @ jquery-2.1.0.min.js:3

@azhurb
Copy link
Owner

azhurb commented Mar 1, 2017

Please check apache error log.

@FLIKI
Copy link
Author

FLIKI commented Mar 1, 2017

HI. Here is the error from the error log...
I guess it ends like that because of some kind of log lenght setting.

/var/log/apache2/stalker_portal-error.log

[Wed Mar 01 13:32:17.572374 2017] [:error] [pid 12515] [client 127.0.0.1:60440] Query failed by reason : Column count doesn't match value count at row 14 (INSERT INTO adm_grp_action_access (controller_name, action_name, is_ajax, view_access, edit_access, action_access, description, group_id, hidden, only_top_admin, blocked) value ('admins', '', '0', 0, 0, 0, 'Management system administrators, groups and rights', 12, '0', '0', '0'), ('admins', 'admins-groups', '0', 0, 0, 0, 'List of groups of administrators', 12, '0', '0', '0'), ('admins', 'admins-groups-list-json', '1', 0, 0, 0, 'List of groups of administrators by page + filters', 12, '0', '0', '0'), ('admins', 'admins-groups-permissions', '0', 0, 0, 0, 'Form view the permissions of the current group', 12, '0', '0', '0'), ('admins', 'admins-list', '0', 0, 0, 0, 'List of administrators', 12, '0', '0', '0'), ('admins', 'admins-list-json', '1', 0, 0, 0, 'The list of administrators by page + filters', 12, '0', '0', '0'), ('admins', 'check-admins-group-name', '1', 0, 0, 0, 'Validation group name', 12, '0', '0', '0'), ('admins', 'check-admins-login', '1', 0, 0, 0, 'Validation Administrator Login', 12, '0', '0', '0'), ('admins', 'remove-admin', '1', 0, 0, 0, 'Removing administrator', 12, '0', '0', '0'), ('admins', 'remove-admins-group', '1', 0, 0, 0, 'Removing a group', 12, '0', '0', '0'), ('admins', 'save-admin', '1', 0, 0, 0, 'Viewing and editing administrator', 12, '0', '0', '0'), ('admins', 'save-admins-group', '1', 0, 0, 0, 'Viewing and editing group', 12, '0', '0', '0'), ('admins', 'save-admins-group-permissions', '1', 0, 0, 0, 'View and edit permissions of the current group', 12, '0', '0', '0'), (0, 0, 0, 12), ('application-catalog', 'smart-application-add', '1', 0, 0, 0, 'Application for SmartLauncher. Add new application by package name', 12, '0', '0', '0'), ('application-catalog', 'smart-application-check-update', '1', 0, 0, 0, 'Application for SmartLauncher. Checking for updates for applications', 12, '0', '0', '0'), ('application-catalog', 'smart-application-delete', '1', 0, 0, 0, 'Application for SmartLauncher. Delete application', 12, '0', '0', '0'), ('application-catalog', 'smart-application-detail', '0', 0, 0, 0, 'Application for SmartLauncher. Application info and list of available application versions', 12, '0', '0', '0'), ('application-catalog', 'smart-application-download-list', '1', 0, 0, 0, 'Application for SmartLauncher. Saving list of installed applications into the file', 12, '0', '0', '0'), ('application-catalog', 'smart-application-get-data-from-repo', '1', 0, 0, 0, 'Application for SmartLauncher. Getting application info from repository', 12, '0', '0', '0'), ('application-catalog', 'smart-application-list', '0', 0, 0, 0, 'Application for SmartLauncher. List of applications', 12, '0', '0', '0'), ('application-catalog', 'smart-application-list-json', '1', 0, 0, 0, 'Application for SmartLauncher. List of applications by page + filters', 12, '0', '0', '0'), ('application-catalog', 'smart-application-reset-all', '1', 0, 0, 0, 'Application for SmartLauncher. Uninstalling all old applications and installation of latest base apps', 12, '0', '0', '0'), ('application-catalog', 'smart-application-toggle-state', '1', 0, 0, 0, 'Application for SmartLauncher. Enable and disable application', 12, '0', '0', '0'), ('application-catalog', 'smart-application-update', '1', 0, 0, 0, 'Application for SmartLauncher. Updating applications', 12, '0', '0', '0'), ('application-catalog', 'smart-application-upload-list', '1', 0, 0, 0, 'Application for SmartLauncher. Restoring installed applications from list of saved in file', 12, '0', '0', '0'), ('application-catalog', 'smart-application-version-delete', '1', 0, 0, 0, 'Application for SmartLauncher. Delete installed application version', 12, '0', '0', '0'), ('application-catalog', 'smart-application-version-install', '1', 0, 0, 0, 'Application for SmartLauncher. Install available application version', 12, '0', '0', '0'), ('application-catalog', 'smart-application-version-list-json', '1', 0, 0, 0, 'Application for SmartLauncher. List of application versions', 12, '0', '0', '0'), ('application-catalog', 'smart-application-version-save-option', '1', 0, 0, 0, 'Application for SmartLauncher. Editing the options of application', 12, '0', '0', '0'), ('audio-club', '', '0', 0, 0, 0, 'Audio club', 12, '0', '0', '0'), ('audio-club', 'add-audio-albums', '0', 0, 0, 0, 'Add Album', 12, '0', '0', '0'), ('audio-club', 'add-audio-artists', '1', 0, 0, 0, 'Add artist', 12, '0', '0', '0'), ('audio-club', 'add-audio-genres', '1', 0, 0, 0, 'Add audio genre', 12, '0', '0', '0'), ('audio-club', 'add-audio-languages', '1', 0, 0, 0, 'Add language of performance', 12, '0', '0', '0'), ('audio-club', 'add-audio-years', '1', 0, 0, 0, 'Add the year of release', 12, '0', '0', '0'), ('audio-club', 'audio-albums', '0', 0, 0, 0, 'Album list', 12, '0', '0', '0'), ('audio-club', 'audio-albums-composition-list-json', '1', 0, 0, 0, 'List of compositions in the album', 12, '0', '0', '0'), ('audio-club', 'audio-albums-list-json', '1', 0, 0, 0, 'Album list page by page + filters', 12, '0', '0', '0'), ('audio-club', 'audio-artists', '0', 0, 0, 0, 'List of artists', 12, '0', '0', '0'), ('audio-club', 'audio-artists-list-json', '1', 0, 0, 0, 'List of artists by page + filters', 12, '0', '0', '0'), ('audio-club', 'audio-genres', '0', 0, 0, 0, 'List of audio genres', 12, '0', '0', '0'), ('audio-club', 'audio-genres-list-json', '1', 0, 0, 0, 'List of audio genres by page + filters', 12, '0', '0', '0'), ('audio-club', 'audio-languages', '0', 0, 0, 0, 'List of language performance', 12, '0', '0', '0'), ('audio-club', 'audio-languages-list-json', '1', 0, 0, 0, 'List of language performance by page + filters', 12, '0', '0', '0'), ('audio-club', 'audio-track-reorder', '1', 0, 0, 0, 'Change the order of compositions in the album', 12, '0', '0', '0'), ('audio-club', 'audio-tracks-manage', '1', 0, 0, 0, 'Editing a composition', 12, '0', '0', '0'), ('audio-club', 'audio-years', '0', 0, 0, 0, 'List of years of release', 12, '0', '0', '0'), ('audio-club', 'audio-years-list-json', '1', 0, 0, 0, 'List of years of release by page + filters', 12, '0', '0', '0'), ('audio-club', 'check-audio-artists-name', '1', 0, 0, 0, 'Validation artist name', 12, '0', '0', '0'), ('audio-club', 'check-audio-genres-name', '1', 0, 0, 0, 'Validation names audio genre', 12, '0', '0', '0'), ('audio-club', 'check-audio-languages-name', '1', 0, 0, 0, 'Validation name of the language of performance', 12, '0', '0', '0'), ('audio-club', 'check-audio-years-name', '1', 0, 0, 0, 'Validation names of release', 12, '0', '0', '0'), ('audio-club', 'delete-audio-cover', '1', 0, 0, 0, 'Delete the album cover', 12, '0', '0', '0'), ('audio-club', 'edit-audio-albums', '0', 0, 0, 0, 'Viewing and editing album', 12, '0', '0', '0'), ('audio-club', 'edit-audio-artists', '1', 0, 0, 0, 'Edit artist', 12, '0', '0', '0'), ('audio-club', 'edit-audio-cover', '1', 0, 0, 0, 'Change the album cover', 12, '0', '0', '0'), ('audio-club', 'edit-audio-genres', '1', 0, 0, 0, 'Edit audio genre', 12, '0', '0', '0'), ('audio-club', 'edit-audio-languages', '1', 0, 0, 0, 'Edit language of performance', 12, '0', '0', '0'), ('audio-club', 'edit-audio-years', '1', 0, 0, 0, 'Edit the year of release', 12, '0', '0', '0'), ('audio-club', 'get-media-info-json', '1', 0, 0, 0, 'Getting media-info from source', 12, '0', '0', '0'), ('audio-club', 'remove-audio-album-track', '1', 0, 0, 0, 'Removing a composition', 12, '0', '0', '0'), ('audio-club', 'remove-audio-albums', '1', 0, 0, 0, 'Removing album', 12, '0', '0', '0'), ('audio-club', 'remove-audio-artists', '1', 0, 0, 0, 'Remove artist', 12, '0', '0', '0'), ('audio-club', 'remove-audio-genres', '1', 0, 0, 0, 'Remove the audio genre', 12, '0', '0', '0'), ('audio-club', 'remove-audio-languages', '1', 0, 0, 0, 'Remove language of performance', 12, '0', '0', '0'), ('audio-club', 'remove-audio-years', '1', 0, 0, 0, 'Remove year of year of release', 12, '0', '0', '0'), ('audio-club', 'toggle-audio-album-track', '1', 0, 0, 0, 'Change the on/off state of the composition', 12, '0', '0', '0'), ('audio-club',

@azhurb
Copy link
Owner

azhurb commented Mar 1, 2017

Please replace file /stalker_portal/admin/src/Model/AdminsModel.php on this https://gist.githubusercontent.com/massiw/f2db5e85b9ef6d2639ff6e9f51fab70a/raw/361e098a8653616f5743e1a6e9472c9a71fc437f/AdminsModel.php
Then try to set permissions for admin group and paste here new messages from apache error log.

@FLIKI
Copy link
Author

FLIKI commented Mar 1, 2017

Two errors with one click on the save button

[Wed Mar 01 18:22:34.923504 2017] [:error] [pid 12515] [client 127.0.0.1:37770] Query failed by reason : Unknown column '1' in 'field list' (INSERT INTO adm_grp_action_access (1) value ('')), referer: http://10.0.0.99/stalker_portal/server/adm/admins/admins-groups-permissions?id=12
[Wed Mar 01 18:22:34.923617 2017] [:error] [pid 12515] [client 127.0.0.1:37770] Query failed by reason : Unknown column '1' in 'field list' (INSERT INTO adm_grp_action_access (1) value ('')), referer: http://10.0.0.99/stalker_portal/server/adm/admins/admins-groups-permissions?id=12

@azhurb
Copy link
Owner

azhurb commented Mar 2, 2017

@FLIKI
Copy link
Author

FLIKI commented Mar 3, 2017

[Fri Mar 03 02:03:48.861500 2017] [:error] [pid 18598] [client 127.0.0.1:49260] PHP Warning: trim() expects parameter 1 to be string, array given in /var/www/stalker_portal/server/lib/core/mysql.class.php on line 880, referer: http://10.0.0.99/stalker_portal/server/adm/admins/admins-groups-permissions?id=12
[Fri Mar 03 02:03:48.861557 2017] [:error] [pid 18598] [client 127.0.0.1:49260] PHP Warning: mysqli_real_escape_string() expects parameter 2 to be string, array given in /var/www/stalker_portal/server/lib/core/mysql.class.php on line 870, referer: http://10.0.0.99/stalker_portal/server/adm/admins/admins-groups-permissions?id=12
[Fri Mar 03 02:03:48.861689 2017] [:error] [pid 18598] [client 127.0.0.1:49260] Query failed by reason : Unknown column '1' in 'field list' (INSERT INTO adm_grp_action_access (1) value ('')), referer: http://10.0.0.99/stalker_portal/server/adm/admins/admins-groups-permissions?id=12
[Fri Mar 03 02:03:48.861812 2017] [:error] [pid 18598] [client 127.0.0.1:49260] Query failed by reason : Unknown column '1' in 'field list' (INSERT INTO adm_grp_action_access (1) value ('')), referer: http://10.0.0.99/stalker_portal/server/adm/admins/admins-groups-permissions?id=12

@azhurb
Copy link
Owner

azhurb commented Mar 3, 2017

Unfortunately we were not able to reproduce the problem. Please describe step by step your actions, attached screenshots can also help.

@FLIKI
Copy link
Author

FLIKI commented Mar 20, 2017

I made a fresh install on a brand new server, and all works.
The Broken install has been updated several times from version 4.9.9 sequentially to version 5.1.1. I am guessing something went wrong and broke during the updates

I will now try to copy the database from the broken one to the new working server and see if the problem comes from broken database.

It is not a major bug and probably it's just a one time error , but even so if someone else has the same problem, try a fresh install.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants