Module removes trailing slash in endpoint field

Created on 15 February 2019, almost 6 years ago
Updated 25 January 2023, almost 2 years ago

Problem/Motivation

I was trying to add an new external entity from a custom API with the endpoint located at https://LOCATION/api/resource/ however when trying to create new content using the external entity, the site would just give a "The website encountered an error". I doublechecked the API location to make sure it was functional, which is was. I checked the endpoint location in the external entity type only to see that the endpoint had changed from "https://LOCATION/api/resource/" to "https://LOCATION/api/resource". This made the API call to fail. I also checked the corresponding .yml config file to make sure this was the case.

I'm not sure if this is an actual bug or if this is how it is supposed to work. In this case I can go fix the API-itself to map https://LOCATION/api/resource calls to https://LOCATION/api/resource/ but this might not be the case everyone using the module

Proposed resolution

Ensure that endpoint URL are not changed when saving entity configuration

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024