“修改分类法”的问题

发布于 2024-09-16 09:18:37 字数 560 浏览 13 评论 0原文

我正在使用 Drupal 6 创建一个提要收集站点。我通过 feeds 模块导入原始 feed 并复制它们的标签。但我也想根据作者姓名分配一个类别(第二分类中的术语),以便能够统一划分内容。

我想使用规则模块 (rules-6.x-1.2) 在导入时分配这些类别。我使用以下步骤:

ON 事件内容将被保存

IF 文本比较 ([node:author-name], TheAuthorName)

DO 修改节点分类术语(保存的内容,永久,添加所选术语)

我选择要作为的术语添加为“-none selected-”(标签)和“TheCategory”(类别)。

现在,当我导入提要时,类别“TheCategory”会添加到内容中,但标签会消失。

如果我为操作选择“用选定的术语替换现有术语”或“替换相同词汇表中的术语”,也会发生这种情况。编辑后,无论我之前输入什么,总是会选择“添加...”单选按钮。是的,我点击了“保存”。

这是做我想做的事情的正确方法吗?为什么它不起作用?我可以用另一个模块来做到这一点吗(我不需要其他任何规则......)?

感谢您的帮助!

I'm working with Drupal 6 to create a feed collecting site. I import the original feeds via the feeds module and copy their tags. But I also want to assign a category (terms from second taxonomy) according to the author name to be able to divide the content in a unified way.

I want to use the rules module (rules-6.x-1.2) to assign these categories upon import. I use the following steps:

ON event Content is going to be saved

IF textual comparison ([node:author-name], TheAuthorName)

DO Modify node taxonomy terms (saved content, permanently, add the selected terms)

I select the terms to be added as "-none selected-" for tags and "TheCategory" for categories.

Now, when I import the feed, the category "TheCategory" is added to the content, but the tags vanish.

This happens also if I select "Replace existing terms with selected ones" or "Replace terms within same vocabulary" for the action. Upon editing, always the radio button of "add …" is selected, regardless of what I entered previously. And yes, I clicked on "save".

Is this the right way to do what I want? Why isn't it working? Could I do this with another module maybe (I don't need rules for anything else …)?

Thanks for your help!

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

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

发布评论

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

评论(1

最丧也最甜 2024-09-23 09:18:37

好的,所以我发现执行此操作的正确触发器是“创建新内容”(我不知何故无法提前开始工作)。

因此,我在调试模式下运行规则模块,发现规则被触发,过滤器返回 TRUE,并且修改节点分类操作成功完成。但分类法完全没有改变。

我玩了一下并推迟了对新创建的内容的“保存内容”操作。事实证明,这解决了问题,现在一切都按我的预期进行。

尽管如此,还是有一些缺陷:

  • 我检查了“永久应用更改”,但它没有做任何事情。
  • 我取消选中“永久应用更改”,但再次编辑时,再次选中该框(可能一开始就没有保存设置)
  • 对于“修改节点分类”操作类型的单选按钮也是如此,这显然是未保存

也许这可以帮助某人。

Ok, so I found out that the right trigger to do this is "new content is created" (which I somehow couldn't get to work beforehand).

So, I ran the rules module in debug mode and found that the rule was triggered, the filter returned TRUE and the modify node taxonomy action was successfully accomplished. But the taxonomy was entirely unchanged.

I played around a little and postponed a "save content" action on the newly created content. Turns out, this fixed the problem and now everything works as I intended.

Still, there are some flaws:

  • I checked "permanently apply changes", but it did not do anything.
  • I unchecked "permanently apply changes", but upon editing again, the box was checked again (probably the setting was not saved to begin with)
  • The same holds true for the radio buttons for the type of "modify node taxonomy" action which was obviously not saved

Maybe this can help someone.

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