Skip to content

Category tree - #32

Draft
maikschneider wants to merge 25 commits into
masterfrom
category-tree
Draft

Category tree#32
maikschneider wants to merge 25 commits into
masterfrom
category-tree

Conversation

@maikschneider

Copy link
Copy Markdown
Member

No description provided.

@coderabbitai

coderabbitai Bot commented Nov 26, 2025

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 16a0a4d7-a000-491e-afe1-fac8cad8046d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch category-tree

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

# Conflicts:
#	.ddev/commands/web/init-typo3
#	Configuration/Backend/AjaxRoutes.php
# Conflicts:
#	phpstan-baseline.neon
The TSconfig assignment in initializeConfiguration() was commented out
while the variable was still read for hideRecords and showNavTitle,
emitting an 'Undefined variable' warning on every tree data fetch. The
two resulting PHPStan errors were suppressed in the baseline instead of
fixed. Restore the assignment and drop the baseline entries.
ASCII strtolower() left titles with German umlauts (ä/ö/ü) unmatched
when searching the category tree. Use mb_strtolower() so the case-fold
covers multibyte characters.
pagesToFlatArray() was a verbatim copy of the core page-tree method,
never called by the category tree. Drop it along with the properties it
exclusively used (addIdAsPrefix, addDomainName, showMountPathAboveMounts,
backgroundColors, labels, expandAllNodes, useNavTitle), the now-unused
imports (Label, BackendUtility, Permission), the commented-out config
blocks in initializeConfiguration(), and the stale PHPStan baseline entry
for the always-true ternary that no longer exists.
getIconForRecord() returns a non-nullable Icon, so the ?-> on it was
flagged by PHPStan (nullsafe.neverNull). Resolve the icon once into a
local, use a plain -> for getIdentifier(), and keep the nullsafe only on
getOverlayIcon() which is genuinely nullable. Also removes the unused
$identifier local. CategoryTreeController is now PHPStan-clean.
fetchDataAction() always fetched the full root tree, then threw it away
and re-queried when a parent was requested. Move the root fetch into the
else branch that actually consumes it, so a lazy child-load runs one
query instead of two.
Category nodes were emitted with the DTO defaults (editable=false,
deletable=false) regardless of the backend user's rights. Resolve both
flags from BackendUserAuthentication::check('tables_modify',
'sys_category') (admins always pass), cached per request and applied in
categoryToFlatArray so both the data and filter actions are covered.
DataHandler still enforces record-level access on the actual write.
Expose a canModify flag in the tree configuration (from the same
tables_modify check used for node flags) and only render the toolbar
drag-to-create type items when it is true. Users without sys_category
modify rights no longer see a create affordance that DataHandler would
reject anyway. Rebuilds the bundled JS.
# Conflicts:
#	Configuration/Backend/AjaxRoutes.php
# Conflicts:
#	phpstan-baseline.neon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant