英文:
MultipleChooserPanel: this.chooserWidgetFactory.openModal is not a function
问题
升级了从Wagtail 4到Wagtail 5.0.2。当我尝试打开MultipleChooserPanel时,在浏览器控制台中出现以下JavaScript错误:
Uncaught TypeError: this.chooserWidgetFactory.openModal is not a function
MultipleChooserPanel http://10.10.10.57:10000/api/static/wagtailadmin/js/page-editor.js?v=ce9bf046:1
page-editor.js:1:4815
MultipleChooserPanel http://10.10.10.57:10000/api/static/wagtailadmin/js/page-editor.js?v=ce9bf046:1
然而,在全新安装的Wagtail上可以正常工作。由于当前项目非常庞大,重新从头开始创建项目并不是一个选项。有没有任何想法,错误可能来自哪里?
我已经尝试清除浏览器缓存,使用不同的浏览器,并运行了以下命令:./manage.py collectstatic --noinput --clear
。
英文:
I upgraded from wagtail 4 to wagtail 5.0.2. When I try to open a MultipleChooserPanel I get the following js error in the browser console:
Uncaught TypeError: this.chooserWidgetFactory.openModal is not a function
MultipleChooserPanel http://10.10.10.57:10000/api/static/wagtailadmin/js/page-editor.js?v=ce9bf046:1
page-editor.js:1:4815
MultipleChooserPanel http://10.10.10.57:10000/api/static/wagtailadmin/js/page-editor.js?v=ce9bf046:1
This works however on a fresh install of wagtail. To recreate the project from scratch is not an option because the current project is huge. Any idea where the error could originate from?
I already tried clearing the browser cache, use a different browser and I ran this command: ./manage.py collectstatic --noinput --clear
答案1
得分: 0
很抱歉,我必须为大家提供一个令人不满意的答案。该问题在任何代码更改的情况下都得到了解决。也许打开另一个模态对话框有助于(在我的情况下是ImageChooser)。
英文:
Sadly I have to provide y'all with an unsatisfying answer. The issue resolved without any code changes. Maybe opening another modal helps (in my case the ImageChooser)
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论