Bug #92639
closedTYPO3 10.4 - Install tool "slugs for pages" error
Added by Felix Herrmann about 4 years ago. Updated about 4 years ago.
0%
Description
After fixing some migration data for pages i wanted to regenerate all the pages slugs. I cleared all slugs in order to generate them on new titles.
I went to Upgrad Wizard, Mark undone "Introduce URL parts ("slugs") to all existing pages" and rerun the slug generating. In 10.4.8 it works well, in 10.4.9 i get following error:
(1/1) TypeError
Argument 1 passed to TYPO3\CMS\Core\Database\Query\Restriction\WorkspaceRestriction::__construct() must be of the type integer, null given, called in /var/www/html/public/typo3/sysext/core/Classes/Utility/GeneralUtility.php on line 3423
No further changes, just the upgrade wizard.
Files
Bildschirmfoto 2020-10-21 um 14.39.50.png (147 KB) Bildschirmfoto 2020-10-21 um 14.39.50.png | Felix Herrmann, 2020-10-21 14:40 |
Updated by Felix Herrmann about 4 years ago
Updated by Felix Herrmann about 4 years ago
- File deleted (
Bildschirmfoto 2020-10-21 um 08.52.18.png)
Updated by Guido Schmechel about 4 years ago
Can you deliver the complete stacktrace? Or at least the next 2-3 calls to limit the workspace call?
Updated by Felix Herrmann about 4 years ago
Guido Schmechel wrote:
Can you deliver the complete stacktrace? Or at least the next 2-3 calls to limit the workspace call?
(1/1) TypeError
Argument 1 passed to TYPO3\CMS\Core\Database\Query\Restriction\WorkspaceRestriction::__construct() must be of the type integer, null given, called in /var/www/html/public/typo3/sysext/core/Classes/Utility/GeneralUtility.php on line 3423
in /var/www/html/public/typo3/sysext/core/Classes/Database/Query/Restriction/WorkspaceRestriction.php line 48
/** * @param int $workspaceId */ public function __construct(int $workspaceId = 0) { $this->workspaceId = (int)$workspaceId; }
at TYPO3\CMS\Core\Database\Query\Restriction\WorkspaceRestriction->__construct(null)
in /var/www/html/public/typo3/sysext/core/Classes/Utility/GeneralUtility.php line 3423
return self::$container->get($className); } // Create new instance and call constructor with parameters $instance = new $finalClassName(...$constructorArguments); // Register new singleton instance, but only if it is not a known PSR-11 container service if ($instance instanceof SingletonInterface && !(self::$container !== null && self::$container->has($className))) { self::$singletonInstances[$finalClassName] = $instance; }
at TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\Query\\Restriction\\WorkspaceRestriction', null)
in /var/www/html/public/typo3/sysext/backend/Classes/Utility/BackendUtility.php line 297
->getQueryBuilderForTable($table); $queryBuilder->getRestrictions() ->removeAll() ->add(GeneralUtility::makeInstance(DeletedRestriction::class)) ->add(GeneralUtility::makeInstance(WorkspaceRestriction::class, static::getBackendUserAuthentication()->workspace)); $queryBuilder->select('*') ->from($table) ->where(
at TYPO3\CMS\Backend\Utility\BackendUtility::getRecordLocalization('pages', 1, 4)
in /var/www/html/public/typo3/sysext/core/Classes/DataHandling/SlugHelper.php line 628
// no site or requested language available - move on } foreach ($languageIds as $languageId) { $localizedParentPageRecord = BackendUtility::getRecordLocalization('pages', $parentPageRecord['uid'], $languageId); if (!empty($localizedParentPageRecord)) { $parentPageRecord = reset($localizedParentPageRecord); break; }
at TYPO3\CMS\Core\DataHandling\SlugHelper->resolveParentPageRecord(1, 4)
in /var/www/html/public/typo3/sysext/core/Classes/DataHandling/SlugHelper.php line 172
$prefix = ''; if ($this->configuration['generatorOptions']['prefixParentPageSlug'] ?? false) { $languageFieldName = $GLOBALS['TCA'][$this->tableName]['ctrl']['languageField'] ?? null; $languageId = (int)($recordData[$languageFieldName] ?? 0); $parentPageRecord = $this->resolveParentPageRecord($pid, $languageId); if (is_array($parentPageRecord)) { // If the parent page has a slug, use that instead of "re-generating" the slug from the parents' page title if (!empty($parentPageRecord['slug'])) { $rootLineItemSlug = $parentPageRecord['slug'];
at TYPO3\CMS\Core\DataHandling\SlugHelper->generate(array('uid' => 536, 'pid' => 1, 't3ver_oid' => 0, 't3ver_wsid' => 0, 't3ver_state' => 0, 't3ver_stage' => 0, 't3ver_count' => 0, 't3ver_tstamp' => 0, 't3ver_move_id' => 0, 't3_origuid' => 0, 'tstamp' => 1522230352, 'sorting' => 256, 'deleted' => 0, 'perms_userid' => 3, 'perms_groupid' => 2, 'perms_user' => 31, 'perms_group' => 31, 'perms_everybody' => 1, 'editlock' => 0, 'crdate' => 1522230352, 'cruser_id' => 3, 'hidden' => 0, 'title' => 'Hauptnavigation', 'doktype' => 199, 'TSconfig' => null, 'is_siteroot' => 0, 'php_tree_stop' => 0, 'url' => '', 'starttime' => 0, 'endtime' => 0, 'shortcut' => 0, 'shortcut_mode' => 0, 'fe_group' => '', 'subtitle' => '', 'layout' => 0, 'target' => '', 'media' => 0, 'lastUpdated' => 0, 'keywords' => null, 'cache_timeout' => 0, 'cache_tags' => '', 'newUntil' => 0, 'description' => null, 'no_search' => 0, 'SYS_LASTCHANGED' => 0, 'abstract' => null, 'module' => '', 'extendToSubpages' => 0, 'author' => '', 'author_email' => '', 'nav_title' => '', 'nav_hide' => 1, 'content_from_pid' => 0, 'mount_pid' => 0, 'mount_pid_ol' => 0, 'l18n_cfg' => 0, 'fe_login_mode' => 0, 'backend_layout' => '', 'backend_layout_next_level' => '', 'tsconfig_includes' => null, 'tx_impexp_origuid' => 0, 'categories' => 0, 'tx_fed_page_flexform' => null, 'tx_fed_page_flexform_sub' => null, 'tx_fed_page_controller_action' => '', 'tx_fed_page_controller_action_sub' => '', 'tx_kesearch_tags' => null, 'tx_kesearch_abstract' => null, 'tx_kesearch_resultimage' => 0, 'rowDescription' => null, 'sys_language_uid' => 4, 'l10n_source' => 2, 'l10n_state' => null, 'l10n_diffsource' => null, 'slug' => '', 'legacy_overlay_uid' => 280, 'no_index' => 0, 'no_follow' => 0, 'og_title' => '', 'og_description' => null, 'og_image' => 0, 'twitter_title' => '', 'twitter_description' => null, 'twitter_image' => 0, 'canonical_link' => '', 'l10n_parent' => 2, 'seo_title' => 'Hauptnavigation', 'twitter_card' => '', 'sitemap_priority' => '0.5', 'sitemap_changefreq' => '', 'tx_languagevisibility_visibility' => ''), 1)
in /var/www/html/public/typo3/sysext/install/Classes/Updates/PopulatePageSlugs.php line 176
$queryBuilder->expr()->eq('uid', $queryBuilder->createNamedParameter($record['t3ver_oid'], \PDO::PARAM_INT)) )->execute()->fetch(); $pid = (int)$liveVersion['pid']; } $slug = $slugHelper->generate($record, $pid); } $state = RecordStateFactory::forName($this->table) ->fromArray($record, $pid, $recordId);
at TYPO3\CMS\Install\Updates\PopulatePageSlugs->populateSlugs()
in /var/www/html/public/typo3/sysext/install/Classes/Updates/PopulatePageSlugs.php line 107
* @return bool Whether everything went smoothly or not */ public function executeUpdate(): bool { $this->populateSlugs(); return true; } /**
at TYPO3\CMS\Install\Updates\PopulatePageSlugs->executeUpdate()
in /var/www/html/public/typo3/sysext/install/Classes/Service/UpgradeWizardsService.php line 397
$performResult = true; } } else { // confirmation yes or non-confirmable $performResult = $updateObject->executeUpdate(); } } $stream = $this->output->getStream();
at TYPO3\CMS\Install\Service\UpgradeWizardsService->executeWizard('pagesSlugs')
in /var/www/html/public/typo3/sysext/install/Classes/Controller/UpgradeController.php line 1067
{ // ext_localconf, db and ext_tables must be loaded for the updates :( $this->lateBootService->loadExtLocalconfDatabaseAndExtTables(false); $identifier = $request->getParsedBody()['install']['identifier']; $messages = $this->upgradeWizardsService->executeWizard($identifier); $this->lateBootService->resetGlobalContainer(); return new JsonResponse([ 'success' => true, 'status' => $messages,
at TYPO3\CMS\Install\Controller\UpgradeController->upgradeWizardsExecuteAction(object(TYPO3\CMS\Core\Http\ServerRequest))
in /var/www/html/public/typo3/sysext/install/Classes/Middleware/Maintenance.php line 246
'Unknown action method ' . $action . ' in controller ' . $controllerName, 1505216027 ); } $response = $controller->$action($request); } return $response; }
at TYPO3\CMS\Install\Middleware\Maintenance->process(object(TYPO3\CMS\Core\Http\ServerRequest), object(class@anonymous/var/www/html/public/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0x7f6d490ee41b))
in /var/www/html/public/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php line 121
} public function handle(ServerRequestInterface $request): ResponseInterface { return $this->middleware->process($request, $this->next); } }; }
at class@anonymous/var/www/html/public/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0x7f6d490edd16->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in /var/www/html/public/typo3/sysext/core/Classes/Middleware/NormalizedParamsAttribute.php line 45
*/ public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface { $request = $request->withAttribute('normalizedParams', NormalizedParams::createFromRequest($request)); return $handler->handle($request); } }
at TYPO3\CMS\Core\Middleware\NormalizedParamsAttribute->process(object(TYPO3\CMS\Core\Http\ServerRequest), object(class@anonymous/var/www/html/public/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0x7f6d490edd16))
in /var/www/html/public/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php line 172
if (!$middleware instanceof MiddlewareInterface) { throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342); } return $middleware->process($request, $this->next); } }; } }
at class@anonymous/var/www/html/public/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0x7f6d490ee41b->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in /var/www/html/public/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php line 78
* @return ResponseInterface */ public function handle(ServerRequestInterface $request): ResponseInterface { return $this->tip->handle($request); } /** * Seed the middleware stack with the inner request handler
at TYPO3\CMS\Core\Http\MiddlewareDispatcher->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in /var/www/html/public/typo3/sysext/core/Classes/Http/AbstractApplication.php line 85
* @return ResponseInterface */ protected function handle(ServerRequestInterface $request): ResponseInterface { return $this->requestHandler->handle($request); } /** * Set up the application and shut it down afterwards
at TYPO3\CMS\Core\Http\AbstractApplication->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in /var/www/html/public/typo3/sysext/install/Classes/Http/Application.php line 50
protected function handle(ServerRequestInterface $request): ResponseInterface { $this->initializeContext(); return parent::handle($request) ->withHeader('X-Frame-Options', 'SAMEORIGIN'); } /**
at TYPO3\CMS\Install\Http\Application->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in /var/www/html/public/typo3/sysext/core/Classes/Http/AbstractApplication.php line 97
final public function run(callable $execute = null) { try { $response = $this->handle( ServerRequestFactory::fromGlobals() ); if ($execute !== null) { call_user_func($execute); }
at TYPO3\CMS\Core\Http\AbstractApplication->run()
in /var/www/html/public/typo3/install.php line 105
call_user_func(function () { $classLoader = require dirname(dirname(__DIR__)).'/vendor/autoload.php'; \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::run(1, \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::REQUESTTYPE_INSTALL); \TYPO3\CMS\Core\Core\Bootstrap::init($classLoader, true)->get(\TYPO3\CMS\Install\Http\Application::class)->run(); });
at {closure}()
in /var/www/html/public/typo3/install.php line 106
call_user_func(function () { $classLoader = require dirname(dirname(__DIR__)).'/vendor/autoload.php'; \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::run(1, \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::REQUESTTYPE_INSTALL); \TYPO3\CMS\Core\Core\Bootstrap::init($classLoader, true)->get(\TYPO3\CMS\Install\Http\Application::class)->run(); });
Updated by Oliver Bartsch about 4 years ago
- Is duplicate of Bug #92464: TYPO3 Upgrade fails with exception on slug population added
Updated by Oliver Bartsch about 4 years ago
- Status changed from New to Closed
Hi thanks for your report. This bug was already reported in #92464 and is already fixed. I'll therefore close this issue as duplicate. If you feel there is still something not working, please let me know and I'll open the issue.