无法向内容类型添加新字段,窗口小部件下拉列表无法正常工作

HBR*_*HBR 5 drupal-7

这是我与drupal的第一步.

我已经为我的文章创建了分类法层次结构,现在我正在尝试向内容类型"文章"和"媒体"添加新字段,以便内容管理员可以为其新内容指定"类别".

所以我去过Structure> Content Types> Article> Manage Fields然后"Add new field":

1- Label = Category
2- Name = "field_category
3- Field = "Term reference"
**4- Automatically changes to "Select list" but I am unable to see the drop down list options. Clicking the list doesn't do anything, I couldn't select Autocomplete or any other value I've seen on forums & tutorials. Using firebug I could see the options are there, but the list doesn't show up.**
Run Code Online (Sandbox Code Playgroud)

所有类型的字段都会发生这种情况,即使是文本字段也是最基本的字段.知道为什么会这样吗?

stu*_*n3k 5

正如glumbo所提到的,这里的问题是由jQuery 1.7更新引起的.从jQuery 1.6开始,应该使用.prop()函数访问DOM属性.某些修补程序解决方案存在一个未解决的问题:

您需要替换.attr() jQuery的函数调用.prop()/modules/field_ui/field_ui.js的下面几行:

100:      $(this).html(html).attr('disabled', disabled ? 'disabled' : '');
253:      $(ajaxElements).attr('disabled', true);
Run Code Online (Sandbox Code Playgroud)

请注意,此修复修改了Drupal核心模块,您可能想要使用补丁(Dries会杀死kitty :).


Mat*_*Hui 1

问题出在 jquery 更新上。如果你使用 jquery 1.7 你会遇到这个问题