Hallo Communityy,
ich versuche gerade meine Events zu erweitern. Dazu möchte eine weitere Checkbox nach dem Enddatum einfügen. Ich erhalte aber im Contao Manager immer folgende Fehlermeldung:
Code:
$ /usr/bin/php7.4 -q -dmax_execution_time=0 -dmemory_limit=-1 -dallow_url_fopen=1 -ddisable_functions= -ddate.timezone=Europe/Berlin /www/website2020/vendor/contao/manager-bundle/bin/contao-console cache:warmup --env=prod
// Warming up the cache for the prod environment with debug
// false
11:22:23 CRITICAL [console] Error thrown while running command "cache:warmup --env=prod". Message: "Palette "default" not found in table "tl_calendar_events"" ["exception" => Contao\CoreBundle\DataContainer\PaletteNotFoundException { …},"command" => "cache:warmup --env=prod","message" => "Palette "default" not found in table "tl_calendar_events""]
In PaletteManipulator.php line 113:
Palette "default" not found in table "tl_calendar_events"
cache:warmup [--no-optional-warmers] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--] <command>
# Process terminated with exit code 1
# Result: General error
Meine Plugin.php
PHP-Code:
<?php
namespace Neckarpixel\NpeventsBundle\ContaoManager;
use Contao\CoreBundle\ContaoCoreBundle;
use Contao\CalenderBundle\ContaoCalendarBundle;
use Contao\ManagerPlugin\Bundle\BundlePluginInterface;
use Contao\ManagerPlugin\Bundle\Config\BundleConfig;
use Contao\ManagerPlugin\Bundle\Parser\ParserInterface;
use Neckarpixel\NpeventsBundle\NeckarpixelNpeventsBundle;
class Plugin implements BundlePluginInterface
{
/**
* {@inheritdoc}
*/
public function getBundles(ParserInterface $parser)
{
return [
BundleConfig::create(NeckarpixelNpeventsBundle::class)
->setLoadAfter([ContaoCoreBundle::class,ContaoCalendarBundle::class]),
];
}
}
Resources/contao/dca/tl_calendar_events.php
PHP-Code:
<?php
use Contao\CoreBundle\ContaoCoreBundle;
use Contao\CalendarBundle\ContaoCalendarBundle;
use Contao\CoreBundle\DataContainer\PaletteManipulator;
/**
* Palettes
*/
/**
* Extend tl_article palettes
*/
PaletteManipulator::create()
->addField('stage','endDate',PaletteManipulator::POSITION_AFTER)
->applyToPalette('default', 'tl_calendar_events');
/**
* Fields
*/
// CONTAINER MODE
$GLOBALS['TL_DCA']['tl_article']['fields']['stage'] = array(
'label' => $GLOBALS['TL_LANG']['tl_calendar_events']['stage'],
'exclude' => true,
'inputType' => 'checkbox',
'eval' => ['tl_class'=>'w50'],
'sql' => ['type' => 'char', 'length' => 1, 'default' => ''],
);
Hat jemand eine Idee, was ich falsch mache?
Lesezeichen