...
 
Commits (5)
......@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "913513d266c3db93102e2f917795fa52",
"content-hash": "c0ef861e95751f5b4784a545886acdfe",
"packages": [
{
"name": "cogpowered/finediff",
......@@ -3169,13 +3169,13 @@
"authors": [
{
"name": "The TYPO3 Community",
"role": "Contributor",
"homepage": "https://typo3.org/community/"
"homepage": "https://typo3.org/community/",
"role": "Contributor"
},
{
"name": "TYPO3 CMS Core Team",
"role": "Developer",
"homepage": "https://forge.typo3.org/projects/typo3cms-core"
"homepage": "https://forge.typo3.org/projects/typo3cms-core",
"role": "Developer"
}
],
"description": "TYPO3 CMS Installers",
......@@ -4734,12 +4734,12 @@
"source": {
"type": "git",
"url": "https://github.com/bovigo/vfsStream.git",
"reference": "095238a0711c974ae5b4ebf4c4534a23f3f6c99d"
"reference": "d5fec95f541d4d71c4823bb5e30cf9b9e5b96145"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/bovigo/vfsStream/zipball/095238a0711c974ae5b4ebf4c4534a23f3f6c99d",
"reference": "095238a0711c974ae5b4ebf4c4534a23f3f6c99d",
"url": "https://api.github.com/repos/bovigo/vfsStream/zipball/d5fec95f541d4d71c4823bb5e30cf9b9e5b96145",
"reference": "d5fec95f541d4d71c4823bb5e30cf9b9e5b96145",
"shasum": ""
},
"require": {
......@@ -4766,13 +4766,13 @@
"authors": [
{
"name": "Frank Kleine",
"role": "Developer",
"homepage": "http://frankkleine.de/"
"homepage": "http://frankkleine.de/",
"role": "Developer"
}
],
"description": "Virtual file system to mock the real file system in unit tests.",
"homepage": "http://vfs.bovigo.org/",
"time": "2019-04-08T13:54:32+00:00"
"time": "2017-08-01T08:02:14+00:00"
},
{
"name": "myclabs/deep-copy",
......@@ -5133,8 +5133,8 @@
"authors": [
{
"name": "Sebastian Bergmann",
"role": "lead",
"email": "sebastian@phpunit.de"
"email": "sebastian@phpunit.de",
"role": "lead"
}
],
"description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.",
......@@ -5405,8 +5405,8 @@
"authors": [
{
"name": "Sebastian Bergmann",
"role": "lead",
"email": "sebastian@phpunit.de"
"email": "sebastian@phpunit.de",
"role": "lead"
}
],
"description": "The PHP Unit Testing framework.",
......@@ -6451,8 +6451,8 @@
"authors": [
{
"name": "Arne Blankerts",
"email": "arne@blankerts.de",
"role": "Developer"
"role": "Developer",
"email": "arne@blankerts.de"
}
],
"description": "A small library for converting tokenized PHP source code into XML and potentially other formats",
......
......@@ -44,7 +44,7 @@ return [
'7-hideinmenu' => 'apps-pagetree-page-mountpoint-hideinmenu',
'7-root' => 'apps-pagetree-page-mountpoint-root',
'199' => 'apps-pagetree-spacer',
'199-hideinmenu' => 'apps-pagetree-spacer',
'199-hideinmenu' => 'apps-pagetree-spacer-hideinmenu',
'199-root' => 'apps-pagetree-page-domain',
'254' => 'apps-pagetree-folder-default',
'254-hideinmenu' => 'apps-pagetree-folder-default',
......
......@@ -171,6 +171,16 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
$this->recordIds['localizedContentId'] = $localizedTableIds[self::TABLE_Content][self::VALUE_ContentIdSecond];
}
/**
* See DataSet/localizeContentWHideAtCopy.csv
*/
public function localizeContentWithHideAtCopy()
{
$GLOBALS['TCA'][self::TABLE_Content]['ctrl']['hideAtCopy'] = true;
self::localizeContent();
$this->actionService->modifyRecord(self::TABLE_Content, $this->recordIds['localizedContentId'], ['hidden' => 0]);
}
/**
* See DataSet/localizeContentRecord.csv
* @see \TYPO3\CMS\Core\Migrations\TcaMigration::sanitizeControlSectionIntegrity()
......
......@@ -21,7 +21,7 @@
"ext-xml": "*",
"cogpowered/finediff": "~0.3.1",
"doctrine/annotations": "^1.3",
"doctrine/dbal": "^2.9",
"doctrine/dbal": "^2.10",
"doctrine/instantiator": "^1.1",
"doctrine/lexer": "^1.0",
"guzzlehttp/guzzle": "^6.3.0",
......
......@@ -1733,6 +1733,13 @@ class TypoScriptFrontendController implements LoggerAwareInterface
if (!empty($this->pageArguments->getArguments()['cHash']) || empty($this->pageArguments->getDynamicArguments())) {
return;
}
$queryParams = $this->pageArguments->getDynamicArguments();
$queryParams['id'] = $this->pageArguments->getPageId();
$argumentsThatWouldRequireCacheHash = GeneralUtility::makeInstance(CacheHashCalculator::class)
->getRelevantParameters(HttpUtility::buildQueryString($queryParams));
if (empty($argumentsThatWouldRequireCacheHash)) {
return;
}
if ($GLOBALS['TYPO3_CONF_VARS']['FE']['pageNotFoundOnCHashError']) {
$response = GeneralUtility::makeInstance(ErrorController::class)->pageNotFoundAction(
$GLOBALS['TYPO3_REQUEST'],
......
......@@ -19,6 +19,7 @@ use TYPO3\CMS\Core\Cache\Backend\NullBackend;
use TYPO3\CMS\Core\Cache\CacheManager;
use TYPO3\CMS\Core\Context\Context;
use TYPO3\CMS\Core\Domain\Repository\PageRepository;
use TYPO3\CMS\Core\Http\ImmediateResponseException;
use TYPO3\CMS\Core\Http\ServerRequest;
use TYPO3\CMS\Core\Http\ServerRequestFactory;
use TYPO3\CMS\Core\Http\Uri;
......@@ -552,4 +553,81 @@ class TypoScriptFrontendControllerTest extends UnitTestCase
// since PageRenderer is a singleton, this can be queried via the makeInstance call
self::assertEquals('fr', $languageService->lang);
}
public function requireCacheHashValidateRelevantParametersDataProvider(): array
{
return [
'no extra params' => [
[],
false,
],
'with required param' => [
[
'abc' => 1,
],
true,
],
'with required params' => [
[
'abc' => 1,
'abcd' => 1,
],
true,
],
'with not required param' => [
[
'fbclid' => 1,
],
false,
],
'with not required params' => [
[
'fbclid' => 1,
'gclid' => 1,
'foo' => [
'bar' => 1,
],
],
false,
],
'with combined params' => [
[
'abc' => 1,
'fbclid' => 1,
],
true,
],
'with multiple combined params' => [
[
'abc' => 1,
'fbclid' => 1,
'abcd' => 1,
'gclid' => 1
],
true,
]
];
}
/**
* @test
*
* @dataProvider requireCacheHashValidateRelevantParametersDataProvider
* @param array $remainingArguments
* @param bool $expected
*/
public function requireCacheHashValidateRelevantParameters(array $remainingArguments, bool $expected): void
{
$GLOBALS['TYPO3_REQUEST'] = new ServerRequest();
$GLOBALS['TYPO3_CONF_VARS']['FE']['pageNotFoundOnCHashError'] = true;
$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'] = ['gclid', 'fbclid', 'foo[bar]'];
$this->subject = $this->getAccessibleMock(TypoScriptFrontendController::class, ['dummy'], [], '', false);
$this->subject->_set('pageArguments', new PageArguments(1, '0', ['tx_test' => 1], ['tx_test' => 1], $remainingArguments));
if ($expected) {
static::expectException(ImmediateResponseException::class);
}
$this->subject->reqCHash();
}
}
......@@ -13,7 +13,7 @@
"sort-packages": true
},
"require": {
"doctrine/dbal": "^2.9",
"doctrine/dbal": "^2.10",
"psr/http-message": "~1.0",
"psr/log": "~1.0.0",
"typo3/cms-backend": "10.2.*@dev",
......
.. include:: ../Includes.txt
.. highlight:: typoscript
.. _config-typo3:
......@@ -23,22 +23,23 @@ Page TSconfig
Relevant Settings for `rte_ckeditor`
------------------------------------
Page TSconfig can be used to change
Page TSconfig can be used to change:
#. Default preset::
RTE.default.preset = full
#. Override for one table (:ts:`RTE.config.table.column.preset`)::
* the preset used in general
* or the preset used by specific database table fields.
* or the preset used by specific database table fields for a specific table type (see :ref:`t3tca:types`).
RTE.config.tx_news_domain_model_news.preset = minimal
.. code-block:: typoscript
#. Override for one field (:ts:`RTE.config.table.column.name.preset`)::
# Default preset
RTE.default.preset = full
RTE.config.tt_content.bodytext.preset = normal
# RTE.config.table.column.preset = presetIdentifier
RTE.config.tx_news_domain_model_news.preset = minimal
#. Override for one field, if type matches (:ts:`RTE.config.table.column.types.name.preset`)::
# RTE.config.table.column.types.name.preset = presetIdentifier
RTE.config.tt_content.types.textpic.preset = default
RTE.config.tt_content.bodytext.types.textmedia.preset = minimal
For more examples, see :ref:`t3tsconfig:pageTsRte` in "TSconfig Reference".
......
......@@ -10,17 +10,17 @@
,1,0,0,"Dansk","dk",,,,,,,,,,,,,
,2,0,0,"Deutsch","de",,,,,,,,,,,,,
"sys_category",,,,,,,,,,,,,,,,,,
,"uid","pid","sorting","deleted","sys_language_uid","l10n_parent","t3_origuid","t3ver_wsid","t3ver_state","t3ver_stage","t3ver_oid","t3ver_move_id","title","parent","items","l10n_diffsource","description",
,28,0,256,0,0,0,0,0,0,0,0,0,"Category A",0,0,,,
,29,0,512,0,0,0,0,0,0,0,0,0,"Category B",0,0,,,
,30,0,768,0,0,0,0,0,0,0,0,0,"Category C",0,0,,,
,31,0,1024,0,0,0,0,0,0,0,0,0,"Category A.A",28,0,,,
,"uid","pid","sorting","hidden","deleted","sys_language_uid","l10n_parent","t3_origuid","t3ver_wsid","t3ver_state","t3ver_stage","t3ver_oid","t3ver_move_id","title","parent","items","l10n_diffsource","description"
,28,0,256,0,0,0,0,0,0,0,0,0,0,"Category A",0,0,,
,29,0,512,0,0,0,0,0,0,0,0,0,0,"Category B",0,0,,
,30,0,768,0,0,0,0,0,0,0,0,0,0,"Category C",0,0,,
,31,0,1024,0,0,0,0,0,0,0,0,0,0,"Category A.A",28,0,,
"tt_content",,,,,,,,,,,,,,,,,,
,"uid","pid","sorting","deleted","sys_language_uid","l18n_parent","l10n_source","t3_origuid","t3ver_wsid","t3ver_state","t3ver_stage","t3ver_oid","t3ver_move_id","header","bodytext",,,
,296,88,256,0,0,0,0,0,0,0,0,0,0,"Regular Element #0",,,,
,297,89,256,0,0,0,0,0,0,0,0,0,0,"Regular Element #1",,,,
,298,89,512,0,0,0,0,0,0,0,0,0,0,"Regular Element #2",,,,
,299,89,768,0,0,0,0,0,0,0,0,0,0,"Regular Element #3",,,,
,300,89,1024,0,1,299,299,299,0,0,0,0,0,"[Translate to Dansk:] Regular Element #3",,,,
,301,89,384,0,1,297,297,297,0,0,0,0,0,"[Translate to Dansk:] Regular Element #1",,,,
,302,89,448,0,2,297,301,301,0,0,0,0,0,"[Translate to Deutsch:] [Translate to Dansk:] Regular Element #1",,,,
,"uid","pid","sorting","hidden","deleted","sys_language_uid","l18n_parent","l10n_source","t3_origuid","t3ver_wsid","t3ver_state","t3ver_stage","t3ver_oid","t3ver_move_id","header","bodytext",,
,296,88,256,0,0,0,0,0,0,0,0,0,0,0,"Regular Element #0",,,
,297,89,256,0,0,0,0,0,0,0,0,0,0,0,"Regular Element #1",,,
,298,89,512,0,0,0,0,0,0,0,0,0,0,0,"Regular Element #2",,,
,299,89,768,0,0,0,0,0,0,0,0,0,0,0,"Regular Element #3",,,
,300,89,1024,0,0,1,299,299,299,0,0,0,0,0,"[Translate to Dansk:] Regular Element #3",,,
,301,89,384,0,0,1,297,297,297,0,0,0,0,0,"[Translate to Dansk:] Regular Element #1",,,
,302,89,448,0,0,2,297,301,301,0,0,0,0,0,"[Translate to Deutsch:] [Translate to Dansk:] Regular Element #1",,,
"pages",,,,,,,,,,,,
,"uid","pid","sorting","deleted","t3_origuid","t3ver_wsid","t3ver_state","t3ver_stage","t3ver_oid","t3ver_move_id","title","slug"
,1,0,256,0,0,0,0,0,0,0,"FunctionalTest","/"
,88,1,256,0,0,0,0,0,0,0,"DataHandlerTest","/data-handler"
,89,88,256,0,0,0,0,0,0,0,"Relations","/data-handler/relations"
,90,88,512,0,0,0,0,0,0,0,"Target","/data-handler/target"
"pages",,,,,,,,,,,,,
,"uid","pid","sorting","hidden","deleted","t3_origuid","t3ver_wsid","t3ver_state","t3ver_stage","t3ver_oid","t3ver_move_id","title","slug"
,1,0,256,0,0,0,0,0,0,0,0,"FunctionalTest","/"
,88,1,256,0,0,0,0,0,0,0,0,"DataHandlerTest","/data-handler"
,89,88,256,0,0,0,0,0,0,0,0,"Relations","/data-handler/relations"
,90,88,512,0,0,0,0,0,0,0,0,"Target","/data-handler/target"
......@@ -190,6 +190,23 @@ class ActionTest extends \TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Reg
->setTable(self::TABLE_Content)->setField('header')->setValues('[Translate to Dansk:] Regular Element #1', '[Translate to Dansk:] Regular Element #2'));
}
/**
* @test
* See DataSet/localizeContentRecord.csv
*/
public function localizeContentWithHideAtCopy()
{
// Create translated page first
$this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId);
parent::localizeContentWithHideAtCopy();
$this->assertAssertionDataSet('localizeContentWHideAtCopy');
$responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections();
// @todo Localized element should be retrieved
self::assertThat($responseSections, $this->getRequestSectionHasRecordConstraint()
->setTable(self::TABLE_Content)->setField('header')->setValues('[Translate to Dansk:] Regular Element #1' /* , '[Translate to Dansk:] Regular Element #2'*/));
}
/**
* @test
* See DataSet/localizeContentFromNonDefaultLanguage.csv
......
"tt_content",,,,,,,,,,,,,,
,"uid","pid","sorting","deleted","sys_language_uid","l18n_parent","l10n_source","t3_origuid","t3ver_wsid","t3ver_state","t3ver_stage","t3ver_oid","t3ver_move_id","header"
,296,88,256,0,0,0,0,0,0,0,0,0,0,"Regular Element #0"
,297,89,256,0,0,0,0,0,0,0,0,0,0,"Regular Element #1"
,298,89,512,0,0,0,0,0,0,0,0,0,0,"Regular Element #2"
,299,89,768,0,0,0,0,0,0,0,0,0,0,"Regular Element #3"
,300,89,1024,0,1,299,299,299,0,0,0,0,0,"[Translate to Dansk:] Regular Element #3"
,301,89,384,0,1,297,297,297,0,0,0,0,0,"[Translate to Dansk:] Regular Element #1"
,302,89,448,0,2,297,301,301,0,0,0,0,0,"[Translate to Deutsch:] [Translate to Dansk:] Regular Element #1"
,310,90,256,0,0,0,0,0,0,0,0,0,0,"Regular Element #10"
,311,90,512,0,1,0,310,310,0,0,0,0,0,"[Translate to Dansk:] Regular Element #10"
,312,90,768,0,2,0,311,311,0,0,0,0,0,"[Translate to Deutsch:] [Translate to Dansk:] Regular Element #10"
,320,-1,512,0,0,0,0,298,2,2,0,298,0,"Regular Element #2"
,321,89,416,0,1,298,298,298,1,1,0,0,0,"[Translate to Dansk:] Regular Element #2"
,322,-1,416,0,1,298,298,298,1,-1,0,321,0,"[Translate to Dansk:] Regular Element #2"
"tt_content",,,,,,,,,,,,,,,
,"uid","pid","sorting","hidden","deleted","sys_language_uid","l18n_parent","l10n_source","t3_origuid","t3ver_wsid","t3ver_state","t3ver_stage","t3ver_oid","t3ver_move_id","header"
,296,88,256,0,0,0,0,0,0,0,0,0,0,0,"Regular Element #0"
,297,89,256,0,0,0,0,0,0,0,0,0,0,0,"Regular Element #1"
,298,89,512,0,0,0,0,0,0,0,0,0,0,0,"Regular Element #2"
,299,89,768,0,0,0,0,0,0,0,0,0,0,0,"Regular Element #3"
,300,89,1024,0,0,1,299,299,299,0,0,0,0,0,"[Translate to Dansk:] Regular Element #3"
,301,89,384,0,0,1,297,297,297,0,0,0,0,0,"[Translate to Dansk:] Regular Element #1"
,302,89,448,0,0,2,297,301,301,0,0,0,0,0,"[Translate to Deutsch:] [Translate to Dansk:] Regular Element #1"
,310,90,256,0,0,0,0,0,0,0,0,0,0,0,"Regular Element #10"
,311,90,512,0,0,1,0,310,310,0,0,0,0,0,"[Translate to Dansk:] Regular Element #10"
,312,90,768,0,0,2,0,311,311,0,0,0,0,0,"[Translate to Deutsch:] [Translate to Dansk:] Regular Element #10"
,320,-1,512,0,0,0,0,0,298,2,2,0,298,0,"Regular Element #2"
,321,89,416,0,0,1,298,298,298,1,1,0,0,0,"[Translate to Dansk:] Regular Element #2"
,322,-1,416,0,0,1,298,298,298,1,-1,0,321,0,"[Translate to Dansk:] Regular Element #2"
"tt_content",,,,,,,,,,,,,,,
,"uid","pid","sorting","hidden","deleted","sys_language_uid","l18n_parent","l10n_source","t3_origuid","t3ver_wsid","t3ver_state","t3ver_stage","t3ver_oid","t3ver_move_id","header"
,296,88,256,0,0,0,0,0,0,0,0,0,0,0,"Regular Element #0"
,297,89,256,0,0,0,0,0,0,0,0,0,0,0,"Regular Element #1"
,298,89,512,0,0,0,0,0,0,0,0,0,0,0,"Regular Element #2"
,299,89,768,0,0,0,0,0,0,0,0,0,0,0,"Regular Element #3"
,300,89,1024,0,0,1,299,299,299,0,0,0,0,0,"[Translate to Dansk:] Regular Element #3"
,301,89,384,0,0,1,297,297,297,0,0,0,0,0,"[Translate to Dansk:] Regular Element #1"
,302,89,448,0,0,2,297,301,301,0,0,0,0,0,"[Translate to Deutsch:] [Translate to Dansk:] Regular Element #1"
,310,90,256,0,0,0,0,0,0,0,0,0,0,0,"Regular Element #10"
,311,90,512,0,0,1,0,310,310,0,0,0,0,0,"[Translate to Dansk:] Regular Element #10"
,312,90,768,0,0,2,0,311,311,0,0,0,0,0,"[Translate to Deutsch:] [Translate to Dansk:] Regular Element #10"
,320,-1,512,0,0,0,0,0,298,2,2,0,298,0,"Regular Element #2"
,321,89,416,1,0,1,298,298,298,1,1,0,0,0,"[Translate to Dansk:] Regular Element #2"
,322,-1,416,0,0,1,298,298,298,1,-1,0,321,0,"[Translate to Dansk:] Regular Element #2"