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

styleguide - Wagtail javascript does not load #11896

Closed
enzedonline opened this issue Apr 26, 2024 · 2 comments
Closed

styleguide - Wagtail javascript does not load #11896

enzedonline opened this issue Apr 26, 2024 · 2 comments
Assignees
Labels

Comments

@enzedonline
Copy link

enzedonline commented Apr 26, 2024

Issue Summary

The wagtail javascript (I'm guessing the telepath libraries?) does not load when viewing the style guide. There are several related javascript errors in the console:

styleguide/:1745 Uncaught TypeError: Cannot read properties of undefined (reading 'initEditor')
    at styleguide/:1745:25
(anonymous) @ styleguide/:1745
styleguide/:1867 Uncaught ReferenceError: initDateChooser is not defined
    at styleguide/:1867:9
(anonymous) @ styleguide/:1867
styleguide/:1909 Uncaught ReferenceError: initTimeChooser is not defined
    at styleguide/:1909:9
(anonymous) @ styleguide/:1909
styleguide/:1951 Uncaught ReferenceError: initDateTimeChooser is not defined
    at styleguide/:1951:9
(anonymous) @ styleguide/:1951
styleguide/:2458 Uncaught ReferenceError: PageChooser is not defined
    at styleguide/:2458:9
(anonymous) @ styleguide/:2458
styleguide/:2571 Uncaught ReferenceError: ImageChooser is not defined
    at styleguide/:2571:9
(anonymous) @ styleguide/:2571
styleguide/:2685 Uncaught ReferenceError: DocumentChooser is not defined
    at styleguide/:2685:9
(anonymous) @ styleguide/:2685
styleguide/:2799 Uncaught ReferenceError: SnippetChooser is not defined
    at styleguide/:2799:9

The wagtail widgets that rely on these (including the draftail editor) do not load as a result.

image

In the extra_js block is a call to render {{ example_form.media.js }} - this attribute is empty when rendering the style guide. May be the cause?

Steps to Reproduce

No special steps needed to reproduce. Default behaviour with Wagtail 6.0.x

  • I have confirmed that this issue can be reproduced as described on a fresh Wagtail project: yes

Technical details

  • Python version: 3.12
  • Django version: 4.2.7
  • Wagtail version: 6.0.2
  • Browser version: Chrome 124
@enzedonline enzedonline added status:Unconfirmed Issue, usually a bug, that has not yet been validated as a confirmed problem. type:Bug labels Apr 26, 2024
@laymonage
Copy link
Member

laymonage commented Apr 29, 2024

Thanks for the report! I can confirm this is an issue. It's a regression in #11647. PR is up at #11902.

@laymonage laymonage removed the status:Unconfirmed Issue, usually a bug, that has not yet been validated as a confirmed problem. label Apr 29, 2024
@laymonage laymonage self-assigned this Apr 29, 2024
@gasman
Copy link
Collaborator

gasman commented Apr 29, 2024

Fixed in #11902

@gasman gasman closed this as completed Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

3 participants