drupal \ core \ form \ enforcedResponseException在查看重置按钮点击 - D9

发布于 2025-01-27 08:55:16 字数 755 浏览 3 评论 0原文

我的视图使用带有“重置”按钮的裸露过滤器。搜索后,当单击重置按钮时,我会看到以下错误:

The website encountered an unexpected error. Please try again later.
Drupal\Core\Form\EnforcedResponseException: in Drupal\Core\Form\FormBuilder->buildForm() (line 352 of core/lib/Drupal/Core/Form/FormBuilder.php).

我找到了此链接 - https://www.drupal.org/project/drupal/issues/3165919 搜索问题时,但该页面没有提及此问题的任何修复/修补程序。

我尝试的是:

在drupal \ core \ form \ form \ formbuilder.php文件中,我暂时评论了下面的lines buildform()方法:

if ($response instanceof Response) {
      throw new EnforcedResponseException($response);
    }

为此需要一个实际解决方案。有帮助吗?

I have a view that uses exposed filters with a "Reset" button. After searching, when the reset button is clicked, I get to see the below error:

The website encountered an unexpected error. Please try again later.
Drupal\Core\Form\EnforcedResponseException: in Drupal\Core\Form\FormBuilder->buildForm() (line 352 of core/lib/Drupal/Core/Form/FormBuilder.php).

I found this link - https://www.drupal.org/project/drupal/issues/3165919 when searching for the issue but the page doesn't mention any fix/patch for this problem.

What I tried:

In Drupal\Core\Form\FormBuilder.php file, I commented the below lines buildform() method tentatively:

if ($response instanceof Response) {
      throw new EnforcedResponseException($response);
    }

Need an actual solution for this. any help?!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文