Bug #100856
closedSilentConfigurationUpgradeService removed FE/versionNumberInFilename setting
100%
Description
There seems to be an error in the logic of \TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService::migrateVersionNumberInFileNameSetting()
:
The option is always removed, when the value is not embed
:
if ($currentOption === 'embed') {
$confManager->setLocalConfigurationValueByPath('FE/versionNumberInFilename', true);
} else {
$confManager->removeLocalConfigurationKeysByPath(['FE/versionNumberInFilename']);
}
This does not seem to make sense because the value is also removed, when it is set to true
.
Am I missing something here or this be a conditional else, something like:
if ($currentOption === 'embed') {
...
} elseif (!$currentOption) {
$confManager->removeLocalConfigurationKeysByPath(['FE/versionNumberInFilename']);
}
Updated by Alexander Stehlik over 1 year ago
- Related to Task #99810: Streamline "createVersionNumberedFilename" added
Updated by Chris Müller over 1 year ago
- Status changed from New to Needs Feedback
The behaviour is correct according to the changelog:
"If the option is now set to "false", it behaves as "querystring" did before, setting it to "true", the feature behaves exactly as "embed"."
The default configuration is false, so the removal in the "else" path is okay.
Updated by Alexander Stehlik over 1 year ago
Thank you for the quick response, @Chris Müller.
I'm not sure if I follow you, though.
When I set the setting to true
(I want the embed it in the filename) it is still removed.
IMO it should only be removed when it is set to false
.
Now what happens is:
- the first run changes it from
embed
totrue
- the second removes it, because it is not
embed
Update: Sorry, I just realized that my description was not fully accurate. I updated it and hope that makes it clearer.
Updated by Chris Müller over 1 year ago
- Status changed from Needs Feedback to Accepted
- Assignee set to Chris Müller
Updated by Gerrit Code Review over 1 year ago
- Status changed from Accepted to Under Review
Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79052
Updated by Gerrit Code Review over 1 year ago
Patch set 1 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79075
Updated by Chris Müller over 1 year ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset db68610a5fc4fb8c39acd512466f27bb473ad8ee.