Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Media manager error, when "Path to Files Folder" field contain folder that not in the plugin "FileSystem - Local", COM_MEDIA_ERROR_ACCOUNT_NOT_FOUND #44277

Closed
spike277 opened this issue Oct 16, 2024 · 11 comments · May be fixed by #44313

Comments

@spike277
Copy link

Steps to reproduce the issue

If the standard image directory is changed under Plugins System File System, TinyMCe produces an error message
COM_MEDIA_ERROR_ACCOUNT_NOT_FOUND

Please fix it. Thanks

Expected result

Actual result

System information (as much as possible)

Additional comments

@brianteeman
Copy link
Contributor

Bug confirmed

@Octopus2
Copy link

I have the same problem under 5.2 and cannot edit existing articles either via the backend or the frontend. However, I have neither changed the standard image directory under Plugins System File System, nor do I have Phoca Download installed. The template is Helix Ultimate. This is very problematic, as I had no issues under 5.1.4. What additional information is needed? Here is the debug-info:

COM_MEDIA_ERROR_ACCOUNT_NOT_FOUND    
# | Function | Location
-- | -- | --
1 | () | JROOT/administrator/components/com_media/src/Provider/ProviderManager.php:128
2 | Joomla\Component\Media\Administrator\Provider\ProviderManager->getAdapter() | JROOT/administrator/components/com_media/src/Provider/ProviderManagerHelperTrait.php:97
3 | class@anonymous/www/htdocs/DOMAIN REMOVED/plugins/editors/tinymce/src/PluginTraits/DisplayTrait.php:333$15->getAdapter() | JROOT/administrator/components/com_media/src/Provider/ProviderManagerHelperTrait.php:151
4 | class@anonymous/www/htdocs/DOMAIN REMOVED/plugins/editors/tinymce/src/PluginTraits/DisplayTrait.php:333$15->getDefaultAdapterName() | JROOT/administrator/components/com_media/src/Provider/ProviderManagerHelperTrait.php:123
5 | class@anonymous/www/htdocs/DOMAIN REMOVED/plugins/editors/tinymce/src/PluginTraits/DisplayTrait.php:333$15->resolveAdapterAndPath() | JROOT/plugins/editors/tinymce/src/PluginTraits/DisplayTrait.php:338
6 | class@anonymous/www/htdocs/DOMAIN REMOVED/plugins/editors/tinymce/src/PluginTraits/DisplayTrait.php:333$15->prepareTinyMCEUploadPath() | JROOT/plugins/editors/tinymce/src/PluginTraits/DisplayTrait.php:352
7 | Joomla\Plugin\Editors\TinyMCE\Provider\TinyMCEProvider->display() | JROOT/libraries/src/Editor/Editor.php:211
8 | Joomla\CMS\Editor\Editor->display() | JROOT/libraries/src/Form/Field/EditorField.php:250
9 | Joomla\CMS\Form\Field\EditorField->getInput() | JROOT/libraries/src/Form/FormField.php:482
10 | Joomla\CMS\Form\FormField->__get() | JROOT/libraries/src/Form/Field/TextareaField.php:94
11 | Joomla\CMS\Form\Field\TextareaField->__get() | JROOT/libraries/src/Form/Field/EditorField.php:138
12 | Joomla\CMS\Form\Field\EditorField->__get() | JROOT/libraries/src/Form/Form.php:458
13 | Joomla\CMS\Form\Form->getInput() | JROOT/administrator/components/com_content/tmpl/article/edit.php:73
14 | include() | JROOT/libraries/src/MVC/View/HtmlView.php:416
15 | Joomla\CMS\MVC\View\HtmlView->loadTemplate() | JROOT/libraries/src/MVC/View/HtmlView.php:204
16 | Joomla\CMS\MVC\View\HtmlView->display() | JROOT/administrator/components/com_content/src/View/Article/HtmlView.php:135
17 | Joomla\Component\Content\Administrator\View\Article\HtmlView->display() | JROOT/libraries/src/MVC/Controller/BaseController.php:697
18 | Joomla\CMS\MVC\Controller\BaseController->display() | JROOT/administrator/components/com_content/src/Controller/DisplayController.php:65
19 | Joomla\Component\Content\Administrator\Controller\DisplayController->display() | JROOT/libraries/src/MVC/Controller/BaseController.php:730
20 | Joomla\CMS\MVC\Controller\BaseController->execute() | JROOT/libraries/src/Dispatcher/ComponentDispatcher.php:143
21 | Joomla\CMS\Dispatcher\ComponentDispatcher->dispatch() | JROOT/libraries/src/Component/ComponentHelper.php:361
22 | Joomla\CMS\Component\ComponentHelper::renderComponent() | JROOT/libraries/src/Application/AdministratorApplication.php:150
23 | Joomla\CMS\Application\AdministratorApplication->dispatch() | JROOT/libraries/src/Application/AdministratorApplication.php:195
24 | Joomla\CMS\Application\AdministratorApplication->doExecute() | JROOT/libraries/src/Application/CMSApplication.php:306
25 | Joomla\CMS\Application\CMSApplication->execute() | JROOT/administrator/includes/app.php:58
26 | require_once() | JROOT/administrator/index.php:32

