Ambiguous "title" when browsing Entries

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

维护者通常 1 天内回复

@jaygeorge 已经在做这个了。

开始于 2026年10月7日。

  • #15603 来自 @jaygeorge —— 未关闭

评估

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

调研方向

Start from the control panel's Link/Entries fieldtype browse modal — the Vue components under resources/js that render the "List" and "Tree" modes (search for the list/tree toggle and where each entry's title is rendered). Determine what extra context is available per entry (collection handle, URI, title from other fields) and how multi-collection configs behave. Done when two same-titled entries in one collection, and duplicates across collections, are distinguishable in List mode, verified against the repro steps in the issue with a fresh Statamic install.

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

描述

fieldtypes ui
Bug description

In a Structured Collection, if two child pages have the same Title, they become ambiguous when browsing links in the "List" mode.

Image

This applies to areas such as:

  • Link fieldtype
  • Entries fieldtype
  • Bard link browser
  • Navigation "Link to Entry"

If the fieldtype is configured for multiple Collections, the "tree" view is not available at all - so there is no other workaround without setting meaningful titles (but then requires other fields for front end titles).

In the past we've worked around this by hiding the Title field, and creating a frontend-suitable field instead, and using a listener to set the Title based on the structured route. Catch is that "title" is still a valid variable but is no longer meaningful for front end users.

How to reproduce
  1. New Statamic install
  2. Create a nested structure, such as:
Image
  1. Add a Link fieldtype to your Blueprint
  2. Edit an Entry and browse the Link field for an entry - switch to "List" mode
    In the above, you could still flick to "Tree" and see more meaningful structures.

To continue:

  1. Add a new Collection, configure to be routable, and add a "Tomato" entry
  2. Use the Link fieldtype again - "Tree" is no longer an option, so you must use "List" - but there are now three "Tomato" entries
    At least different Collections show the Collection for each Entry, but that does not resolve the issue of the same name child in a single Collection.
Environment
Environment
Laravel Version: 13.35.0
PHP Version: 8.5.10
Composer Version: 2.10.2
Environment: local
Debug Mode: ENABLED
Maintenance Mode: OFF
Timezone: UTC
Locale: en

Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED

Drivers
Broadcasting: log
Cache: file
Database: sqlite
Logs: stack / single
Mail: log
Queue: sync
Session: file

Storage
public/storage: NOT LINKED

Statamic
Addons: 0
License Key: Not set
Sites: 1
Stache Watcher: Enabled (auto)
Static Caching: Disabled
Version: 6.35.1 PRO
Installation

Fresh statamic/statamic site via CLI

Additional details

No response

主要语言
PHP
星标
4.9k
派生
647
平均合并
1 天 45 分钟
30 天内合并 PR
221

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

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

statamic/cms 的其他 Issue

查看 statamic/cms 的全部 Issue

相似的 Issue

更多 PHP Issue

把新 issue 发到你的邮箱

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