No Code Attached Yet
avatar laoneo
laoneo
14 Jan 2022

Steps to reproduce the issue

Drag and drop an image with TinyMCE in an article description.

Expected result

The real url of the image is used.

Actual result

The thumb url of the image is used.

System information (as much as possible)

Joomla 4

Additional comments

The code is here https://github.com/joomla/joomla-cms/blob/4.0-dev/build/media_source/plg_editors_tinymce/js/plugins/dragdrop/plugin.es5.js#L52-L60.

ping @dgrammatiko any feedback before I will do a pr why it is like that?

avatar laoneo laoneo - open - 14 Jan 2022
avatar joomla-cms-bot joomla-cms-bot - change - 14 Jan 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 14 Jan 2022
avatar dgrammatiko
dgrammatiko - comment - 14 Jan 2022

Line 59 should be

urlPath = response.data.url;

or something along this line. BTW the same (wrong, blame me here) code exists in the select-media.es6.js

avatar laoneo
laoneo - comment - 14 Jan 2022

Problem is that the ajax response doesn't contain the url. But if you agree that it should be .url, then I will do a pr.

avatar laoneo
laoneo - comment - 14 Jan 2022

BTW the same (wrong, blame me here) code exists in the select-media.es6.js

Don't think so as there is a file request done with the url parameter.

avatar dgrammatiko
dgrammatiko - comment - 14 Jan 2022

Problem is that the ajax response doesn't contain the url. But if you agree that it should be .url, then I will do a pr.

I think the problem is in the local adapter, somehow the URL is not set there and as a result, I had to use thumb_path. I observed the inconsistent behaviour on the thumbnails PR but didn't patch it yet. Probably I should (although I don't think that PR would make it to 4.1)

avatar laoneo laoneo - change - 14 Jan 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-01-14 19:01:49
Closed_By laoneo
avatar laoneo laoneo - close - 14 Jan 2022
avatar laoneo
laoneo - comment - 14 Jan 2022

Please test #36687.

avatar dgrammatiko
dgrammatiko - comment - 14 Jan 2022

Yes and no. I see the hardcoded part of the local- as a complete architecture failure. The response.data.url coming from the PHP should always be either the relative path (if local) or the external path. But maybe unrelated to the thumb part?

What I'm saying is that the conditional should be more like: does it start with http || \\? instead of the hardcoded part...

avatar laoneo
laoneo - comment - 14 Jan 2022

This is handled in #36667.

Add a Comment

Login with GitHub to post a comment