[6.x]: New sections are not automatically organized under their corresponding headings

未关闭
#21,307 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
58/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
php
领域
backend

调研方向

Start by tracing how newly created sections are added to the section navigation and how the default headings for Channels, Structures, and Singles are represented. Reproduce the issue by creating a Channel section and checking where it appears. Done means it appears under Channels when that heading exists, with a sensible fallback when no matching heading exists.

由索引模型根据 Issue 内容生成。

描述

bug repo:cms
What happened?
Description

When creating a new Channel section, it is automatically placed under the Structure heading in the section navigation, even though a Channels heading already exists.

I understand that these headings are customizable, but I haven't created or modified any of the initial headings. They were present by default.

It would be helpful if Craft could determine the appropriate heading based on the section type (Channels, Structures, or Singles) and place the new section accordingly. If a matching heading doesn't exist, it could fall back to a "New" or "Uncategorized" heading to indicate that the section needs to be organized.

Also a consideration for V5.

Steps to reproduce
  1. Navigate to Settings → Sections.
  2. Create a new Channel section.
  3. Return to the section navigation.
  4. Observe where the new section is listed.
Expected behavior

A newly created Channel section should appear under the Channels heading, assuming that heading exists.

If no corresponding heading exists, the section should be placed under a default heading indicating that it needs to be organized

Actual behavior

The newly created Channel section appears under the Structure heading, rather than Channels.

Craft CMS version

6

PHP version

No response

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions
主要语言
PHP
星标
3.6k
派生
800
平均合并
15 小时 20 分钟
30 天内合并 PR
715

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

craftcms/cms 的其他 Issue

查看 craftcms/cms 的全部 Issue

相似的 Issue

更多 PHP Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。