shadowbox fails on links that include slugified image filenames
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 293
- Forks
- 110
- PR merge metrics
- No merged PRs in 30d
Description
In our CMS, we are using links such as
http://localhost:59744/Admin/ContentPage/EditAttachment/31/Hydrangeas-jpg
to edit an attachment to the content of type ContentPage where 31 indicates the content ID and Hydrangeas-jpg indicates the slugified filename that is attached. This link will display a form that allows editing/replacing the attached file. The response from the server works fine (if opened by browsing directly to the URL). However, if including this URL in a link with Shadowbox attached to that link, the Shadowbox will open partially then start loading and never completely open and load the link.
This only happens when the link contains "-jpg", "-gif" or "-png", so for the image extensions only. I guess it must be detecting that we are trying to open an image (while we don't, we want to open the HTML page) because it is working for "-pdf".
At first I thought the dash "-" was the problem but then figured out that it works perfectly for instance for
http://localhost:59744/Admin/ContentPage/EditAttachment/31/leaflet-pdf
Hopefully you will be able to reproduce and fix this. Thank you for a great product.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with the ContentPage edit URL ending in -jpg, -gif, or -png, comparing it with the working -pdf URL. Start by tracing Shadowbox's link-type detection and loading behavior; done means these URLs open their HTML form completely instead of being treated as images.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100