Skip to content

Add listing image uploader issue with gallery extension (Loading issue on Image Uploader)#2461

Merged
Armanul46 merged 4 commits intosovware:developmentfrom
iamibrahimriaz:fix/add-listing-image-uploader-issue-with-gallery-extension
Aug 28, 2025
Merged

Add listing image uploader issue with gallery extension (Loading issue on Image Uploader)#2461
Armanul46 merged 4 commits intosovware:developmentfrom
iamibrahimriaz:fix/add-listing-image-uploader-issue-with-gallery-extension

Conversation

@iamibrahimriaz
Copy link
Copy Markdown
Collaborator

@iamibrahimriaz iamibrahimriaz commented Aug 19, 2025

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Security fix
  • Improvement
  • New Feature
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Text changes
  • Other... Please describe:

Description

When Gallery Images are added before Images in the add-listing form, the system mistakenly treats the gallery uploader as the primary media uploader.

Before: https://prnt.sc/tabyLXhDr-qa
After: https://prnt.sc/UrRukC7W1id9

Fix

This PR ensures that the Gallery Image Uploader (listing_gallery_ext) is always moved to the end of the media uploader container list. By doing so, the correct container is consistently recognized as the main media uploader.

  • Updated init() to check if the first container has the class 'listing_gallery_ext'
  • If found, it reorders the container so that 'listing_gallery_ext' is always the last item
  • Prevents layout/initialization issues caused by incorrect container ordering

Change media uploader to insert new thumbnails at the top of the list instead of at the bottom, ensuring newest uploaded files are displayed first.

  • Change thumbnail list insertion from appendChild to insertBefore
  • New items now appear at the top instead of bottom of list
  • Maintains proper order: newest files display first
  • Preserves existing functionality for first item insertion

Impact

Prevents the gallery uploader from being misidentified as the default uploader
Maintains consistent ordering of media uploader containers & uploaded items
Improves reliability of the add-listing form media handling

Any linked issues

Fixes #

Checklist

- Updated init() to check if the first container has the class 'listing_gallery_ext'
- If found, it reorders the container so that 'listing_gallery_ext' is always the last item
- Prevents layout/initialization issues caused by incorrect container ordering
@Armanul46 Armanul46 added this to the 8.4.6 milestone Aug 20, 2025
@RabbiIslamRony
Copy link
Copy Markdown
Member

@iamibrahimriaz This error occurs whenever an image is uploaded https://prnt.sc/J3stHuHDEQJT

…into fix/add-listing-image-uploader-issue-with-gallery-extension
@RabbiIslamRony
Copy link
Copy Markdown
Member

Looks good

@Armanul46 Armanul46 merged commit dd8f81b into sovware:development Aug 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants