Project

General

Profile

Actions

Bug #80649

closed

Illegal string offset 'linkHandler.' - TYPO3 v 8.6.1

Added by Chris no-lastname-given about 7 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Link Handling, Site Handling & Routing
Target version:
-
Start date:
2017-04-03
Due date:
% Done:

0%

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

Description

Using the newly integrated linkhandler, a link to a news records throws the following error:

Core: Error handler (FE): PHP Warning: Illegal string offset 'linkHandler.' in /typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php line 6012

The link in the RTE looks like that:

<a href="t3://record?identifier=tx_news&amp;uid=11">Link</a>

The website does not show the link at all.

My page TSconfig:

TCEMAIN.linkHandler.tx_news {
handler = TYPO3\CMS\Recordlist\LinkHandler\RecordLinkHandler
label = News
configuration {
table = tx_news_domain_model_news
storagePid = 1
hidePageTree = 1
}
scanBefore = page
}

My TYPOscrip setup:

config.recordLinks.tx_news {
forceLink = 0
typolink {
parameter = 2
additionalParams.data = field:uid
additionalParams.wrap = &tx_news_pi1[news]=|&tx_news_pi1[controller]=News&tx_news_pi1[action]=detail
useCacheHash = 1
}
}

So this is more or less the config, which was provided with Feature #79626


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #80883: Illegal string offset 'TCEMAIN.' in typo3/sysext/frontend/Classes/Typolink/DatabaseRecordLinkBuilder.php line 34 Closed2017-04-19

Actions
Actions #1

Updated by Benni Mack about 7 years ago

  • Status changed from New to Needs Feedback

Can you check that with latest master?

Actions #2

Updated by Chris no-lastname-given about 7 years ago

Hm, the master branch gives me

Class 'TYPO3\CMS\Extbase\Service\TypoScriptService' not found

Error thrown in file
/Users/chris/Sites/_typo3/master/typo3/sysext/core/Classes/Utility/GeneralUtility.php in line 3892.
Actions #3

Updated by Chris no-lastname-given about 7 years ago

Sorry, the cache...

Now I get this errors:

Core: Error handler (FE): PHP Warning: Illegal string offset 'linkHandler.' in /Users/chris/Sites/_typo3/master/typo3/sysext/frontend/Classes/Typolink/DatabaseRecordLinkBuilder.php line 34
Core: Error handler (FE): PHP Warning: Illegal string offset 'TCEMAIN.' in /Users/chris/Sites/_typo3/master/typo3/sysext/frontend/Classes/Typolink/DatabaseRecordLinkBuilder.php line 34
Actions #4

Updated by Thomas Beck about 7 years ago

Hi
Same problem here on TYPO3 8.7

Link looks like

<p><a href="t3://record?identifier=tx_fsmediagallery&amp;uid=2">test</a></p>

But no link in front end and 0 error in logs

Thanks for your help !

Actions #5

Updated by Paul Golmann about 7 years ago

Hello!

I got the same error when starting with clean caches (before the first backend login). I think the DatabaseRecordLinkBuilder does falsely assume on line 34 that $tsfe->pagesTSconfig is loaded when it might not be. It should use the getter $tsfe->getPagesTSconfig() instead.

Greetings
Paul

Actions #6

Updated by Azeef no-lastname-given about 7 years ago

  • Category set to Link Handling, Site Handling & Routing
  • Priority changed from Should have to Must have

I too confirm the issue in 8.7.0 LTS version. The reason for the issues is as stated by Paul Golmann, i got this working after using the getter... in typo3/sysext/frontend/Classes/Typolink/DatabaseRecordLinkBuilder.php

 - $linkHandlerConfiguration = $tsfe->pagesTSconfig['TCEMAIN.']['linkHandler.'];  line 34

 + $PageTSconfig = $tsfe->getPagesTSconfig(); line 34
 + $linkHandlerConfiguration = $PageTSconfig['TCEMAIN.']['linkHandler.']; line 35
Actions #7

Updated by Azeef no-lastname-given about 7 years ago

  • Related to Bug #80883: Illegal string offset 'TCEMAIN.' in typo3/sysext/frontend/Classes/Typolink/DatabaseRecordLinkBuilder.php line 34 added
Actions #8

Updated by Chris no-lastname-given almost 7 years ago

I think this issue was resolved with #80883.

So this ticket can be closed.

Actions #9

Updated by Wouter Wolters almost 7 years ago

  • Status changed from Needs Feedback to Closed

Thanks for the pointer. Your answer is true, this has been solved.

Actions

Also available in: Atom PDF