No Code Attached Yet bug
avatar korenevskiy
korenevskiy
25 Feb 2023

By creating the IMAGES directories in the ADMINISTRATOR directory.
Create the TEST subdirectory in the IMAGES directory.
Go to the settings of the Editor Tinymce plugin and select a subfolder to save images.
We see that the list for selecting subfolders is limited to only one TEST folder.
Thus, the list of the directory from the administrator folder is displayed in the plugin settings. But when saving image files in the materials manager, the files are still saved to the standard image folder. The presence of the IMAGES folder in the Admin folder breaks the configuration setting of the Tinymce editor plugin.

avatar korenevskiy korenevskiy - open - 25 Feb 2023
avatar joomla-cms-bot joomla-cms-bot - change - 25 Feb 2023
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 25 Feb 2023
avatar korenevskiy korenevskiy - change - 25 Feb 2023
Title
Select folder in setting plgEditor Tiny, will not be select images sub directory for if create directory 'images' in directory 'administrator'
Select folder in setting plgEditor Tinymce, will not be select images sub directory for if create directory 'images' in directory 'administrator'
avatar korenevskiy korenevskiy - edited - 25 Feb 2023
avatar Hackwar Hackwar - change - 26 Feb 2023
Labels Added: bug
avatar Hackwar Hackwar - labeled - 26 Feb 2023
avatar brianteeman
brianteeman - comment - 27 Feb 2023

For others looking at this. It is an obscure but valid bug.

The images directory option in TinyMCE should look something like this
image

In other words it should be displaying the /images directory and all subdirectories.

The bug occurs if you also have a folder /administrator/images

That should have no effect on the field in tiinymce but as shown below it does

image

avatar joomdonation
joomdonation - comment - 28 Feb 2023

Thanks @korenevskiy for reporting the bug and @brianteeman for explains the issue clearer. If someone has time, change this line of code https://github.com/joomla/joomla-cms/blob/4.2-dev/plugins/editors/tinymce/src/Field/UploaddirsField.php#L51 to the below code should fix the bug:

$this->directory   = JPATH_ROOT . '/' . ComponentHelper::getParams('com_media')->get('image_path');
avatar joomdonation
joomdonation - comment - 28 Feb 2023

I'm closing this issue because @korenevskiy made PR #39962 to solve it. Please help testing. Thanks.

avatar joomdonation joomdonation - close - 28 Feb 2023
avatar joomdonation joomdonation - change - 28 Feb 2023
Status New Closed
Closed_Date 0000-00-00 00:00:00 2023-02-28 07:59:00
Closed_By joomdonation

Add a Comment

Login with GitHub to post a comment