J3 Issue ?
avatar b2z
b2z
10 Apr 2019

Issue after update from 3.9.4 to 3.9.5.

Steps to reproduce the issue

  1. Ensure that you are using TinyMCE editor.
  2. Open article.
  3. Try to drag & drop an image.

Expected result

Image is uploaded successfully.

Actual result

Error "Unable to upload file"

System information (as much as possible)

PHP Version: 7.2.10
Web Server: Apache/2.4.6 (CentOS) mpm-itk/2.4.7-04 OpenSSL/1.0.2k-fips PHP/7.2.10
Joomla! Version: Joomla! 3.9.5 Stable [ Amani ] 9-April-2019 15:00 GMT

Additional comments

Console response
{"status":"0","message":"Unable to upload file.","error":"Unable to upload file."}

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
2.00

avatar b2z b2z - open - 10 Apr 2019
avatar joomla-cms-bot joomla-cms-bot - labeled - 10 Apr 2019
avatar HLeithner
HLeithner - comment - 10 Apr 2019

Confirmed.

avatar franz-wohlkoenig franz-wohlkoenig - change - 10 Apr 2019
Status New Confirmed
avatar franz-wohlkoenig franz-wohlkoenig - change - 11 Apr 2019
Title
[3.9.5] TinyMCE drag & drop - "Unable to upload file" error
TinyMCE drag & drop - "Unable to upload file" error
avatar franz-wohlkoenig franz-wohlkoenig - edited - 11 Apr 2019
avatar Webdongle
Webdongle - comment - 16 Apr 2019

Confirmed


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

avatar SolutioAndy
SolutioAndy - comment - 18 Apr 2019

The problem was introduced with this change in 3.9.5:

1547f8e#diff-e5953bc3eadad37980d677840c9d4f6dR97

There are a couple issues with this check:

  • $filepath may not exist yet, so realpath() will return false (the target directory should be checked instead of the full file path)
  • the logical not operator has higher precedence and will turn the result of strpos() into a boolean, which will never pass the strict equality test against 0 (the logical not operator should be removed)
avatar Quy
Quy - comment - 18 Apr 2019

@SolutioAndy Can you please submit a PR? Thanks.

avatar joomla-cms-bot joomla-cms-bot - change - 18 Apr 2019
Status Confirmed Closed
Closed_Date 0000-00-00 00:00:00 2019-04-18 21:58:48
Closed_By joomla-cms-bot
avatar Quy Quy - change - 18 Apr 2019
Closed_By joomla-cms-bot Quy
avatar joomla-cms-bot joomla-cms-bot - close - 18 Apr 2019
avatar joomla-cms-bot
joomla-cms-bot - comment - 18 Apr 2019

Set to "closed" on behalf of @Quy by The JTracker Application at issues.joomla.org/joomla-cms/24544

avatar Quy
Quy - comment - 18 Apr 2019

Thank you! Please test PR #24637.


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

avatar AndyGaskell
AndyGaskell - comment - 30 Apr 2019

I hit this problem, exactly as described. The fix worked for me too.

Add a Comment

Login with GitHub to post a comment