You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looks like admin.php is not returning a proper JSON response for Admin users who are NOT Main Admin and may not have permissions for the update function.
JavaScript Console Error
VM6027:1 Uncaught SyntaxError: Unexpected token '<', "<!doctype "... is not valid JSON
at JSON.parse (<anonymous>)
at n.parseJSON (jquery.min.js:4:6340)
at Object.success (admin.php:104:22)
at i (jquery.min.js:2:27151)
at Object.fireWith [as resolveWith] (jquery.min.js:2:27914)
at z (jquery.min.js:4:12059)
at XMLHttpRequest.<anonymous> (jquery.min.js:4:15619)
From admin.php:
$('#e-admin-core-update').html('<i title="Checking for updates" class="fa fa-spinner fa-spin"></i>');
$.get('../e107_admin/admin.php?mode=core&type=update', function( data ) {
var res = $.parseJSON(data);
if(res === true)
{
$('#e-admin-core-update').html('<span class="text-info"><i class="fa fa-database"></i></span>');
$('[data-toggle="popover"]').popover('show');
$('.popover').on('click', function()
{
$('[data-toggle="popover"]').popover('hide');
});
}
else
{
// Hide li element.
$('#e-admin-core-update').parent().hide();
}
});
How to reproduce
Log in as and Admin without permissions for updates and go to Admin Area,
Expected behavior
Not fail.
What browser(s) are you seeing the problem on?
Chrome / Brave
PHP Version
8.2.2
The text was updated successfully, but these errors were encountered:
What e107 version are you using?
v2.3.3
Bug description
Looks like admin.php is not returning a proper JSON response for Admin users who are NOT Main Admin and may not have permissions for the update function.
JavaScript Console Error
From admin.php:
How to reproduce
Log in as and Admin without permissions for updates and go to Admin Area,
Expected behavior
Not fail.
What browser(s) are you seeing the problem on?
Chrome / Brave
PHP Version
8.2.2
The text was updated successfully, but these errors were encountered: