fix: prevent v14 "page is not valid" condition error for styleguide robots meta - #45
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughIn ChangesTypoScript robots condition fix
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Summary
traverse(page, "doktype")conditions (TYPO3 v14) #44: on TYPO3 v14 the[traverse(page, "doktype") == …]setup condition repeatedly threwSyntaxError: Variable "page" is not valid(ERROR-level log noise), and thenoindex,nofollowrule was silently skipped.pagewhen the calling factory passes one; any page-less setup-TypoScript build (non-standard callers) fails to parse the whole expression.if/isInListguard onpage:doktype. No condition is parsed during include-tree builds, so it cannot fail in any caller context (v12/v13/v14).Verified (local v14,
.Build/14)<meta name="robots" content="noindex,nofollow">is not validparse errorsNote
The
TCEFORM.tsconfigconditions are left unchanged: they run as Page TSconfig, wherePageTsConfigFactoryalways registerspage(empty when off-page), so they never parse-fail.Changes
Configuration/TypoScript/setup.typoscript- replace[traverse(page, "doktype")]condition with a stdWrapifguard on the robots metaSummary by CodeRabbit