Skip to content

Conversation

@froemken
Copy link
Contributor

Remove ext_typoscript_setup.typoscript

It overrides module templates the old way.
It contains TypoScript like plugin which is not available at that point

Remove ext_typoscript_constants.typoscript

It only contains the module template paths for ext_typoscript_setup.typoscript. As that file was removed, there is no need to keep it.

Restructure backend module template

Having backend templates in 3 different folders is bad design:

  • Resources/Private/Templates/Backend
  • Resources/Private/Layouts/Backend
  • Resources/Private/Partials/Backend

Much better is one folder for backend module usage:

  • Resources/Private/Backend/Templates/
  • Resources/Private/Backend/Layouts/
  • Resources/Private/Backend/Partials/

That's also the format, which the new override mechanism prefers (PageTS Config). That's why we use page.tsconfig here. It can NOT be part of a Site Set, as BE modules work page tree independent (yes, there are exceptions).

Before Merge

There are some links/includes referencing files of this extension. Before merge please make sure, that all links are still working.

@linawolf
Copy link
Member

I will take care of the includes in the aftermath

@linawolf
Copy link
Member

@froemken should this be backported to 12.4?

@froemken
Copy link
Contributor Author

Feature: #96812 - Override backend templates with TSconfig comes in with TYPO3 12. So, yes, we should backport it to TYPO3 12.

@linawolf linawolf merged commit 801fc2b into main Apr 13, 2025
29 checks passed
@linawolf linawolf deleted the usePageTsConfigToOverrideBeTemplates branch April 13, 2025 09:32
@github-actions
Copy link

The backport to 12.4 failed:

The process '/usr/bin/git' failed with exit code 1
stderr
error: could not apply 01462f0... Use official API to override backend templates
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".
hint: Disable this message with "git config set advice.mergeConflict false"

stdout
Auto-merging Configuration/page.tsconfig
CONFLICT (add/add): Merge conflict in Configuration/page.tsconfig

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-12.4 12.4
# Navigate to the new working tree
cd .worktrees/backport-12.4
# Create a new branch
git switch --create backport-162-to-12.4
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick 01462f07fe60482ee7faa684e38eb4e9450facf5
# Push it to GitHub
git push --set-upstream origin backport-162-to-12.4
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-12.4

Then, create a pull request where the base branch is 12.4 and the compare/head branch is backport-162-to-12.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants