lochmueller / calendarize

📆 Best TYPO3 Calendar ever 📆
http://typo3.org/extensions/repository/view/calendarize
74 stars 84 forks source link

linkhandler claims to be defaultDetailPid not set, although it is set #786

Closed bavarianbytes closed 8 months ago

bavarianbytes commented 8 months ago

Exception in backend page module if a page content contains a link to an event.

calendarize 12.4.4

(1/1) Exception
You have to configure calendarize:defaultDetailPid to use the linkhandler function

in /Users/***/asc/typo3conf/ext/calendarize/Classes/Typolink/DatabaseRecordLinkBuilder.php line 29
        if (isset($linkDetails['identifier']) && \in_array($linkDetails['identifier'], $this->getEventTables(), true)) {
            $eventId = $linkDetails['uid'];
            $defaultPid = (int)($GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_calendarize.']['settings.']['defaultDetailPid'] ?? 0);
            if ($defaultPid <= 0) {
                throw new \Exception('You have to configure calendarize:defaultDetailPid to use the linkhandler function');
            }

            $indexUid = $this->getIndexForEventUid($linkDetails['identifier'], $eventId);

$GLOBALS['TSFE'] seems to be NULL (line 27 in DatabaseRecordLinkBuilder)

lochmueller commented 8 months ago

Hey @bavarianbytes ,

this issue is already fixed in current main branch: https://github.com/lochmueller/calendarize/blob/master/Classes/Typolink/DatabaseRecordLinkBuilder.php#L26 I would close this issue. I think we will release a first v12 shortly... Regards, Tim