问题描述
不久前我创建了两种内容类型:protocol"和protocol2"它们有点不同,我还不确定哪一个最适合我的目的,所以我尝试了两者并为每个创建了一些内容.经过一些测试,我得出结论,'protocol2' 是我要使用的那个,我希望它被称为'protocol'而不是'protocol2'.但我想保存协议内容类型的其他版本,所以我教我简单地切换他们的名字.
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.
所以我尝试切换他们的名字,但在此过程中,我想使用的protocol2"内容类型出了点问题,它就消失了.或者我教过.无论如何,我将协议"重命名为协议1"(名称和机器名称).并重新创造了消失的那个.我给它命名为 Protocol 并试图给它机器名称protocol",但这没有用,所以我最终不得不再次将它命名为 protocol2.
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.
我现在发现在数据库的 node_type 表中实际上有一个机器名称为protocol"的内容类型,当我查看页面上的 Structure>Content types 时没有显示.我可以简单地从那个表中清除它还是有其他更合适的方法来做到这一点?
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?
我一直在使用有机组,并且具有与某些组关联的协议"或协议2"类型的内容类型(我不记得是哪个).我认为它搞砸了小组页面上的一个观点.标题为将内容发布到组"的列表由发布"和一个空列表元素组成.我在哪里可以控制这个列表?这不应该是一个视图吗?
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?
推荐答案
在node_type
表中,确保locked
为0且disabled
对于所有协议"类型,都是 0.更改它们的所有 orig_type
值以匹配它们当前的 type
值.清除 admin/config/development/performance
中的 Drupal 缓存.
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.
这是 Drupal 8 的一个活跃错误,任何补丁都有可能被向后移植,位于 Drupal 问题 515454一>.
This is an active bug for Drupal 8, with the possibility of any patch being backported, under Drupal issue 515454.
这篇关于Drupal:数据库中的内容类型不在结构>内容类型的内容类型列表中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!