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

MediaChooserBlock doesn't show selected Media item #131

Closed
th3hamm0r opened this issue Jul 14, 2021 · 3 comments
Closed

MediaChooserBlock doesn't show selected Media item #131

th3hamm0r opened this issue Jul 14, 2021 · 3 comments
Assignees

Comments

@th3hamm0r
Copy link
Contributor

Issue Summary

Using Media in a StreamField (with a subclass of AbstractMediaChooserBlock) does not show the chosen media file.
I'm using the latest version of the package (0.7.1) and of wagtail (2.13.4).
I'm assuming this has something to do with the changes to the StreamField in wagtail 2.13?

Steps to Reproduce

  1. Start a new project with wagtail start myproject
  2. Integrate wagtailmedia as described in the current README
    (some import statements in the example are not up-to-date)
  3. Use the HomePage created by wagtail start to add media as a regular django field and also through a StreamField.
  4. Upload and choose a file with the chooser-field and the chooser-block, save.
  5. After save/reload, the regular field will show the chosen file (allowing to clear choice, choose another item or edit the item), but the item selected through the chooser block remains in the state where you can choose a media item. Actually, the file is assigned, but the frontend just does not show this state.

Technical details

  • Python version: 3.8.10
  • Django version: 3.2.5
  • Wagtail version: 2.13.4
  • wagtailmedia version: 0.7.1
  • Browser version: FireFox 89
@ephes
Copy link
Contributor

ephes commented Jul 19, 2021

I can confirm it still works up to wagtail 2.12.6.

@zerolab zerolab self-assigned this Jul 19, 2021
@zerolab zerolab mentioned this issue Jul 20, 2021
2 tasks
@ephes
Copy link
Contributor

ephes commented Jul 23, 2021

Did a small PR.

@zerolab
Copy link
Member

zerolab commented Aug 1, 2021

Fixed in #136. Will be release soon

@zerolab zerolab closed this as completed Aug 1, 2021
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

3 participants