0

上下文是在带有 Azure 数据库的 Azure 网站(不是云服务)上运行的 Orchard 1.8.1。

我已经通过管理 UI 定义了一个 ContentType。'Class' 类型是可创建的且不可草拟的,并且包含 Autoroute、Body 和 Title 部分,以及 Numeric 和 Taxonomy 字段。分类是用它的术语定义的。

可以通过管理页面上的“新建”菜单或通过“内容定义”列表中的“创建新类”来创建项目。我创建了一个查询和投影来显示“类”类型的所有项目,并在其前端页面上正确显示所有项目。

问题出在管理页面的“内容”部分。如果我通过“新建”菜单创建该项目,它不会出现在“内容”列表中。如果我通过内容定义列表中的“创建新类”创建它,它确实会出现在内容列表中。但是所有这些都显示在查询中。

我已经导出了这些项目并查看了 XML……没有什么不同。以下是出现在内容列表中的项目:

<Class Id="/alias=american-history" Status="Published">
  <NumericField.Credits Value="1" />
  <TaxonomyField.Dicipline Terms="/alias=subjects\/social-studies" />
  <BodyPart Text="&lt;p&gt;This American History course will integrate both Social Science skills with historical content of America and the United States from the early 1600s to the present, as well as education in government and economics. There is a strong emphasis on college preparation, civic participation, and integration with research and technology. Students use will a variety of resources and activities to explore major themes, including the changing face of American society and the United States&amp;rsquo; changing role in the world.&lt;/p&gt;" />
  <AutoroutePart Alias="american-history" UseCustomPattern="false" />
  <TitlePart Title="American History" />
</Class>

这是一个没有出现的例子:

<Class Id="/alias=economics" Status="Published">
  <NumericField.Credits Value="1" />
  <TaxonomyField.Dicipline Terms="/alias=subjects\/social-studies" />
  <BodyPart Text="&lt;p&gt;The introductory economics course has a strong emphasis on personal finance. Students learn the importance of budgeting and how, through a variety of financial instruments, to make money work for them. Students also learn how the stock market operates by participating in a virtual stock game. In this context, students are introduced to the concepts of stock ownership, the commodities market, supply and demand and the different types of business structures. Students learn how to complete various tax forms and the how's and why's of the American tax system. Students will read the book, Freakonomics, and gain insight on how to look at problems from an economic standpoint. Finally students learn about the different types of economic systems, the circular flow of money through the economy, and government intervention in our economy.&lt;/p&gt;" />
  <AutoroutePart Alias="economics" UseCustomPattern="false" />
  <TitlePart Title="Economics" />
</Class>

我开始在数据库中挖掘,看看是否能找到问题,但很快就迷路了。

知道我可以从哪里开始寻找问题吗?我在想,如果这是一个错误,它会在我发现它之前就已经表现出来并且会引起色调和哭泣,所以我认为这是我的某个地方的设置。

感谢您为我提供的任何帮助。

——迈克尔

4

1 回答 1

0

您需要添加公共部分以使其出现在内容列表中,因为它需要按日期排序,并且可能需要一些与谁拥有内容相关的安全内容,尽管我不确定那个:)

来自 Bertrand 的更新:您还需要在 Content Type 定义中将内容类型标记为 Listable。

于 2014-10-03T15:13:01.817 回答