-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
number in Page -> URL Alias leads to error when rendering rootline #145
Comments
Thanks for reporting! Strange that it works in 1.x because the code for resolving aliases to page ids is nearly identical in both places. New
Old:
|
By the way, if you ever have a page with id 2013, you will have a problem if I make a fix for this. The page will NOT be encoded correctly because alias has higer priority than page id. Best is NOT to use numbers as aliases. You can use speaking url path segment field instead. |
Sorry, it is hard for me to tell if this makes a big difference or not. The function names are different so I am not sure if it is so easy to tell that nothing else changed. But there must be some difference because before it worked. I reread the documentation of the field URL alias and I think you are absoutely right. Thank you very much. |
After upgrading from typo3 realurl 1.13.6 to 2.0.11 (and 2.0.14) on Typo3 6.2.21 installation
when using numbers for 'URL alias' for 'page' e.g. 2013, the rootline can not be rendered.
TypoScript
`temp.breadcrumb = COA
temp.breadcrumb.10 = HMENU
temp.breadcrumb.10 {
special = rootline
special.range = 1|-1
"not in menu pages" should show up in the breadcrumbs menu
includeNotInMenu = 1
...
...
`
when I uncomment the rootlne source code for the menu, everything works fine.
Same goes for disabling realURL, when deactivated everything works fine.
Exception when rendering the page
`Uncaught TYPO3 Exception
#1343589451: Could not fetch page data for uid 2013. (More information)
RuntimeException thrown in file
/var/www/typo3.mySite.com/typo3_src-6.2.21/typo3/sysext/core/Classes/Utility/RootlineUtility.php in line 243.
26 TYPO3\CMS\Core\Utility\RootlineUtility::getRecordArray(2013)
/var/www/typo3.mySite.com/typo3_src-6.2.21/typo3/sysext/core/Classes/Utility/RootlineUtility.php:
00349: */
00350: protected function generateRootlineCache() {
00351: $page = $this->getRecordArray($this->pageUid);
00352: // If the current page is a mounted (according to the MP parameter) handle the mount-point
00353: if ($this->isMountedPage()) {
25 TYPO3\CMS\Core\Utility\RootlineUtility::generateRootlineCache()
/var/www/typo3.mySite.com/typo3_src-6.2.21/typo3/sysext/core/Classes/Utility/RootlineUtility.php:
00205: $entry = static::$cache->get($this->cacheIdentifier);
00206: if (!$entry) {
00207: $this->generateRootlineCache();
00208: } else {
00209: static::$localCache[$this->cacheIdentifier] = $entry;
24 TYPO3\CMS\Core\Utility\RootlineUtility::get()
/var/www/typo3.mySite.com/htdocs/typo3conf/ext/realurl/Classes/Encoder/UrlEncoder.php:
00421: );
00422: /** @var \TYPO3\CMS\Core\Utility\RootlineUtility $rootLineUtility */
00423: $rootLine = $rootLineUtility->get();
00424:
00425: // Skip from the root of the tree to the first level of pages
23 DmitryDulepov\Realurl\Encoder\UrlEncoder::createPathComponentUsingRootline()
/var/www/typo3.mySite.com/htdocs/typo3conf/ext/realurl/Classes/Encoder/UrlEncoder.php:
00364: protected function createPathComponent() {
00365: if (!$this->createPathComponentThroughOverride()) {
00366: $this->createPathComponentUsingRootline();
00367: }
00368: }
22 DmitryDulepov\Realurl\Encoder\UrlEncoder::createPathComponent()
/var/www/typo3.mySite.com/htdocs/typo3conf/ext/realurl/Classes/Encoder/UrlEncoder.php:
00499: $this->appendToEncodedUrl($cacheEntry->getPagePath());
00500: } else {
00501: $this->createPathComponent();
00502: }
00503: }
21 DmitryDulepov\Realurl\Encoder\UrlEncoder::encodePathComponents()
/var/www/typo3.mySite.com/htdocs/typo3conf/ext/realurl/Classes/Encoder/UrlEncoder.php:
00762: if (!$this->fetchFromtUrlCache()) {
00763: $this->encodePreVars();
00764: $this->encodePathComponents();
00765: $this->encodeFixedPostVars();
00766: $this->encodePostVarSets();
20 DmitryDulepov\Realurl\Encoder\UrlEncoder::executeEncoder()
/var/www/typo3.mySite.com/htdocs/typo3conf/ext/realurl/Classes/Encoder/UrlEncoder.php:
00103: $this->urlToEncode = $encoderParameters['LD']['totalURL'];
00104: if ($this->canEncoderExecute()) {
00105: $this->executeEncoder();
00106: $encoderParameters['LD']['totalURL'] = $this->encodedUrl;
00107: }
19 DmitryDulepov\Realurl\Encoder\UrlEncoder::encodeUrl(array, TYPO3\CMS\Core\TypoScript\TemplateService)
18 call_user_func_array(array, array)
/var/www/typo3.mySite.com/typo3_src-6.2.21/typo3/sysext/core/Classes/Utility/GeneralUtility.php:
04313: }
04314: // Call method:
04315: $content = call_user_func_array(array(&$classObj, $parts[1]), array(&$params, &$ref));
04316: } else {
04317: $errorMsg = 'No method name '' . $parts[1] . '' in class ' . $parts[0];
17 TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction("DmitryDulepov\Realurl\Encoder\UrlEncoder->encodeUrl", array, TYPO3\CMS\Core\TypoScript\TemplateService)
/var/www/typo3.mySite.com/typo3_src-6.2.21/typo3/sysext/core/Classes/TypoScript/TemplateService.php:
01548: );
01549: foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tstemplate.php']['linkData-PostProc'] as $_funcRef) {
01550: GeneralUtility::callUserFunction($_funcRef, $_params, $this);
01551: }
01552: }
16 TYPO3\CMS\Core\TypoScript\TemplateService::linkData(array, "", NULL, "", "", "", NULL, "")
/var/www/typo3.mySite.com/typo3_src-6.2.21/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php:
06134: $target = $forceTarget;
06135: }
06136: $LD = $GLOBALS['TSFE']->tmpl->linkData($page, $target, $conf['no_cache'], '', '', $addQueryParams, $theTypeP, $targetDomain);
06137: if (strlen($targetDomain)) {
06138: // We will add domain only if URL does not have it already.
15 TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::typoLink("|", array)
/var/www/typo3.mySite.com/typo3_src-6.2.21/typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php:
01832: }
01833: $conf['linkAccessRestrictedPages'] = $this->mconf['showAccessRestrictedPages'] && $this->mconf['showAccessRestrictedPages'] !== 'NONE';
01834: $this->parent_cObj->typoLink('|', $conf);
01835: $LD = $this->parent_cObj->lastTypoLinkLD;
01836: $LD['totalURL'] = $this->parent_cObj->lastTypoLinkUrl;
14 TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::menuTypoLink(array, NULL, "", "", "", "", NULL)
/var/www/typo3.mySite.com/typo3_src-6.2.21/typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php:
01311: $LD = $this->menuTypoLink($thePage, $mainTarget, '', '', $overrideArray, $this->mconf['addParams'] . $MP_params . $this->menuArr[$key]['_ADD_GETVARS'], $typeOverride);
01312: } else {
01313: $LD = $this->menuTypoLink($this->menuArr[$key], $mainTarget, '', '', $overrideArray, $this->mconf['addParams'] . $MP_params . $this->I['val']['additionalParams'] . $this->menuArr[$key]['_ADD_GETVARS'], $typeOverride);
01314: }
01315: // Override URL if using "External URL" as doktype with a valid e-mail address:
13 TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::link(1, NULL, NULL)
/var/www/typo3.mySite.com/typo3_src-6.2.21/typo3/sysext/frontend/Classes/ContentObject/Menu/TextMenuContentObject.php:
00087: $this->I['val']['additionalParams'] = $this->WMcObj->stdWrap($this->I['val']['additionalParams'], $this->I['val']['additionalParams.']);
00088: }
00089: $this->I['linkHREF'] = $this->link($key, $this->I['val']['altTarget'], $this->mconf['forceTypeValue']);
00090: if (empty($this->I['linkHREF'])) {
00091: $this->I['val']['doNotLinkIt'] = 1;
12 TYPO3\CMS\Frontend\ContentObject\Menu\TextMenuContentObject::writeMenu()
/var/www/typo3.mySite.com/typo3_src-6.2.21/typo3/sysext/frontend/Classes/ContentObject/HierarchicalMenuContentObject.php:
00047: $menu->start($GLOBALS['TSFE']->tmpl, $GLOBALS['TSFE']->sys_page, '', $conf, 1);
00048: $menu->makeMenu();
00049: $theValue .= $menu->writeMenu();
00050: } catch (\TYPO3\CMS\Frontend\ContentObject\Menu\Exception\NoSuchMenuTypeException $e) {
00051: }
11 TYPO3\CMS\Frontend\ContentObject\HierarchicalMenuContentObject::render(array)
/var/www/typo3.mySite.com/typo3_src-6.2.21/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php:
00750: $contentObject = $this->getContentObject($name);
00751: if ($contentObject) {
00752: $content .= $contentObject->render($conf);
00753: } else {
00754: // Call hook functions for extra processing
10 TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::cObjGetSingle("HMENU", array, "10")
/var/www/typo3.mySite.com/typo3_src-6.2.21/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php:
00695: if ((int)$theKey && strpos($theKey, '.') === FALSE) {
00696: $conf = $setup[$theKey . '.'];
00697: $content .= $this->cObjGetSingle($theValue, $conf, $addKey . $theKey);
00698: }
00699: }
9 TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::cObjGet(array)
/var/www/typo3.mySite.com/typo3_src-6.2.21/typo3/sysext/frontend/Classes/ContentObject/ContentObjectArrayContentObject.php:
00038:
00039: $this->cObj->includeLibs($conf);
00040: $content = $this->cObj->cObjGet($conf);
00041: $wrap = isset($conf['wrap.']) ? $this->cObj->stdWrap($conf['wrap'], $conf['wrap.']) : $conf['wrap'];
00042: if ($wrap) {
8 TYPO3\CMS\Frontend\ContentObject\ContentObjectArrayContentObject::render(array)
/var/www/typo3.mySite.com/typo3_src-6.2.21/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php:
00750: $contentObject = $this->getContentObject($name);
00751: if ($contentObject) {
00752: $content .= $contentObject->render($conf);
00753: } else {
00754: // Call hook functions for extra processing
7 TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::cObjGetSingle("COA", array)
/var/www/typo3.mySite.com/typo3_src-6.2.21/typo3/sysext/frontend/Classes/ContentObject/FluidTemplateContentObject.php:
00223: $this->view->assign(
00224: $variableName,
00225: $this->cObj->cObjGetSingle($cObjType, $variables[$variableName . '.'])
00226: );
00227: } else {
6 TYPO3\CMS\Frontend\ContentObject\FluidTemplateContentObject::assignContentObjectVariables(array)
/var/www/typo3.mySite.com/typo3_src-6.2.21/typo3/sysext/frontend/Classes/ContentObject/FluidTemplateContentObject.php:
00073: $this->setExtbaseVariables($conf);
00074: $this->assignSettings($conf);
00075: $this->assignContentObjectVariables($conf);
00076: $this->assignContentObjectDataAndCurrent($conf);
00077:
5 TYPO3\CMS\Frontend\ContentObject\FluidTemplateContentObject::render(array)
/var/www/typo3.mySite.com/typo3_src-6.2.21/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php:
00750: $contentObject = $this->getContentObject($name);
00751: if ($contentObject) {
00752: $content .= $contentObject->render($conf);
00753: } else {
00754: // Call hook functions for extra processing
4 TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::cObjGetSingle("FLUIDTEMPLATE", array, "10")
/var/www/typo3.mySite.com/typo3_src-6.2.21/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php:
00695: if ((int)$theKey && strpos($theKey, '.') === FALSE) {
00696: $conf = $setup[$theKey . '.'];
00697: $content .= $this->cObjGetSingle($theValue, $conf, $addKey . $theKey);
00698: }
00699: }
3 TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::cObjGet(array)
/var/www/typo3.mySite.com/typo3_src-6.2.21/typo3/sysext/frontend/Classes/Page/PageGenerator.php:
00213: $GLOBALS['TT']->incStackPointer();
00214: $GLOBALS['TT']->push($GLOBALS['TSFE']->sPre, 'PAGE');
00215: $pageContent = $GLOBALS['TSFE']->cObj->cObjGet($GLOBALS['TSFE']->pSetup);
00216: if ($GLOBALS['TSFE']->pSetup['wrap']) {
00217: $pageContent = $GLOBALS['TSFE']->cObj->wrap($pageContent, $GLOBALS['TSFE']->pSetup['wrap']);
2 TYPO3\CMS\Frontend\Page\PageGenerator::renderContent()
/var/www/typo3.mySite.com/typo3_src-6.2.21/typo3/sysext/cms/tslib/index_ts.php:
00210: // Content generation
00211: if (!$TSFE->isINTincScript()) {
00212: \TYPO3\CMS\Frontend\Page\PageGenerator::renderContent();
00213: $TSFE->setAbsRefPrefix();
00214: }
1 require("/var/www/typo3.mySite.com/typo3_src-6.2.21/typo3/sysext/cms/tslib/index_ts.php")
/var/www/typo3.mySite.com/typo3_src-6.2.21/index.php:
00026: ->redirectToInstallerIfEssentialConfigurationDoesNotExist();
00027:
00028: require(PATH_tslib . 'index_ts.php');
`
Same happens when indexing in solr, see
StackTrace of error
1343589451: exception 'RuntimeException' with message 'Could not fetch page data for uid 2015.' in /var/www/typo3.mySite.com/typo3_src-6.2.21/typo3/sysext/core/Classes/Utility/RootlineUtility.php:243 Stack trace: #0 /var/www/typo3.mySite.com/typo3_src-6.2.21/typo3/sysext/core/Classes/Utility/RootlineUtility.php(351): TYPO3\CMS\Core\Utility\RootlineUtility->getRecordArray(2015) #1 /var/www/typo3.mySite.com/typo3_src-6.2.21/typo3/sysext/core/Classes/Utility/RootlineUtility.php(207): TYPO3\CMS\Core\Utility\RootlineUtility->generateRootlineCache() #2 /var/www/typo3.mySite.com/htdocs/typo3conf/ext/realurl/Classes/Encoder/UrlEncoder.php(423): TYPO3\CMS\Core\Utility\RootlineUtility->get() #3 /var/www/typo3.mySite.com/htdocs/typo3conf/ext/realurl/Classes/Encoder/UrlEncoder.php(366): DmitryDulepov\Realurl\Encoder\UrlEncoder->createPathComponentUsingRootline() #4 /var/www/typo3.mySite.com/htdocs/typo3conf/ext/realurl/Classes/Encoder/UrlEncoder.php(501): DmitryDulepov\Realurl\Encoder\UrlEncoder->createPathComponent() #5 /var/www/typo3.mySite.com/htdocs/typo3conf/ext/realurl/Classes/Encoder/UrlEncoder.php(764): DmitryDulepov\Realurl\Encoder\UrlEncoder->encodePathComponents() #6 /var/www/typo3.mySite.com/htdocs/typo3conf/ext/realurl/Classes/Encoder/UrlEncoder.php(105): DmitryDulepov\Realurl\Encoder\UrlEncoder->executeEncoder() #7 [internal function]: DmitryDulepov\Realurl\Encoder\UrlEncoder->encodeUrl(Array, Object(TYPO3\CMS\Core\TypoScript\TemplateService)) #8 /var/www/typo3.mySite.com/typo3_src-6.2.21/typo3/sysext/core/Classes/Utility/GeneralUtility.php(4315): call_user_func_array(Array, Array) #9 /var/www/typo3.mySite.com/typo3_src-6.2.21/typo3/sysext/core/Classes/TypoScript/TemplateService.php(1550): TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction('DmitryDulepov\\R...', Array, Object(TYPO3\CMS\Core\TypoScript\TemplateService)) #10 /var/www/typo3.mySite.com/typo3_src-6.2.21/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php(6136): TYPO3\CMS\Core\TypoScript\TemplateService->linkData(Array, '', NULL, '', '', '', NULL, '') #11 /var/www/typo3.mySite.com/typo3_src-6.2.21/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php(3120): TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer->typoLink('', Array) #12 /var/www/typo3.mySite.com/typo3_src-6.2.21/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php(2124): TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer->stdWrap_typolink('', Array) #13 /var/www/typo3.mySite.com/typo3_src-6.2.21/typo3/sysext/frontend/Classes/ContentObject/TextContentObject.php(44): TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer->stdWrap('', Array) #14 /var/www/typo3.mySite.com/typo3_src-6.2.21/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php(752): TYPO3\CMS\Frontend\ContentObject\TextContentObject->render(Array) #15 /var/www/typo3.mySite.com/htdocs/typo3conf/ext/solr/Classes/IndexQueue/AbstractIndexer.php(126): TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer->cObjGetSingle('TEXT', Array) #16 /var/www/typo3.mySite.com/htdocs/typo3conf/ext/solr/Classes/IndexQueue/AbstractIndexer.php(77): ApacheSolrForTypo3\Solr\IndexQueue\AbstractIndexer->resolveFieldValue(Array, 'url', Array) #17 /var/www/typo3.mySite.com/htdocs/typo3conf/ext/solr/Classes/IndexQueue/Indexer.php(295): ApacheSolrForTypo3\Solr\IndexQueue\AbstractIndexer->addDocumentFieldsFromTyposcript(Object(Apache_Solr_Document), Array, Array) #18 /var/www/typo3.mySite.com/htdocs/typo3conf/ext/solr/Classes/IndexQueue/Indexer.php(145): ApacheSolrForTypo3\Solr\IndexQueue\Indexer->itemToDocument(Object(ApacheSolrForTypo3\Solr\IndexQueue\Item), 0) #19 /var/www/typo3.mySite.com/htdocs/typo3conf/ext/solr/Classes/IndexQueue/Indexer.php(117): ApacheSolrForTypo3\Solr\IndexQueue\Indexer->indexItem(Object(ApacheSolrForTypo3\Solr\IndexQueue\Item), 0) #20 /var/www/typo3.mySite.com/htdocs/typo3conf/ext/solr/Classes/Task/IndexQueueWorkerTask.php(127): ApacheSolrForTypo3\Solr\IndexQueue\Indexer->index(Object(ApacheSolrForTypo3\Solr\IndexQueue\Item)) #21 /var/www/typo3.mySite.com/htdocs/typo3conf/ext/solr/Classes/Task/IndexQueueWorkerTask.php(89): ApacheSolrForTypo3\Solr\Task\IndexQueueWorkerTask->indexItem(Object(ApacheSolrForTypo3\Solr\IndexQueue\Item)) #22 /var/www/typo3.mySite.com/htdocs/typo3conf/ext/solr/Classes/Task/IndexQueueWorkerTask.php(68): ApacheSolrForTypo3\Solr\Task\IndexQueueWorkerTask->indexItems() #23 /var/www/typo3.mySite.com/typo3_src-6.2.21/typo3/sysext/scheduler/Classes/Scheduler.php(148): ApacheSolrForTypo3\Solr\Task\IndexQueueWorkerTask->execute() #24 /var/www/typo3.mySite.com/typo3_src-6.2.21/typo3/sysext/scheduler/Classes/Controller/SchedulerModuleController.php(873): TYPO3\CMS\Scheduler\Scheduler->executeTask(Object(ApacheSolrForTypo3\Solr\Task\IndexQueueWorkerTask)) #25 /var/www/typo3.mySite.com/typo3_src-6.2.21/typo3/sysext/scheduler/Classes/Controller/SchedulerModuleController.php(191): TYPO3\CMS\Scheduler\Controller\SchedulerModuleController->executeTasks() #26 /var/www/typo3.mySite.com/typo3_src-6.2.21/typo3/sysext/scheduler/Classes/Controller/SchedulerModuleController.php(137): TYPO3\CMS\Scheduler\Controller\SchedulerModuleController->getModuleContent() #27 /var/www/typo3.mySite.com/typo3_src-6.2.21/typo3/sysext/scheduler/mod1/index.php(22): TYPO3\CMS\Scheduler\Controller\SchedulerModuleController->main() #28 /var/www/typo3.mySite.com/typo3_src-6.2.21/typo3/mod.php(32): require('/var/www/typo3....') #29 {main}
The text was updated successfully, but these errors were encountered: