Drupal Views - 来自地狱的 Ajax 错误警报框

发布于 2024-10-21 21:51:43 字数 144 浏览 1 评论 0原文

我在通常使用 ajax 打开新表单来修改该操作的属性的视图中所做的任何操作都会给我一个警报框,其中显示应该使用 ajax 加载的代码:

在此处输入图像描述

Anything I do in views that would normally use ajax to open up a new form to modify properties of that action is giving me an alert box of what looks like the code that should be loading with ajax:

enter image description here

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

感性 2024-10-28 21:51:43

此问题可能还有另一个根源(如果之前的评论没有解决问题):
主题开发人员模块。

这是一个对于主题和调试非常有用的模块,但是当启用它时,它也会产生奇怪的 AJAX 错误消息,类似于尝试在视图字段设置中设置不同参数时问题中的消息。

正如项目页面所示:“需要时启用它,然后禁用它。”

There can be another source of this problem (if the previous comments didn't solve it):
the Theme developer module.

This is a really helpful module for theming and debugging, but when having it enabled, it can also produce weird AJAX error messages, similar to the one in the question when trying to set different parameters in Views field settings.

As the project's page suggests: "Enable it when needed, and disable it afterwards."

你曾走过我的故事 2024-10-28 21:51:43

如果您将较新版本的 jQuery 添加到您的 Drupal 安装中,它可能会导致 AJAX 和视图 UI 出现问题。

我以前也遇到过同样的情况。我恢复到 Drupal 附带的原始 jQuery 版本,一切都恢复正常。

If you add a newer version of jQuery to your Drupal install it can create problems with AJAX and Views UI.

I have found myself in the exact same position before. I reverted back to the original jQuery version shipped with Drupal and everything was back to normal.

瑕疵 2024-10-28 21:51:43

当 AJAX 小部件(例如面板)尝试访问无效或不再有效的菜单回调时,我也看到过这种情况发生。我会在菜单路由器中搜索以下内容:

select * from menu_router where path like '%ajax%'; and
select * from menu_router where path like '%ajax/add%';

然后确保 page_callback 列中提到的函数存在。

更改权限也可能导致此问题。
检查 access_callback 列的内容,并尝试使用不同的用户角色调试该路径 (/admin/build/views/ajax/add-item/community/default/field)看看会发生什么。

I've seen it happen too when the AJAX widget (for example, Panels) is trying to access an invalid, or no longer valid menu callback. I would search the menu router for things like:

select * from menu_router where path like '%ajax%'; and
select * from menu_router where path like '%ajax/add%';

Then make sure that the function mentioned in the page_callback column exists.

Changed permissions can also cause this problem.
Check what the access_callback column says, and try debugging that path (/admin/build/views/ajax/add-item/community/default/field) with different user roles to see what happens.

嘴硬脾气大 2024-10-28 21:51:43

只是为了完整起见:我刚刚发现可能导致这种行为的另一个主题是 ThemeKey 模块(尽管如此,它在其预期用途方面做了出色的工作......)。至少在我的网站上禁用它可以解决问题。

Just for completeness: I just figured out that another theme that might cause such a behaviour is the ThemeKey module (which - dispite of that- does a great work in what it is intended to...). At least disabling it at my site did the trick.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文