Bug #90966

Page TS config for languages won't work in list modul

Added by Stefan Berger over 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend User Interface
Target version:
-
Start date:
2020-04-07
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Hi,

we figured out, that e.g. the following page ts config don't work in list module, because the new translation select box doesn't disappear:

mod.SHARED {
    disableLanguages = 1,2,3
}

Deeper testings lead us to the conclusion, that in the RecordListController the method mainAction will be called before the method init, so $this->id is empty and no ts config can be gathered in TYPO3\CMS\Core\Site\Entity\NullSite::getAvailableLanguages later to reduce the amount the found languages.

This will fix that in TYPO3\CMS\Recordlist\Controller\RecordListController::mainAction:

        // $this->siteLanguages = $this->site->getAvailableLanguages($this->getBackendUserAuthentication(), false, (int)$this->id);
        $this->siteLanguages = $this->site->getAvailableLanguages($this->getBackendUserAuthentication(), false, (int)GeneralUtility::_GP('id'));

Thanks for fixing.


Related issues

Related to TYPO3 Core - Story #82206: list module enhancements/bugfixesNew2005-07-21

Actions
#1

Updated by Christian Eßl over 1 year ago

  • Assignee set to Christian Eßl
#2

Updated by Christian Eßl over 1 year ago

Am I correct, that this only happens, if the page has no site config (otherwise there wouldn't be a NullSite in use) and the languages are set in the old way with TypoScript? (Otherwise there wouldn't be other languages than "0", because there no site config was found for this page)

#3

Updated by Christian Eßl over 1 year ago

  • Status changed from New to Needs Feedback
  • Assignee deleted (Christian Eßl)
#4

Updated by Stefan Berger over 1 year ago

Yes, in our case we don't need the site config, because we handle the routing in that application on our own. But for editing the records, we need the sys_languages.

#5

Updated by Daniel Windloff about 1 year ago

  • Related to Story #82206: list module enhancements/bugfixes added
#6

Updated by Gerrit Code Review about 1 year ago

  • Status changed from Needs Feedback to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65739

#7

Updated by Gerrit Code Review about 1 year ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65739

#8

Updated by Daniel Windloff about 1 year ago

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

Updated by Benni Mack about 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF