简体   繁体   English

Drupal内容类型中的节点引用的标签错误

[英]Wrong label for a nodereference in Drupal content-type

We have a content-type built using CCK. 我们有一个使用CCK构建的内容类型。 One of the fields is a node reference. 字段之一是节点引用。 The node picker is using a view to build the options. 节点选择器正在使用视图来构建选项。

A few days ago, everything was working well. 几天前,一切工作正常。

Today, it looks like all node reference fields using views to populate the selection options are displaying the wrong label. 如今,似乎所有使用视图填充选择选项的节点参考字段都显示了错误的标签。 Every single label in the option is ``A'', but the actual node number is correct. 该选项中的每个标签都是``A'',但实际的节点号是正确的。 The form actually works, just the labels are incorrect. 该表格实际上有效,只是标签不正确。

We have tried just about every combination of edit/save, disable/enable, reboot, clear cache, clone the view, rebuild the view, new view, etc, but we still have a big list of As. 我们几乎尝试过编辑/保存,禁用/启用,重新引导,清除缓存,克隆视图,重建视图,新视图等的每种组合,但是我们仍然有大量的As。

If we create a brand new content type with a brand new node reference field, we get the problem. 如果我们使用全新的节点引用字段创建全新的内容类型,则会出现问题。

Through some backup/restore exercises, we have determined that the problem is actually in the database and not in the code. 通过一些备份/还原练习,我们确定问题实际上出在数据库中,而不是代码中。

We can restore our last good backup, but we will lose a decent amount of work we have put into other parts of the database. 我们可以恢复上一次良好的备份,但是将丢失我们投入数据库其他部分的大量工作。

We enabled mysql query logging, and the view is actually being called properly, but we cannot track down where the problem is creeping in after that (unraveling the CCK / Views / Drupal plumbing is a challenge). 我们启用了mysql查询日志记录,并且实际上已正确调用了视图,但是在此之后我们无法跟踪问题的根源(展开CCK / Views / Drupal管道是一个挑战)。

The install was build with latest stable versions as of April. 截至4月,该安装使用最新的稳定版本进行构建。

The problems referred to in http://drupal.org/node/624422 is similar, but our code versions include the patches mentioned. http://drupal.org/node/624422中提到的问题类似,但是我们的代码版本包含提到的补丁。

Any ideas would be appreciated. 任何想法,将不胜感激。 Thanks. 谢谢。

I had a similar problem with using views for node reference, after quite a lot of hair pulling it turned out to be that my caching layer was buggy. 在使用视图作为节点引用时,我遇到了类似的问题,经过大量的努力,事实证明我的缓存层存在漏洞。 I was using memcached, but memcached wasn't truned on on the server. 我使用的是memcached,但是memcached并未在服务器上运行。 It may be worth checking. 可能值得检查。

Thanks for the responses. 感谢您的答复。 We finally got to the bottom of this. 我们终于了解了这一点。

There was a module that was doing a custom hook_views_post_render() that did a prep_replace to rewrite some output. 有一个模块正在执行自定义hook_views_post_render(),该模块做了prep_replace来重写一些输出。 Unknown to us, there are instances where the $output parameter isn't a string, but an array, and this was causing the problem. 我们不知道,有些情况下$ output参数不是字符串,而是数组,这是导致问题的原因。 One of those instances happens to be when you attach a view to a build a select in CCK. 这些实例之一恰好是在CCK中将视图附加到构建选择时。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM