diff --git a/Classes/Command/MigrateNewsCommandController.php b/Classes/Command/MigrateNewsCommandController.php index c7623221f4269105bb2961970e5f4bc0c6fd44ec..399d025ccaa2b231e76335a3d2acd8f31e5e7473 100644 --- a/Classes/Command/MigrateNewsCommandController.php +++ b/Classes/Command/MigrateNewsCommandController.php @@ -101,7 +101,7 @@ class MigrateNewsCommandController extends CommandController { * @param int $year only news from that year will be migrated * @param string $languageMapAsJson a json, mapping language ids (old => new). this is needed if the sys_language_uids have changed * @param string $categoryMapAsJson a json, mapping sys_category ids (old => new). t - * @param $pId $year only news from that year will be migrated + * @param int $pId only news from that pid will be migrated * * @throws IllegalObjectTypeException * @throws UnknownObjectException @@ -113,7 +113,7 @@ class MigrateNewsCommandController extends CommandController { $categoryMapAsJson = '{"2":10,"3":11,"4":12,"5":13,"6":14,"7":15,"8":16,"9":17}', $pId = 52 ) { - // fix repair translation bug where tsfee is missing from command controller, can be removed when v1.5 is released + // fix repair translation bug where tsfe is missing from command controller, can be removed when v1.5 is released if (!$GLOBALS['TSFE']) { /** @var TypoScriptFrontendController $typoScriptController */ $GLOBALS['TSFE'] = $typoScriptController = $this->objectManager->get( diff --git a/README.md b/README.md index e184b35c38472cf8df6aaa1c606d1d1797235e25..636dd11afb3ec46901f84cd03d890a6117576cce 100644 --- a/README.md +++ b/README.md @@ -313,4 +313,16 @@ You can also handle the localisation of news pages for all the languages in your - **full-opacity flag icon** : Edit the existing localisation record - **half-transparent flag icon with <img height="14px" width="14px" src="https://camo.githubusercontent.com/b10f4d50dc21b152cde15cef5983c139e77b1c34/68747470733a2f2f7261776769742e636f6d2f5459504f332f5459504f332e49636f6e732f6d61737465722f646973742f6f7665726c61792f6f7665726c61792d6e65772e737667"/> overlay** : Create new localisation record -***Note*** : The extension also adds a News Module link in the Page Module of News/Category pages \ No newline at end of file +***Note*** : The extension also adds a News Module link in the Page Module of News/Category pages + + +## Migrating tx_news to sg_news + +This extension comes with the command controller task **** to migirate tx_news entries to sg_news. The task comes with the following parameters: + +- **copyPageId** : You will need a template site, which will be the basis of each new news record. Create your content elements accordingly on this site. +- **categoryPid** : This needs to be the category page id, you want your news to be children of. +- **year** : Only news of this year will be migrated +- **languageMapAsJson** : a json string, mapping language ids (old => new). this is needed if the sys_language_uids have changed +- **categoryMapAsJson** : a json string, mapping sys_category ids (old => new). +- **pId** : only news from that pid will be migrated