? ?
avatar Bakual
Bakual
8 Jun 2017

Steps to reproduce the issue

Disable the "Filesystem - Local" plugin and try to create a folder in the Media Manager

Expected result

An error message.
Best would probably be no button and a big error message that at least one plugin of the type "filesystem" has to be enabled.

Actual result

Trying to create a folder gives a JS error in the console, but otherwise no feedback.

mediamanager.js:8741 Uncaught TypeError: Cannot read property 'type' of undefined
    at Api._normalizeItem (mediamanager.js:8741)
    at Object.<anonymous> (mediamanager.js:8664)
    at i (jquery.min.js?ef4f4ab…:2)
    at Object.fireWith [as resolveWith] (jquery.min.js?ef4f4ab…:2)
    at A (jquery.min.js?ef4f4ab…:4)
    at XMLHttpRequest.<anonymous> (jquery.min.js?ef4f4ab…:4)

Additional comments

This was detected by @brianteeman in #16561 (comment), I openend a new issue for it.

On a sidenote it wasn't quite clear to me what that "Filesystem - Local" plugin does. Maybe the group can be renamed to media-filesystem similar to the media-action group. So it is clear it relates to the Media Manager.

avatar Bakual Bakual - open - 8 Jun 2017
avatar joomla-cms-bot joomla-cms-bot - change - 8 Jun 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 8 Jun 2017
avatar Bakual Bakual - change - 8 Jun 2017
Title
[4.0] [Mediamanager]
[4.0] [Mediamanager] Error when no filesystem plugin is installed/enabled
avatar Bakual Bakual - change - 8 Jun 2017
Title
[4.0] [Mediamanager]
[4.0] [Mediamanager] Error when no filesystem plugin is installed/enabled
avatar Bakual Bakual - edited - 8 Jun 2017
avatar dgt41
dgt41 - comment - 8 Jun 2017

@Bakual quite similar to authentications plugins at least one filesystem adapter must be enabled at all times:

screen shot 2017-06-08 at 19 19 47

I guess we can throw an alert and not load the media manager.js if someone mess up badly the system

avatar zero-24
zero-24 - comment - 8 Jun 2017

I guess we can throw an alert and not load the media manager.js if someone mess up badly the system

?

avatar brianteeman
brianteeman - comment - 8 Jun 2017

as stated in the other thread - the plugin is enabled on my system and it is still broken

avatar dgt41
dgt41 - comment - 8 Jun 2017

@brianteeman what OS, browser?

avatar brianteeman
brianteeman - comment - 8 Jun 2017

any browser. windows 10

avatar franz-wohlkoenig franz-wohlkoenig - change - 8 Jun 2017
Category com_media
avatar yvesh
yvesh - comment - 8 Jun 2017

When we want to continue with plugins than we need a way to make certain that some plugins can't be disabled / uninstalled etc.

@andrepereiradasilva you made a pull request for that some time ago. Are you interested on following up on this?

avatar Bakual
Bakual - comment - 8 Jun 2017

as stated in the other thread - the plugin is enabled on my system and it is still broken

That's strange. What happens if you open and save the "Filesystem - Local" plugin? Or disable/enable it? And maybe try running the database fixer?
My tests were done on my existing site and I discovered the plugins.

avatar Bakual
Bakual - comment - 8 Jun 2017

When we want to continue with plugins than we need a way to make certain that some plugins can't be disabled / uninstalled etc.

Disabling is fine. Uninstalling would be fine as well, you would mess with your system the same way you do when you uninstall other core plugins. Given you have at least one other plugin it will work as expected.

quite similar to authentications plugins at least one filesystem adapter must be enabled at all times:

Similar but not the same bad outcome. If you have no filesystem plugin enabled, the media manager becomes useless. But that's all and it is easy to fix again. However if you disable all authentication plugins, good luck with fixing that as you can't log in anymore ?

avatar brianteeman
brianteeman - comment - 8 Jun 2017

I didnt need to discover as it was a clean install

I tried the enable/disaable trick - nothing

