Information Required ?
avatar sdrawdenek
sdrawdenek
7 Jul 2020

Steps to reproduce the issue

Open Custom Module screen.

Select OPTIONS tab.

Browse Images to select an image (SELECT) - image 1.

Expected result

Expect the image to be selectable - it was in J4 Beta 2 for Testing.

Actual result

Internal Server Error - image 2.

System information (as much as possible)

PHP 7.3

J4 Dev 3

Additional comments

Not an issue on my server when I use J4 Beta 2 for Testingscreen shot 2020-07-07 at 18 00 08screen shot 2020-07-07 at 18 00 09

Votes

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

avatar sdrawdenek sdrawdenek - open - 7 Jul 2020
avatar joomla-cms-bot joomla-cms-bot - labeled - 7 Jul 2020
avatar Quy
Quy - comment - 7 Jul 2020

Unable to reproduce. Please try testing with the nightly builds. https://developer.joomla.org/nightly-builds.html

avatar PhilETaylor
PhilETaylor - comment - 8 Jul 2020

Are you selected an image? because without selecting an image you get #29497

avatar Quy Quy - change - 8 Jul 2020
Labels Added: Information Required
avatar Quy Quy - labeled - 8 Jul 2020
avatar sdrawdenek
sdrawdenek - comment - 9 Jul 2020

Yes I am selecting an image BEFORE then selecting SELECT button.

And I have just tried again after installing the latest lightly build.

Still see Internal Server Error.

avatar PhilETaylor
PhilETaylor - comment - 9 Jul 2020

ok I can replicate this (In Firefox, as impossible in Safari due to there being no select button), but with a very specific set of clicks.

If you click the IMAGE then it works fine.

If you DONT CLICK THE IMAGE - but instead SELECT the checkbox in the top left of the image and then click the SELECT button in the modal footer then you replicate the problem.

Nothing is logged as a Ajax request and nothing in the console.log but there is a reproducible problem here.

avatar Quy
Quy - comment - 10 Jul 2020

@dgrammatiko Please see #30045 (comment). Thanks.

avatar dgrammatiko
dgrammatiko - comment - 10 Jul 2020

@Quy there you go:

For issue #29314 Someone added an overflow: hidden for the class .input-group-append, removing it the field is rendered correctly:
Screenshot 2020-07-10 at 11 59 25

If you DONT CLICK THE IMAGE - but instead SELECT the checkbox in the top left of the image and then click the SELECT button in the modal footer then you replicate the problem.

I cannot reproduce the error reported in #29497

Jul-10-2020 12-09-58

Finally the Issue reported here cannot be confirmed as I'm getting a PHP class Folder not found

avatar PhilETaylor
PhilETaylor - comment - 10 Jul 2020

Im sorry, but today with a0116ab and Safari Version 13.1.2 (15609.3.5.1.3) I can still replicate this issue reported

Also I can still replicate #29497 as well.

This is a clean install of 4.0-dev from git with jinstall asset build on my laptop after a reformat of the hard drive!

avatar dgrammatiko
dgrammatiko - comment - 10 Jul 2020

Also I can still replicate #29497 as well.

What user? Eg what are the permissions for the testing user

Also what is your configuration: subfolder/root install, folder/files permissions, etc

I cannot help if I cannot replicate the issue...

avatar PhilETaylor
PhilETaylor - comment - 10 Jul 2020

Super User (The only user) created when installing.

In the root. So url is http://127.0.0.1/

in a docker container with 777 permissions on everything.

avatar dgrammatiko
dgrammatiko - comment - 10 Jul 2020

In the root. So url is http://127.0.0.1/

Can you attach a fake domain (eg make an alias in the hosts file) so the Ajax request will be http://something.local as this is something I cannot test on my setup?

avatar PhilETaylor
PhilETaylor - comment - 10 Jul 2020

If you have 5 mins YOU can go to my local development here: https://97d052c4e6c2.ngrok.io/administrator/

u: admin
p: admin

I'll leave this tunnel up and grab a coffee - let me know if/when you are finished so I can close the tunnel.

avatar dgrammatiko
dgrammatiko - comment - 10 Jul 2020

@PhilETaylor I still cannot replicate it
Jul-10-2020 12-43-44

Are you too fast on clicking the select button so there might be a race condition as the iframe needs to initialise its js and sync with the parent window?

avatar PhilETaylor
PhilETaylor - comment - 10 Jul 2020

Very strange.

I thought at first it could be a race condition but Im being deliberately slow (10-15 seconds between each click) and I still get Internal Server Error when either

  1. Not selecting an image and clicking select to close modal

  2. selecting the checkbox of an image and clicking select to close the modal.

