NPM Resource Changed ? Pending

User tests: Successful: Unsuccessful:

avatar dgrammatiko
dgrammatiko
29 May 2020

Pull Request for Issue #29147 .

Summary of Changes

Media Manager:

  • remove the logic for dispatching event (used in the media field) from the item component to the store
  • Add dispatch event for all the single select item operations
  • Add dispatch event for the unselect item operation

Media field

  • Remove couple of Joomla scoped variables/functions (not needed)
  • Tweak the fetchImageDetails to reject immediately if there is no selected image in media manager
  • Proper use of the promise when calling the fetchImageDetails fn

Testing Instructions

Case 1: Normal operation
Create a new article and insert an image to the intro image.
Reset the field by pressing the remove button

Case 2: Selection problem
Create an article and go to the intro image opening the modal for the Media manager. Select an image by clicking on it. Now click anywhere in the white space below the list of images. The image should be unselected! Clicking the select button at the end of the modal should:

  • Not insert anything in the field (this was previously returning the last image selected)
  • Close the modal (same behaviour as 3.x)

Case 3: Race Condition
I can safely replicate this by adding a breakpoint and using debugger in the PHP world.
Basically what happens is that selecting an image is not synchronous so if you're too fast to select an image and then click on the select button on the bottom of the modal you will not get the selected image path in the input field. Probably can be reproduced with the dropbox plugin(?)

Expected result

All cases should work

Actual result

Documentation Changes Required

Nope

avatar dgrammatiko dgrammatiko - open - 29 May 2020
avatar dgrammatiko dgrammatiko - change - 29 May 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 29 May 2020
Category JavaScript Administration com_media NPM Change Repository
avatar dgrammatiko dgrammatiko - change - 29 May 2020
Title
Media field, Media Manager fixes
[4.0] Media field, Media Manager fixes
avatar dgrammatiko dgrammatiko - edited - 29 May 2020
avatar dgrammatiko dgrammatiko - change - 29 May 2020
Labels Added: NPM Resource Changed ?
avatar joomla-cms-bot joomla-cms-bot - change - 29 May 2020
Category JavaScript Administration com_media NPM Change Repository Administration com_media NPM Change JavaScript Repository Layout
avatar dgrammatiko dgrammatiko - change - 29 May 2020
The description was changed
avatar dgrammatiko dgrammatiko - edited - 29 May 2020
avatar wilsonge wilsonge - test_item - 30 May 2020 - Tested successfully
avatar wilsonge
wilsonge - comment - 30 May 2020

I have tested this item successfully on 5c6a395

This works and is better than before. However selecting no Image does give the error message "Internal server error." still although obviously displaying this visibly is an improvement on the silent fail before.


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

avatar wilsonge wilsonge - close - 30 May 2020
avatar wilsonge wilsonge - merge - 30 May 2020
avatar wilsonge wilsonge - change - 30 May 2020
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2020-05-30 14:05:45
Closed_By wilsonge
avatar wilsonge
wilsonge - comment - 30 May 2020

Thanks!

Add a Comment

Login with GitHub to post a comment