Nothing to fix
Database schema version (in #__schemas): 4.0.0-2017-05-31.

avatar andrepereiradasilva
andrepereiradasilva - comment - 8 Jun 2017

... and that is one of the reasons the PR (#13037) was created, ie, to allow for extensions to be protected from disabling, and/or locked from uninstalling.

avatar Bakual
Bakual - comment - 8 Jun 2017

... and that is one of the reasons the PR (#13037) was created, ie, to allow for extensions to be protected from disabling, and/or locked from uninstalling.

Only that it would be absolutely fine to disable that specific plugin, if you have another one. Eg a dropbox integration plugin ?

avatar Bakual
Bakual - comment - 8 Jun 2017

@brianteeman I'm lost then. I just tried a clean install based on current 4.0-dev on Chrome/WIndows10 and had no issues.

avatar brianteeman
brianteeman - comment - 8 Jun 2017

i tried again with a completely fresh download and install in a completely new folder
no luck at all - exactly the same behaviour

avatar dgt41
dgt41 - comment - 8 Jun 2017

@brianteeman is your test site on a subfolder? If so can you give us the relative path to the root of the server?

avatar brianteeman
brianteeman - comment - 8 Jun 2017

I did but I also tested it in the root

avatar laoneo
laoneo - comment - 9 Jun 2017

Do you have the same error or a different one?

avatar dneukirchen
dneukirchen - comment - 9 Jun 2017

We should at least handle this case in the Media Manager itself and display a warning when no filesystem plugin is installed or enabled. I will create an issue for that in the nmm repo

avatar Bakual Bakual - change - 9 Jun 2017
Labels Added: ?
avatar Bakual Bakual - labeled - 9 Jun 2017
avatar brianteeman
brianteeman - comment - 9 Jun 2017

Errors are the same

avatar brianteeman
brianteeman - comment - 9 Jun 2017

After recovering from the overnight shock I will retest

avatar brianteeman
brianteeman - comment - 9 Jun 2017

I installed it on a linux server now and it worked fine - still wont work on my local server though

avatar Bakual
Bakual - comment - 9 Jun 2017

@brianteeman Are you using XAMPP for your local server? Because that one works fine on my Windows 10. Just trying to figure out the difference in the setup.

avatar brianteeman
brianteeman - comment - 9 Jun 2017

No it is a custom build based on Niks blog post - systeminfo attached

systeminfo-2017-06-09T13-58-52+00-00.txt

avatar franz-wohlkoenig franz-wohlkoenig - change - 9 Jun 2017
Status New Discussion
avatar dneukirchen
dneukirchen - comment - 9 Jun 2017

@brianteeman can you login as admin, open /administrator/index.php?option=com_media&format=json&task=api.files&path=/ and post the response of that request?

avatar brianteeman
brianteeman - comment - 10 Jun 2017

{"error":true,"code":0,"message":"Call to undefined function mime_content_type()"}

avatar brianteeman
brianteeman - comment - 10 Jun 2017

OK so I have it working now. @dneukirchen post pointed me in the correct place inside php and I had to enable php_fileinfo.dll DLL file in php.ini

https://stackoverflow.com/questions/14809054/mime-content-type-function-not-working

So as I expected it is a server configuration issue that we must detect and provide a sensible error message. We also need to update the system requirements to indicate that this needs to be enabled AND to test for it

avatar laoneo
laoneo - comment - 13 Jun 2017

Made a pr which should handle your situation carefully joomla-projects/media-manager-improvement#248 and will not crash when that function doesn't exist.

avatar brianteeman
brianteeman - comment - 13 Jun 2017

Sorry I was confusing this with the requirement to have php_fileinfo.dll enabled

avatar franz-wohlkoenig franz-wohlkoenig - change - 12 Dec 2017
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2017-12-12 08:35:51
Closed_By franz-wohlkoenig
avatar joomla-cms-bot joomla-cms-bot - change - 12 Dec 2017
Closed_Date 2017-12-12 08:35:51 2017-12-12 08:35:52
Closed_By franz-wohlkoenig joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - close - 12 Dec 2017
avatar joomla-cms-bot
joomla-cms-bot - comment - 12 Dec 2017
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 12 Dec 2017

@Bakual: according to @laoneo closing this Issue, please open a new one at https://github.com/joomla-projects/media-manager-improvement.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/16586.

avatar laoneo
laoneo - comment - 12 Dec 2017

There is no need to open another one as we fixed it already.

Add a Comment

Login with GitHub to post a comment