Project

General

Profile

Actions

Bug #100856

closed

SilentConfigurationUpgradeService removed FE/versionNumberInFilename setting

Added by Alexander Stehlik about 1 year ago. Updated 6 days ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Install Tool
Target version:
Start date:
2023-05-10
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
12
PHP Version:
8.2
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:

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']);
}

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Task #99810: Streamline "createVersionNumberedFilename"ClosedBenni Mack2023-02-03

Actions
Actions #1

Updated by Alexander Stehlik about 1 year ago

  • Related to Task #99810: Streamline "createVersionNumberedFilename" added
Actions #2

Updated by Chris Müller about 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"."

https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/12.3/Deprecation-99810-VersionNumberedFilenameOptionNowBoolean.html#impact

The default configuration is false, so the removal in the "else" path is okay.

Actions #3

Updated by Alexander Stehlik about 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 to true
  • 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.

Actions #4

Updated by Alexander Stehlik about 1 year ago

  • Description updated (diff)
Actions #5

Updated by Chris Müller about 1 year ago

  • Status changed from Needs Feedback to Accepted
  • Assignee set to Chris Müller
Actions #6

Updated by Gerrit Code Review about 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

Actions #7

Updated by Gerrit Code Review about 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

Actions #8

Updated by Chris Müller about 1 year ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #9

Updated by Benni Mack 6 days ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF