Hi all!
We’re facing the issue connected to certificate_logo_image now.
Details:
While creating the program on the course-discovery service we’re adding authoring organizations to it.
Those organizations have been configured previously in the course-discovery and all kinds of images were added to them
The problem is that Discovery’s API returns image URLs as relative ones (/media/organizations/bla-bla-bla), so LMS and Credentials are trying to find them in their own storage.
That all looked like a bug and I’ve tried to search for any related issues here and in the edx slack chats but found nothing (which confused me). Am I missing something? Or maybe the program’s feature is just not so popular so I’ve been the first to discover that? (I don’t believe it )
@Evgen_Dyudyunov
I was asking about the discovery-maple-dev instance as shown in the screenshot. If hit orgnizations API on discovery https://discovery-maple-dev.racoongang.com.io/api/v1/organizations/
do you get absolute URL in certificate_logo_image_url field?
We’ve had this working for awhile now but the organizations API doesn’t return a relative path.
I’m doing my work via devstack and in Discovery I’m using the default devstack settings in devstack.py:
# MEDIA CONFIGURATION
# See: https://docs.djangoproject.com/en/dev/ref/settings/#media-url
MEDIA_ROOT = root('media')
# LOCAL_MEDIA_URL was added to support external services like edx-mktg retrieving
# static files in DEBUG and local Devstack
LOCAL_DISCOVERY_MEDIA_URL = '/media/'
MEDIA_URL = 'http://localhost:18381' + LOCAL_DISCOVERY_MEDIA_URL
# END MEDIA CONFIGURATION
When I hit http://localhost:18381/api/v1/organizations/ the response is…
In Credentials, when the copy_catalog management command is run, we create/update the organization on the Credentials side with the result in this API call without any modification of the data.
Is it possible your MEDIA_URL settings in Discovery are wrong or being overwritten somehow?
I was pretty sure we use the default settings without any modifications for media at least in the devstack, so I was looking for the reasons elsewhere. I’m going to check that. I’ll bring the results here later.
All image urls returned by /api/v1/organizations/ including certificate_logo_image_url should be absolute URLs instead of relative. It appears MEDIA_URL setting in discovery instance does not have http scheme and host prefix.