Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUGFIX] Use page layout specific column labels #1919

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

cweiske
Copy link
Contributor

@cweiske cweiske commented Jan 25, 2022

Labels of columns in page layouts were only translatable with the generic
non-specific key "flux.grid.columns.$columnName".

This patch sets the page layout's grid parent object to be the page layout's form,
so that the resolved parent ID is that of the form.

A column named "one" within a page layout with id "twocol" will thus get
the label key "flux.twocol.columns.one", just as it was for flux 8.

Resolves: #1468


⚠️ I only found the code that fixes #1468. Because of the complexity of flux and my limited experience, I have no idea if that change breaks something else.

@cweiske
Copy link
Contributor Author

cweiske commented Jan 27, 2022

❌ This patch breaks backend layout selection in the page settings on TYPO3 v10 without fluidpages, while it worked fine on v8 with fluidpages. When using this flux patch together with the test_provider_extension, selecting the page layout "Other Template" or "Page template in sub-folder" leads to an error:

An error occurred trying to process items for field "Backend Layout (this page only)" (Parameter $extensionName cannot be empty if a fully-qualified key is not specified.).

Adding the "extensionName" property to the page layout's <form> tag does not help.

@cweiske
Copy link
Contributor Author

cweiske commented Jan 27, 2022

The TYPO3 v10 problem is fixed now.

Labels of columns in page layouts were only translatable with the generic
non-specific key "flux.grid.columns.$columnName".

This patch sets the page layout's grid parent object to be the page layout's form,
so that the resolved parent ID is that of the form.

A column named "one" within a page layout with id "twocol" will thus get
the label key "flux.twocol.columns.one", just as it was for flux 8.

If the backend layout cannot be found because the page template file does
not exist anymore, we need to return NULL from buildBackendLayout()
to get a proper error message.

Resolves: FluidTYPO3#1468
@cweiske cweiske force-pushed the page-layout-column-labels branch from cc57934 to 461b9f2 Compare May 6, 2022 06:11
@cweiske
Copy link
Contributor Author

cweiske commented May 20, 2022

Works fine on TYPO 9 and 10.

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.

Column labels don't get labels from locallang.xlf
1 participant