Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing thumbnails in /api/public/v1/channels #1299

Closed
ivanistheone opened this issue Apr 3, 2019 · 5 comments
Closed

Missing thumbnails in /api/public/v1/channels #1299

ivanistheone opened this issue Apr 3, 2019 · 5 comments
Assignees

Comments

@ivanistheone
Copy link
Contributor

Summary

newly published channels are missing thumbnail encodings

I checked in the listing data form from
https://studio.learningequality.org/api/public/v1/channels
and I see "icon_encoding": null for the channel in question so it must be a Studio issue.

Category

Select one: BUG

How to reproduce

  1. Try to import channels in Kolibri
  2. Choose Studio
jayoshih pushed a commit that referenced this issue May 17, 2019
[Fixes #1299] Restore thumbnail data to public channels API.
@ivanistheone ivanistheone reopened this Jun 25, 2019
@ivanistheone
Copy link
Contributor Author

ivanistheone commented Jun 25, 2019

There is still something going on with channel thumbnails.

The thumbnail served for the channel from /api/public/v1/channels is:
Screen Shot 2019-06-25 at 12 58 56 PM

After clicking on that channel to get the next step of the IMPORT process, we see the correct thumbnail:
Screen Shot 2019-06-25 at 12 59 17 PM
The "correct" thumbnail is also shown later on in the Kolibri UI.

@ivanistheone
Copy link
Contributor Author

Updates from Aug 3rd and 5th

Summary of the problem

The thumbnail served by /api/public/v1/channels is different from the channel thumbnail exported and displayed in Studio UI.
(contains old version of thumbnail, possibly the thumbnail when the channel was first created)

Observations

The problem seems to be caused by "stale" thumbnail data in channel.icon_encoding being served in PublicChannelSerializer.get_thumbnail_encoding

The only place I found in the code where this field is written is during channel export:
https://github.com/learningequality/studio/blob/develop/contentcuration/contentcuration/utils/publish.py#L530
which calls convert_channel_thumbnail which looks like it is getting the data from thumbnail_encoding.

The actual thumbnail that gets exported for Kolibri consumptions uses a different path here where the function generate_thumbnail_from_channel is called.

Recommendation

It would be great to clarify the difference between

  • channel.thumbnail
  • channel.thumbnail_encoding
  • channel.icon_encoding
    including where they are set/updated/read (as part of a ricecooker run when editing/cropping thumnail through-the-web interface), and if possible to consolidate so all uses of the channel thumbnail use the same code path.

@ivanistheone
Copy link
Contributor Author

How to reproduce

  1. Upload a new test channel with channel thumbnail ImgA.png
  2. PUBLISH channel
  3. Update the test channel setting channel thumbnail to ImgB.png
  4. PUBLISH channel
  5. Make the channel public (so that it shows up in /api/public/v1/channels)
  6. Try to import channel from Kolibri (IMPORT > Peer-to-peer > add develop.leq.. > IMPORT )

Expected: to see ImgB.png in channel list options

Actual: see ImgA.png in channel list options (or even older version in case channel not new)

Note there are several other thumbnails missing in that listing.

@ivanistheone
Copy link
Contributor Author

I wanted to double-check that the "wrong/missing" thumbnail in /api/public/v1/channels issue is valid (and not just develop), so I tried importing from Studio master.

Here is a channel that was published this morning showing missing thumbnail:

Screen Shot 2019-08-07 at 11 41 44 AM

@ivanistheone
Copy link
Contributor Author

Confirm fix:
career girls partial publish good too

another channel tested and correct thumbnail now shows
before and after fix

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

No branches or pull requests

2 participants