- Issue created by @andreic
- Status changed to Needs work
over 1 year ago 10:24am 28 July 2023 - π³π±Netherlands batigolix Utrecht
At the moment the module expects that photos are added using the photo ID.
You are trying to add a photo using a full URL. Maybe that is the preferred way, but code, UI and docs are not prepared for this.
We should also improve the UI and readme so that it reflects this way of adding photos.
Can you add that to the patch?
I changed the title of the issue to reflect that this is a feature request.
- π·π΄Romania andreic
The existing code takes care of full URL already. Check out src/UnsplashFetcher.php line 54.
- π³π±Netherlands batigolix Utrecht
Indeed. What I meant is that the existing code gives an error when adding the full URL. But your patch will fix this.
What is missing though are UI and readme changes. This must explain clearly what kind of values (ID, URL, both) are allowed.
- πΊπΈUnited States swilmes
Uploading a new patch that meets the requirements. Slightly different as I noticed normal URLs are no longer in the "/photos/ID" format and now in a "/photos/description-id" format. The earlier paths still work, but just going to a site and clicking a photo gives a different ID. The proposed patch should account for either. I didn't find any ideas that use the "-" character, I think that's by design. If there are some and I just missed them, then this patch won't work.
- πΊπΈUnited States swilmes
Apologies, I forgot to include the original utm_source declaration that solves the API logging a notice. Attached patch fixes that issue as well.
- π³π±Netherlands EstherTempel
On a clean Drupal 10.2 installation I have tried patch #10 β .
I was able to use the full URL to add an image from Unsplash. The description when adding an image explains that you can add an ID or the full URL, both with examples.
Also the 'Usage' section of the Readme file is updated, where it now also explains that the full URL can be used. - Status changed to RTBC
8 months ago 11:51am 29 March 2024 - 9a234d18 committed on 1.0.x
Issue #3373586 by swilmes, andreic, EstherTempel, batigolix: Allow...
- 9a234d18 committed on 1.0.x
- Status changed to Fixed
8 months ago 12:16pm 29 March 2024 Automatically closed - issue fixed for 2 weeks with no activity.