I DONT GET AN ERROR when I click the actual image (as opposed to clicking the checkbox in the top left corner) so there is something different between clicking the actual IMAGE and clicking the checkbox.

avatar PhilETaylor
PhilETaylor - comment - 10 Jul 2020

same in Firefox so not a safari beta problem :(

avatar PhilETaylor
PhilETaylor - comment - 10 Jul 2020

Just asked "a bog standard user" in a different country (@RedEvo) to try the same thing using the link I gave you - he could replicate it :(

h6czel96

avatar dgrammatiko
dgrammatiko - comment - 10 Jul 2020

so there is something different between clicking the actual IMAGE and clicking the checkbox.

There IS. The images to allow double click have some weird code (I think it's a vue dependency) but what's funny is that we're testing using the same safari...

Ok one last idea: do you have .htaccess enabled? if so can you disable it, clear the browser cache and retry (you might be running an older version of the js script, the .gz)

avatar PhilETaylor
PhilETaylor - comment - 10 Jul 2020

Its nginx - so no .htaccess :)

avatar RedEvo
RedEvo - comment - 10 Jul 2020

nginx has form….

:)

David Robinson
david@redevolution.com
Mobile: 07710 461776
Office: 01224 443551

On 10 Jul 2020, at 11:57, Phil Taylor notifications@github.com wrote:

Its nginx - so no .htaccess :)


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub #30045 (comment), or unsubscribe https://github.com/notifications/unsubscribe-auth/AANOSXN7URQQ2JUW7KNLHRTR23XY3ANCNFSM4OTFTIUQ.

avatar PhilETaylor
PhilETaylor - comment - 10 Jul 2020

oh hang on - just seen this in the log:

GET /index.php/component/ajax 200 OK

is something routing to the frontend instead of the backend?

that's not the keepalive as that has correct /administrator/:

  "system.keepalive": {
            "interval": 840000,
            "uri": "\/administrator\/index.php?option=com_ajax&format=json"
        },
avatar dgrammatiko
dgrammatiko - comment - 10 Jul 2020

@PhilETaylor I'm out of ideas, the only proper way to figure out there is to place a breakpoint in the com_media controller and inspect what's the input. Might be a problem with csrf or some other data send back to the server

avatar PhilETaylor
PhilETaylor - comment - 10 Jul 2020

I have an error - one mo...

avatar PhilETaylor
PhilETaylor - comment - 10 Jul 2020

go here https://97d052c4e6c2.ngrok.io/administrator/index.php?option=com_content&view=article&layout=edit

click select

double click sample data

Screenshot 2020-07-10 at 12 04 44

no idea if that's connected :(

avatar PhilETaylor
PhilETaylor - comment - 10 Jul 2020

Might be a problem with csrf or some other data send back to the server

Im not seeing any network traffic or Ajax calls :(

avatar dgrammatiko
dgrammatiko - comment - 10 Jul 2020

Im not seeing any network traffic or Ajax calls :(

OK, we're getting somewhere, Can you attach a fake domain (eg make an alias in the hosts file) as I suggested before. I know it sounds weird but...

avatar PhilETaylor
PhilETaylor - comment - 10 Jul 2020

Also when I click the checkbox in the top left of an image - the BACKGROUND (the main article edit page, not the modal) moves - like a JS warning/error is being inserted and removed.

The ngrok is a fake domain, when you use that Joomla believes that's the domain its on and all Ajax calls go back to that domain.

avatar dgrammatiko
dgrammatiko - comment - 10 Jul 2020

I'm guessing you're using docker and I'm using a local server (no vm). There might be some firewall or something else that blocks XHR requests? Nginx probably is not the problem here as I already have a perfectly working instance (sloth-theme.site)

avatar PhilETaylor
PhilETaylor - comment - 10 Jul 2020

one mo and I'll move to php -S 0.0.0.0:80 outside of docker and outside of nginx

avatar infograf768 infograf768 - change - 10 Jul 2020
Title
Attempt select CUSTOM Module OPTION Background image results in Internal Server Error
[4.0] Attempt select CUSTOM Module OPTION Background image results in Internal Server Error
avatar infograf768 infograf768 - edited - 10 Jul 2020
avatar PhilETaylor
PhilETaylor - comment - 10 Jul 2020

made no difference - same issues.

So this rules out docker. Rules out nginx.

:-(

avatar dgrammatiko
dgrammatiko - comment - 10 Jul 2020

Ok one more navigate to the page and open the media field modal. Open the inspector and go to the console. On the bottom right there should be a select option, select Page, then type Joomla and return (on the left side, the terminal lookalike)
You should have an empty object named selectedFile :
Screenshot 2020-07-10 at 13 25 34

avatar PhilETaylor
PhilETaylor - comment - 10 Jul 2020

Correct.

When I click the checkbox Its still an empty object

When I click the actual image Its a populated object

Screenshot 2020-07-10 at 12 33 02

avatar dgrammatiko
dgrammatiko - comment - 10 Jul 2020

When I click the checkbox Its still an empty object

Out of curiosity what's your options on your clicking device?
Screenshot 2020-07-10 at 13 33 28

avatar PhilETaylor
PhilETaylor - comment - 10 Jul 2020

haha - its a Magic Mouse (that needs charging :) )

Screenshot 2020-07-10 at 12 34 46

avatar PhilETaylor
PhilETaylor - comment - 10 Jul 2020

want another play? https://dd1ca95bb272.ngrok.io

avatar dgrammatiko
dgrammatiko - comment - 10 Jul 2020

Just to narrow this issue, can you edit:

<div class="media-browser-image" @dblclick="openPreview()" @mouseleave="hideActions()">

and remove @dblclick="openPreview()" @mouseleave="hideActions()" from that line

also change @click.stop="toggleSelect()" to @click="toggleSelect()" on

Then recompile with npm install

avatar PhilETaylor
PhilETaylor - comment - 10 Jul 2020

Done - that FIXES the selection issues :)

It doesnt fix the issue where you click select button to close the modal without ever attempting to select anything.

avatar PhilETaylor
PhilETaylor - comment - 10 Jul 2020

it doesnt fix double clicking a FOLDER - that still gives a console error

avatar dgrammatiko
dgrammatiko - comment - 10 Jul 2020

Done - that FIXES the selection issues

It's not an actual fix, we just removed some listeners to narrow down the problem, which turn out to be a race condition between mouse enter/ mouse click

It doesnt fix the issue where you click select button to close the modal without ever attempting to select anything.

That's weird because you've confirmed before that there is an empty object there and the code should handle this correctly ?

avatar PhilETaylor
PhilETaylor - comment - 10 Jul 2020

well at least this is some kind of progress :)

