Merge conflict Gerrit cannot merge this change. It needs a rebase onto main.

Review main Ready for review Breaking

97436[!!!][FEATURE] Link content elements as records

Oli Bartsch CR 0 V -1 Expert +1798 −535 updated 11/15/26, 11:30

Commit message

Links to content elements were stored as page link with the uid of
the content element as fragment, "t3://page?uid=13#123". Core,
backend, frontend and linkvalidator treated a numeric fragment as
tt_content uid: the soft reference parsers created a relation to the
content element, the page tab of the link browser listed content
elements, link fields and pages of type "Link" looked it up, typolink
prefixed the fragment with "c", and linkvalidator merged page and
content element into "13#c123".

Content elements are now linked like any other record, with the
record link handler "content", configured by page TSconfig
TCEMAIN.linkHandler.content and TypoScript config.recordLinks.content
shipped with EXT:frontend: "t3://record?identifier=content&uid=123".

The new page TSconfig option "displayIn = page" lists the records of a
link handler below the selected page in the page tab of the link
browser instead of a tab of its own, filtered, sorted and grouped by
the new PSR-14 event ModifyLinkableRecordsOfPageEvent. Content
elements are listed there as before, grouped by the columns of the
backend layout by a listener of EXT:frontend, and linked as records.
displayIn applies to record link handlers with a table only; any other
link handler keeps its tab.

A page link fragment is a plain fragment. The implicit "c" prefix for
a numeric fragment or section is deprecated and still rendered.
HMENU sectionIndex, whose values are content element uids, adds the
prefix itself. The redirect finisher of EXT:form uses the fragment of
the record link of the content element.

The soft reference parsers no longer create a relation to a content
element for a numeric fragment. The rich text editor marks record
links the link validator reported as broken. The link type "db" of
linkvalidator checks pages only.

The upgrade wizard "contentElementLinkMigration" migrates stored
links in all fields with the typolink or typolink_tag soft reference
parser to record links, or to "#c123" where a record link would
change the target or a record link is not allowed: in link fields
whose allowedTypes exclude record links, and in records on pages where
the identifier "content" links to another table. The wizard reports
such a configuration in its description.

The error handling page content and the static route source of the
site configuration no longer allow record links, which their handlers
never supported.

Test this change

Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch

Check out patch set 9
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/36/97436/9 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/36/97436/9 && git cherry-pick FETCH_HEAD

Review

  • Code review CR 0 Needs a vote
  • Verified V -1 Blocked
    • core-ci -1 CI

Relation chain 4

  1. 97436 [!!!][FEATURE] Link content elements as records This change

  2. main 97675[BUGFIX] Resolve record links in the link preview of the RTE This change is based on it Merge conflict Oli Bartsch CR 0 V -1 Hard +265 −32
  3. main 97674[BUGFIX] Flush pages linking to a record when the record changes This change is based on it Oli Bartsch CR 0 V 0 Hard +288 −6

    The chain has patch set 3 of 4, the changes above it need a rebase.

  4. main 97673[BUGFIX] Keep parameters and fragment of rich text page links on import This change is based on it Merged Oli Bartsch CR +2 V +2 → 14.3 Normal +104 −22

    The chain has patch set 2 of 3, the changes above it need a rebase.

Issues 2

Files 61

Show 41 more files

Review log 1019

  1. Oli Bartsch uploaded patch set 1 11/09/26, 13:03

  2. core-ci voted on patch set 1 V +1 11/09/26, 13:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/113681

  3. Oli Bartsch uploaded patch set 2 V +1 11/09/26, 14:49

  4. core-ci voted on patch set 2 V +1 11/09/26, 15:14 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/113713

  5. Oli Bartsch uploaded patch set 3 V +1 11/09/26, 18:52

  6. core-ci voted on patch set 3 V +1 11/09/26, 19:06 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/113765

  7. Benni Mack rebased onto patch set 4 V +1 11/10/26, 15:09

  8. Benni Mack uploaded patch set 5 11/10/26, 15:14

  9. Benni Mack commented on patch set 5 11/10/26, 15:17

    I'm abandoning my t3://content approach (96102) in favour of this one: it removes the tt_content knowledge from core and backend, which is what we need to make EXT:frontend optional. I've extended the patch so editors keep their workflow, without reintroducing tt_content in EXT:backend: 1. No separate "Content elements" tab. New generic page TSconfig option TCEMAIN.linkHandler.<id>.displayIn = page: the records of that link handler's table are listed below the selected page in the "Page" tab and linked as records. Reopening such a link opens the page tab with the record selected. If the page tab isn't allowed but the handler is, it falls back to a tab of its own. 2. PageLinkHandler lists the records generically via TcaSchema (sortby/ default_sortby, page language + "all", workspace overlay, live uid, tables_select check) and uses constructor DI now. 3. New PSR-14 event ModifyLinkableRecordsOfPageEvent to filter, sort and group the list. EXT:frontend ships a listener that groups content elements by backend layout columns (resolves the old @todo). 4. DatabaseRecordLinkBuilder adds the cache tag <table>_<uid> for every record link (also if the record can't be linked right now), so pages are flushed when a linked content element is moved, hidden, deleted. 5. RedirectFinisher: a numeric fragment uses the fragment of the record link (new option fragmentRecordLinkIdentifier, default "content") instead of hardcoding "c". Open: an installation that already uses the identifier "content" for another table gets the shipped config merged into its own (documented in the Breaking RST). Maybe the wizard or reports module could detect that.
  10. core-ci voted on patch set 4 V -1 11/10/26, 15:18 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/113917

  11. Benni Mack updated the commit message in patch set 6 11/10/26, 15:18

  12. core-ci voted on patch set 5 V -1 11/10/26, 15:28 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/113918

  13. core-ci voted on patch set 6 V +1 11/10/26, 15:31 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/113919

  14. Oli Bartsch uploaded patch set 7 V +1 11/15/26, 10:40

  15. core-ci voted on patch set 7 V +1 11/15/26, 10:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/114523

  16. Oli Bartsch uploaded patch set 8 V +1 11/15/26, 11:01

  17. Oli Bartsch uploaded patch set 9 11/15/26, 11:21

  18. core-ci voted on patch set 8 V +1 11/15/26, 11:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/114532

  19. core-ci voted on patch set 9 V -1 11/15/26, 11:30 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/114538