modxcms / revolution

MODX Revolution - Content Management Framework
https://modx.com/
GNU General Public License v2.0
1.36k stars 529 forks source link

MODX 3 Lack of access when working with a media source #14714

Closed Ruslan-Aleev closed 5 years ago

Ruslan-Aleev commented 5 years ago

Bug report

Summary

I created a new file source and linked it to the assets/ folder.

When I try to upload a file to TV, or open a file source, an access error appears:

source

Environment

MODX 3

Mark-H commented 5 years ago

Can't reproduce; see my configuration:

Schermafbeelding 2019-09-03 om 17 07 40 Schermafbeelding 2019-09-03 om 17 08 05 Schermafbeelding 2019-09-03 om 17 07 52

Ruslan-Aleev commented 5 years ago

Yes, everything is the same with me, although in the "Source Type" it is different for me - File System.

So I tried to manually add the user: source2

Ruslan-Aleev commented 5 years ago

Error log:

[03-Sep-2019 18:09:41 Europe/Moscow] PHP Fatal error:  Uncaught Error: Call to a member function hasPermission() on array in /home/a/aleeviz8/m3/public_html/core/cache/mgr/smarty/default/89692df6532ffacaf14a4abf11b3ba3c3664444a_0.file.onlineusers.tpl.php:86
Stack trace:
#0 /home/a/aleeviz8/m3/public_html/core/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php(123): content_5d6e82354033d3_17110516(Object(Smarty_Internal_Template))
#1 /home/a/aleeviz8/m3/public_html/core/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode(Object(Smarty_Internal_Template))
#2 /home/a/aleeviz8/m3/public_html/core/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(216): Smarty_Template_Compiled->render(Object(Smarty_Internal_Template))
#3 /home/a/aleeviz8/m3/public_html/core/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(232): Smarty_Internal_Template->render(false, 0)
#4 /home/a/aleeviz8/m3/public_html/core/vendor/smarty/smarty/libs/sysplugins/smarty_in in /home/a/aleeviz8/m3/public_html/core/cache/mgr/smarty/default/89692df6532ffacaf14a4abf11b3ba3c3664444a_0.file.onlineusers.tpl.php on line 86
[03-Sep-2019 18:14:04 Europe/Moscow] PHP Fatal error:  Class 'modUserGroupRoleGetListProcessor' not found in /home/a/aleeviz8/m3/public_html/core/src/Revolution/Processors/Security/Role/GetAuthorityList.php on line 28

Line 86 in 89692df6532ffacaf14a4abf11b3ba3c3664444a_0.file.onlineusers.tpl.php: <?php if ($_smarty_tpl->tpl_vars['can_view_logs']->value) {?>

Line 28 in GetAuthorityList.php: class GetAuthorityList extends modUserGroupRoleGetListProcessor

Mark-H commented 5 years ago

That hasPermission error is fixed in https://github.com/modxcms/revolution/pull/14710 (merged today) and the role dropdown not working in https://github.com/modxcms/revolution/pull/14706 (not yet merged)

Ruslan-Aleev commented 5 years ago

Yes, I have the current version of MODX 3: Fix permission check causing fatal error on dashboard [#14707] (#14710)

I tried with PR https://github.com/modxcms/revolution/pull/14706, but there is also an error.

Ruslan-Aleev commented 5 years ago

@JoshuaLuckers This problem may be related with https://github.com/modxcms/revolution/pull/14704 similarly https://github.com/modxcms/revolution/issues/14687#issuecomment-527532658 ?

petyagrill commented 5 years ago

I tried to reproduce, there are no errors. Everything works as expected.

JoshuaLuckers commented 5 years ago

I can't even select another Media Source for a Template Variable..

Ruslan-Aleev commented 5 years ago

@Mark-H @opengeek @JoshuaLuckers @bezumkin How is it possible that some users have no problems at all, and some have bugs?

Ibochkarev commented 5 years ago

Fixed in #14720 @modxbot close