</div><!--EndFragment-->
</body>
</html>

@brianteeman
Copy link
Contributor

This appears to be the result of the changes made in #43579

I can replicate the bug and if I revert the changes in that PR the bug is cleared.

Hope that helps someone to resolve the bug

@Fedik
Copy link
Member

Fedik commented Oct 17, 2024

It is not very clear how to reproduce the error.
After update to 5.2 TinyMCE works, drag&drop upload works, for me.

@Fedik
Copy link
Member

Fedik commented Oct 17, 2024

I found it can only happen when "Media: Options" => "Path to Files Folder" field contain folder that not in the plugin "FileSystem - Local", and "Images Directory" in the TinyMCE plugin is empty.

Can someone confirm?

@Fedik
Copy link
Member

Fedik commented Oct 17, 2024

To fix this error on your site, please make sure the folder in "Media: Options" => "Path to Files Folder" also choosen in the plugin "FileSystem - Local".

It is strange behavior of Media manager, in

$defaultAdapter = $this->getAdapter('local-' . ComponentHelper::getParams('com_media')->get('file_path', 'images'));

The #43579 uncovered this bug.

@Fedik Fedik changed the title Joomla 5.2.0 TinyMCE Error Media manager error, when "Path to Files Folder" field contain folder that not in the plugin "FileSystem - Local" Oct 17, 2024
@Fedik Fedik changed the title Media manager error, when "Path to Files Folder" field contain folder that not in the plugin "FileSystem - Local" Media manager error, when "Path to Files Folder" field contain folder that not in the plugin "FileSystem - Local", COM_MEDIA_ERROR_ACCOUNT_NOT_FOUND Oct 17, 2024
@brianteeman
Copy link
Contributor

To fix this error on your site, please make sure the folder in "Media: Options" => "Path to Files Folder" also choosen in the plugin "FileSystem - Local".

That only partialy works. If you select a root folder eg plugins in the filesystem-local then you have to select a subfolder of plugins in tinymce. Leaving it empty in tinymce does not default to the plugins folder and still gives the error,

Either way thats not a real fix just a temp fix until code can be fixed and released.

@Fedik
Copy link
Member

Fedik commented Oct 17, 2024

If you select a root folder eg plugins in the filesystem-local then you have to select a subfolder of plugins in tinymce.

Let say you have folder files. Then you have to:

  • Edit Media manager global options, set "Path to Files Folder" to files
  • Edit plugin "FileSystem - Local", and select files there.

Then TinyMCE will work even with empty value, all upload will be directly in to files/ folder.

Either way thats not a real fix just a temp fix until code can be fixed and released.

Yeap.

@brianteeman
Copy link
Contributor

it did not work for me with the empty as you described

@spike277
Copy link
Author

@Fedik I know thanks, but thats no option for me. I hope for fix.


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

@Fedik
Copy link
Member

Fedik commented Oct 19, 2024

Please test #44313

@Fedik Fedik closed this as completed Oct 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants