MultipleChooserPanel: this.chooserWidgetFactory.openModal 不是一个函数

huangapple go评论53阅读模式
英文:

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)

huangapple
  • 本文由 发表于 2023年7月10日 16:54:48
  • 转载请务必保留本文链接:https://go.coder-hub.com/76652188.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定