avatar dgrammatiko
dgrammatiko - comment - 10 Jul 2020

@PhilETaylor can you test #30066

It solves the error message when clicking on select without any file selected. The other part on the image clicking misbehaving needs a bit more debugging (also I'm not very familiar with vue, so someone else can fix it faster)

avatar sdrawdenek
sdrawdenek - comment - 10 Jul 2020

Hi, hope this helps you guys.

I was using default installation of J4 Dev 3 when I reported - and TinyMCE was default content editor.

Today after installing JCE (latest release) I retested Custom Module Background Image. It worked. No Internal Server Error.

When I changed default content editor to any one of NONE, CODEMIRROR, TINYMCE I saw the Internal Server Error message when I tried to add a background image.

Best wishes

avatar PhilETaylor
PhilETaylor - comment - 10 Jul 2020

IIRC JCE replaces the media browser with one of its own

On 10 Jul 2020, at 13:57, sdrawdenek notifications@github.com wrote:


Hi, hope this helps you guys.

I was using default installation of J4 Dev 3 when I reported - and TinyMCE was default content editor.

Today after installing JCE (latest release) I retested Custom Module Background Image. It worked. No Internal Server Error.

When I changed default content editor to any one of NONE, CODEMIRROR, TINYMCE I saw the Internal Server Error message when I tried to add a background image.

Best wishes


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.

avatar dgrammatiko
dgrammatiko - comment - 10 Jul 2020

@sdrawdenek please test #30066

avatar PhilETaylor
PhilETaylor - comment - 10 Jul 2020

#30066 fixes the issue where you click select button to close the modal without ever attempting to select anything. which is Issue #29497

#30066 fixes Error message shown when clicking the checkbox and then select button to close modal which is this issue #30045

#30066 doesnt fix When using the checkbox to select an image, and then clicking the select button to close model, no image is actually selected in the page

#30066 doesnt fix when double clicking on a folder in media manager I get TypeError: undefined is not an object (evaluating 'this.$refs.actionToggle.focus')

avatar dgrammatiko
dgrammatiko - comment - 10 Jul 2020

The last 2 are definitely associated with the media manager app (the vue js code)

avatar PhilETaylor
PhilETaylor - comment - 10 Jul 2020

I guess, for clarity, we should ask @sdrawdenek to close this issue (as its resolved by #30066), and open a new issue for the two remaining problems?

Also can I say a big thank you - without your help today these issues would have dragged on, we needed an expert :) and I stick to jQuery ;-) ;-)

avatar sdrawdenek sdrawdenek - change - 12 Jul 2020
Status New Closed
Closed_Date 0000-00-00 00:00:00 2020-07-12 09:30:05
Closed_By sdrawdenek
avatar sdrawdenek sdrawdenek - close - 12 Jul 2020

Add a Comment

Login with GitHub to post a comment