Disable the "Filesystem - Local" plugin and try to create a folder in the Media Manager
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.
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)
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.
Labels |
Added:
?
|
Title |
|
Title |
|
I guess we can throw an alert and not load the media manager.js if someone mess up badly the system
as stated in the other thread - the plugin is enabled on my system and it is still broken
@brianteeman what OS, browser?
any browser. windows 10
Category | ⇒ | com_media |
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?
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.
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
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.
... 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
@brianteeman I'm lost then. I just tried a clean install based on current 4.0-dev on Chrome/WIndows10 and had no issues.
i tried again with a completely fresh download and install in a completely new folder
no luck at all - exactly the same behaviour
@brianteeman is your test site on a subfolder? If so can you give us the relative path to the root of the server?
I did but I also tested it in the root
Do you have the same error or a different one?
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
Labels |
Added:
?
|
Errors are the same
After recovering from the overnight shock I will retest
I installed it on a linux server now and it worked fine - still wont work on my local server though
@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.
No it is a custom build based on Niks blog post - systeminfo attached
Status | New | ⇒ | Discussion |
@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?
{"error":true,"code":0,"message":"Call to undefined function mime_content_type()"}
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
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.
Sorry I was confusing this with the requirement to have php_fileinfo.dll enabled
Status | Discussion | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-12-12 08:35:51 |
Closed_By | ⇒ | franz-wohlkoenig |
Closed_Date | 2017-12-12 08:35:51 | ⇒ | 2017-12-12 08:35:52 |
Closed_By | franz-wohlkoenig | ⇒ | joomla-cms-bot |
Set to "closed" on behalf of @franz-wohlkoenig by The JTracker Application at issues.joomla.org/joomla-cms/16586
@Bakual: according to @laoneo closing this Issue, please open a new one at https://github.com/joomla-projects/media-manager-improvement.
There is no need to open another one as we fixed it already.
@Bakual quite similar to authentications plugins at least one filesystem adapter must be enabled at all times:
I guess we can throw an alert and not load the media manager.js if someone mess up badly the system