Der komplette Stacktrace ist voller HTML-Bestandteile und ewig lang, ich zeige dir mal die beiden Logs mit Stacktrace. Reicht dir das so?
Es werden 2 Fehler angezeigt:
PHP-Code:
[?
"exception" => TypeError {#5197 ?}
]
{?
/www/htdocs/…/vendor/metamodels/core/src/CoreBundle/EventListener/InsertTagsListener.php:340 {?
MetaModels\CoreBundle\EventListener\InsertTagsListener->getAttribute(string|int $metaModelIdOrName, int $intDataId, string|int $viewId, string|int $attributeIdentifier, ?string $outputFormat): string|bool …
›
› return $arrAttr[$outputFormat];
› }
}
/www/htdocs/…/vendor/metamodels/core/src/CoreBundle/EventListener/InsertTagsListener.php:150 {?
MetaModels\CoreBundle\EventListener\InsertTagsListener->__invoke(string $insertTag): string|int|bool …
› return $this->checkMinExpectElements(6, $elements)
› ? $this->getAttribute($elements[2], $elements[3], $elements[4], $elements[5], ($elements[6] ?? null))
› : false;
arguments: {?
$metaModelIdOrName: "mm_events"
$intDataId: 128
$viewId: "25"
$attributeIdentifier: "enddate"
$outputFormat: "raw"
}
}
/www/htdocs/…/vendor/contao/core-bundle/src/Resources/contao/library/Contao/InsertTags.php:1171 {?
Contao\InsertTags->executeReplace(string $strBuffer, bool $blnCache) …
› $this->import($callback[0]);
› $varValue = $this->{$callback[0]}->{$callback[1]}($tag, $blnCache, $arrCache[$strTag], $flags, $tags, $arrCache, $_rit, $_cnt); // see #6672
›
arguments: {?
$insertTag: "mm::attribute::mm_events::128::25::enddate::raw"
...: {?}
}
}
/www/htdocs/…/vendor/contao/core-bundle/src/Resources/contao/library/Contao/InsertTags.php:100 {?}
/www/htdocs/…/vendor/contao/core-bundle/src/InsertTag/InsertTagParser.php:77 {?}
/www/htdocs/…/vendor/contao/core-bundle/src/InsertTag/InsertTagParser.php:37 {?}
/www/htdocs/…/vendor/contao/core-bundle/src/InsertTag/InsertTagParser.php:32 {?}
/www/htdocs/…/vendor/contao/core-bundle/src/Resources/contao/library/Contao/Controller.php:849 {?}
/www/htdocs/…/templates/lag/anmeldung/get_veranstaltungsdatum.inc.php:5 {?}
/www/htdocs/…/vendor/contao/core-bundle/src/Resources/contao/library/Contao/InsertTags.php:1151 {?}
/www/htdocs/…/vendor/contao/core-bundle/src/Resources/contao/library/Contao/InsertTags.php:100 {?}
/www/htdocs/…/vendor/contao/core-bundle/src/InsertTag/InsertTagParser.php:77 {?}
/www/htdocs/…/vendor/contao/core-bundle/src/InsertTag/InsertTagParser.php:37 {?}
/www/htdocs/…/vendor/contao/core-bundle/src/InsertTag/InsertTagParser.php:32 {?}
/www/htdocs/…/vendor/contao/core-bundle/src/Resources/contao/classes/FrontendTemplate.php:128 {?}
/www/htdocs/…/vendor/contao/core-bundle/src/Resources/contao/library/Contao/Template.php:322 {?}
/www/htdocs/…/vendor/contao/core-bundle/src/Resources/contao/classes/FrontendTemplate.php:85 {?}
/www/htdocs/…/vendor/contao/core-bundle/src/Resources/contao/pages/PageRegular.php:62 {?}
/www/htdocs/…/vendor/contao/core-bundle/src/Resources/contao/controllers/FrontendIndex.php:320 {?}
/www/htdocs/…/vendor/symfony/http-kernel/HttpKernel.php:163 {?}
/www/htdocs/…/vendor/symfony/http-kernel/HttpKernel.php:75 {?}
/www/htdocs/…/vendor/symfony/http-kernel/Kernel.php:202 {?}
/www/htdocs/…/web/index.php:44 {?}
}
PHP-Code:
{?
/www/htdocs/…/vendor/metamodels/core/src/CoreBundle/EventListener/InsertTagsListener.php:340 {?
MetaModels\CoreBundle\EventListener\InsertTagsListener->getAttribute(string|int $metaModelIdOrName, int $intDataId, string|int $viewId, string|int $attributeIdentifier, ?string $outputFormat): string|bool …
›
› return $arrAttr[$outputFormat];
› }
}
/www/htdocs/…/vendor/metamodels/core/src/CoreBundle/EventListener/InsertTagsListener.php:150 {?
MetaModels\CoreBundle\EventListener\InsertTagsListener->__invoke(string $insertTag): string|int|bool …
› return $this->checkMinExpectElements(6, $elements)
› ? $this->getAttribute($elements[2], $elements[3], $elements[4], $elements[5], ($elements[6] ?? null))
› : false;
arguments: {?
$metaModelIdOrName: "mm_events"
$intDataId: 128
$viewId: "25"
$attributeIdentifier: "enddate"
$outputFormat: "raw"
}
}
/www/htdocs/…/vendor/contao/core-bundle/src/Resources/contao/library/Contao/InsertTags.php:1171 {?
Contao\InsertTags->executeReplace(string $strBuffer, bool $blnCache) …
› $this->import($callback[0]);
› $varValue = $this->{$callback[0]}->{$callback[1]}($tag, $blnCache, $arrCache[$strTag], $flags, $tags, $arrCache, $_rit, $_cnt); // see #6672
›
arguments: {?
$insertTag: "mm::attribute::mm_events::128::25::enddate::raw"
...: {?}
}
}
/www/htdocs/…/vendor/contao/core-bundle/src/Resources/contao/library/Contao/InsertTags.php:100 {?}
/www/htdocs/…/vendor/contao/core-bundle/src/InsertTag/InsertTagParser.php:77 {?}
/www/htdocs/…/vendor/contao/core-bundle/src/InsertTag/InsertTagParser.php:37 {?}
/www/htdocs/…/vendor/contao/core-bundle/src/InsertTag/InsertTagParser.php:32 {?}
/www/htdocs/…/vendor/contao/core-bundle/src/Resources/contao/library/Contao/Controller.php:849 {?}
/www/htdocs/…/templates/lag/anmeldung/get_veranstaltungsdatum.inc.php:5 {?}
/www/htdocs/…/vendor/contao/core-bundle/src/Resources/contao/library/Contao/InsertTags.php:1151 {?}
/www/htdocs/…/vendor/contao/core-bundle/src/Resources/contao/library/Contao/InsertTags.php:100 {?}
/www/htdocs/…/vendor/contao/core-bundle/src/InsertTag/InsertTagParser.php:77 {?}
/www/htdocs/…/vendor/contao/core-bundle/src/InsertTag/InsertTagParser.php:37 {?}
/www/htdocs/…/vendor/contao/core-bundle/src/InsertTag/InsertTagParser.php:32 {?}
/www/htdocs/…/vendor/contao/core-bundle/src/Resources/contao/classes/FrontendTemplate.php:128 {?}
/www/htdocs/…/vendor/contao/core-bundle/src/Resources/contao/library/Contao/Template.php:322 {?}
/www/htdocs/…/vendor/contao/core-bundle/src/Resources/contao/classes/FrontendTemplate.php:85 {?}
/www/htdocs/…/vendor/contao/core-bundle/src/Resources/contao/pages/PageRegular.php:62 {?}
/www/htdocs/…/vendor/contao/core-bundle/src/Resources/contao/controllers/FrontendIndex.php:320 {?}
/www/htdocs/…/vendor/symfony/http-kernel/HttpKernel.php:163 {?}
/www/htdocs/…/vendor/symfony/http-kernel/HttpKernel.php:75 {?}
/www/htdocs/…/vendor/symfony/http-kernel/Kernel.php:202 {?}
/www/htdocs/…/web/index.php:44 {?}
}
Die Datei get_veranstaltungsdatum.inc.php sieht aus wie folgt. Das Startdatum funktioniert wunderbar, das Enddatum ist optional und in diesem Fall eben leer.
PHP-Code:
<?php
$veranstaltung = intval(\Input::get('veranstaltung'));
if ($veranstaltung > 0) {
$start = $this->replaceInsertTags('{{mm::attribute::mm_events::'.$veranstaltung.'::24::startdate::raw}}');
$ende = $this->replaceInsertTags('{{mm::attribute::mm_events::'.$veranstaltung.'::25::enddate::raw}}');
if (!$ende) {
$myDatum = date('j.n.y', $start);
} else if (date('m', $start) == date('m', $ende)) {
$myDatum = date('j.', $start).' – '.date('j.n.y', $ende);
} else {
$myDatum = date('j.n.', $start).' – '.date('j.n.y', $ende);
}
echo $myDatum;
}
else echo "–";
?>
Lesezeichen