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

Select folder in setting plgEditor Tinymce, will not be select images sub directory for if create directory 'images' in directory 'administrator' #39946

Closed
korenevskiy opened this issue Feb 25, 2023 · 3 comments

Comments

@korenevskiy
Copy link
Contributor

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.

@korenevskiy korenevskiy changed the 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' Feb 25, 2023
@Hackwar Hackwar added the bug label Feb 26, 2023
@brianteeman
Copy link
Contributor

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

@joomdonation
Copy link
Contributor

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');

@joomdonation
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants