Drupal:数据库中的内容类型不在结构>内容类型中的内容类型列表中 [英] Drupal: Content type in database not in the list of content types in Structure>Content types

查看:148
本文介绍了Drupal:数据库中的内容类型不在结构>内容类型中的内容类型列表中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

之前我创建了两个内容类型:'protocol'和'protocol2'
他们有点不一样,我还不确定哪一个适合我的目的,所以我尝试了两个并创建每个的一些内容。经过一番测试,我得出结论,protocol2是我将要使用的,我希望它被称为协议而不是protocol2。但是我想保存协议内容类型的其他版本,所以我教会我会简单地打开他们的名字。



所以我尝试刷新他们的名字,但在这个过程中出现我想要使用的protocol2内容类型出错,它只是消失了。或者所以我教无论如何,我将协议重命名为protocol1(名称和机器名称)。并重新创造了一个消失的人。我给了它名称协议,并试图给它机器名称协议,但这没有工作,所以我最终不得不将其命名为protocol2。



我现在已经发现,数据库中的node_type表实际上是一个内容类型,当我查看页面上的结构>内容类型时,机器名称为协议。我可以从表中清除它,还是还有其他一些更有用的方法呢?



我一直在使用有机组,并且内容类型为协议'或'protocol2'与某些组相关联(我不记得哪个)。而我认为这是在组合页面上查看其中一个视图。标题为发布内容到组的列表由Post和空列表元素组成。我在哪里可以控制这个列表?这不是一个观点吗?

解决方案

node_type 表,确保锁定为0,并且禁用对于所有协议类型为0。更改所有的 orig_type 值以匹配当前的类型值。清除 admin / config / development / performance 中的Drupal缓存。



他们现在应该都显示在您的内容类型列表,您可以从那里工作。



这是Drupal 8的一个活跃的bug,可以在 Drupal issue 515454


A while ago I created two content types: 'protocol' and 'protocol2' They were a little different and I wasn't yet sure of which one suited my purposes best, so I tried out both and created some content of each. After a bit of testing I concluded that 'protocol2' was the one I was gonna use and that I wanted it to be called 'protocol' and not 'protocol2'. But I wanted to save the other version of the protocol content type so I taught I would simply swich their names.

So I tried swiching their names, but during this process something went wrong with the 'protocol2' content type that I wanted to use and it just disappeared. Or so I taught. Anyway I renamed 'protocol' to 'protocol1'(Name and Machine name). And recreated the one that disappeared. I gave it the name Protocol and tried to give it the machine name 'protocol' but this didn't work so I ended up having to name it protocol2 again.

I have now discovered that there is in the node_type table in the database actually a content type with the machine name 'protocol' which doesn't show up when I look in Structure>Content types on the page. Can I simply clear it from that table or is there some other more propper way to do it?

I have been using Organic groups, and had content type of type 'protocol' or 'protocol2' associated with some groups(I don't remember which). And I think it's screwing up one of the views on the group page. The list with the heading "Publish content to group" consist of "Post" and an empty list element. Where can I control this list? Isn't this supposed to be a view?

解决方案

In the node_type table, make sure locked is 0 and disabled is 0 for all your "protocol" types. Change all their orig_type values to match their current type values. Clear the Drupal cache in admin/config/development/performance.

They should all now appear in your "Content types" list and you can work from there.

This is an active bug for Drupal 8, with the possibility of any patch being backported, under Drupal issue 515454.

这篇关于Drupal:数据库中的内容类型不在结构>内容类型中的内容类型列表中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