#16891 closed defect (bug) (invalid)
Deleting all attachments from post under 'Gallery' tab shows 'From Computer' tab sans uploader
Reported by: | kawauso | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.1 |
Component: | Media | Keywords: | |
Focuses: | Cc: |
Description
Steps to Reproduce:
- Attach images to post using 'Add an Image' dialog
- Save post
- Go to Gallery tab under dialog
- Delete images
- View changes to 'From Computer' tab with only empty table from Gallery tab
Attachments (5)
Change History (18)
#3
@
14 years ago
- Component changed from Administration to Media
- Keywords has-patch dev-feedback added; needs-patch removed
Patch attached that fixes the following problems:
- When there's no item in the gallery, the action "media_upload_gallery" is fired before we actually check whether there should be a Gallery tab or not. As a result, when you delete everything, you get redirected to a page where there is no "Gallery" tab, but the Gallery list table is displayed.
- When you upload images, then Save all changes, and proceed to delete one of them, somehow you got redirected to "From Computer" tab. The expected behavior is redirecting to Gallery tab instead. The fix is included in the patch I attached.
Can someone please confirm if this is a regression?
#5
@
14 years ago
Thanks for providing the patch. I could apply the patch to my trunk testbed and can confirm that it fixes the issue.
In the review of the patch, I corrected a minor issue. Static variables are NULL by default (as any unset variable in PHP), there is no need to explicitly set them to NULL:
static $attachments = null;
That's the only change in the new patch.
#8
@
12 years ago
- Keywords reporter-feedback added
I just tried it against trunk at [21204] at can't seem to duplicate. As soon as I delete the last image, it automatically puts me back to the 'from computer' tab s it should be.
Can someone confirm that it's operational in trunk, and not just me?
#9
@
12 years ago
- Keywords reporter-feedback removed
As noted by garyc40 in comment:3, there are two issues:
- After deleting the last image, the "From Computer" tab is displayed with the wrong content.
- After deleting each image, the window redirects to the "From Computer" tab if "Save all changes" button was pressed on that tab earlier.
The first one was fixed in [18850] (and was a duplicate of #15118). The second one still remains.
Could reproduce (against trunk), did the upload to an existing post and did upload two images.
After deleting the last image, the display switched to the "From Computer" tab as shown in the screenshot: