spicywebau / craft-neo

A Matrix-like field type for Craft CMS that uses existing fields
Other
403 stars 64 forks source link

Class "craft\commerce\elements\Product" not found #913

Closed alexanderbuergin closed 1 month ago

alexanderbuergin commented 1 month ago

Bug Description

Error after removing Commerce: Class "craft\commerce\elements\Product" not found

It seems the Craft Neo plugin is still trying to reference the Commerce product class. How can we resolve this issue?

Any guidance on resolving this issue would be greatly appreciated.

We recently removed the Craft Commerce plugin from our project, and now we are encountering the following error.

Expected Result:

Neo field settings should be accessible without errors.

Steps to reproduce

  1. Remove the Commerce plugin from the Craft project.
  2. Attempt to access the Neo field settings.

Expected behaviour

Error: Class "craft\commerce\elements\Product" not found in /home/wiqusaha/public_html/xxxx/vendor/spicyweb/craft-neo/src/services/BlockTypes.php:1143
Stack trace:
#0 /home/wiqusaha/public_html/xxxx/vendor/spicyweb/craft-neo/src/services/BlockTypes.php(782): benf\neo\services\BlockTypes->_getConditions(NULL)
#1 /home/wiqusaha/public_html/xxxx/vendor/spicyweb/craft-neo/src/web/assets/configurator/ConfiguratorAsset.php(106): benf\neo\services\BlockTypes->renderSettings()
#2 /home/wiqusaha/public_html/xxxx/vendor/spicyweb/craft-neo/src/Field.php(554): benf\neo\web\assets\configurator\ConfiguratorAsset::createSettingsJs(Object(benf\neo\Field))
#3 /home/wiqusaha/public_html/xxxx/vendor/twig/twig/src/Extension/CoreExtension.php(1635): benf\neo\Field->getSettingsHtml()
#4 /home/wiqusaha/public_html/xxxx/vendor/craftcms/cms/src/helpers/Template.php(148): twig_get_attribute(Object(craft\web\twig\Environment), Object(Twig\Source), Object(benf\neo\Field), 'getSettingsHtml', Array, 'method', false, false, false, 2)
#5 /home/wiqusaha/public_html/xxxx/storage/runtime/compiled_templates/04/044fe994a8de3f4319fe705303a557f1.php(46): craft\helpers\Template::attribute(Object(craft\web\twig\Environment), Object(Twig\Source), Object(benf\neo\Field), 'getSettingsHtml', Array, 'method', false, false, false, 2)
#6 /home/wiqusaha/public_html/xxxx/vendor/twig/twig/src/Template.php(394): __TwigTemplate_55fbf4d2ed5c38f3a7cf3137b1fbdc55->doDisplay(Array, Array)
#7 /home/wiqusaha/public_html/xxxx/vendor/twig/twig/src/Template.php(367): Twig\Template->displayWithErrorHandling(Array, Array)
#8 /home/wiqusaha/public_html/xxxx/storage/runtime/compiled_templates/bd/bdc61a8e33ca82ce7964fdc7bfac1215.php(156): Twig\Template->display(Array)
#9 /home/wiqusaha/public_html/xxxx/vendor/twig/twig/src/Template.php(394): __TwigTemplate_5d702bcd1d2da5d01ea457050d002473->doDisplay(Array, Array)
#10 /home/wiqusaha/public_html/xxxx/vendor/twig/twig/src/Template.php(367): Twig\Template->displayWithErrorHandling(Array, Array)
#11 /home/wiqusaha/public_html/xxxx/vendor/twig/twig/src/Template.php(379): Twig\Template->display(Array)
#12 /home/wiqusaha/public_html/xxxx/vendor/twig/twig/src/TemplateWrapper.php(38): Twig\Template->render(Array)
#13 /home/wiqusaha/public_html/xxxx/vendor/twig/twig/src/Environment.php(280): Twig\TemplateWrapper->render(Array)
#14 /home/wiqusaha/public_html/xxxx/vendor/craftcms/cms/src/web/View.php(494): Twig\Environment->render('settings/fields...', Array)
#15 /home/wiqusaha/public_html/xxxx/vendor/craftcms/cms/src/web/CpScreenResponseBehavior.php(622): craft\web\View->renderTemplate('settings/fields...', Array, 'cp')
#16 [internal function]: craft\web\CpScreenResponseBehavior->craft\web\{closure}()
#17 /home/wiqusaha/public_html/xxxx/vendor/craftcms/cms/src/web/CpScreenResponseFormatter.php(133): call_user_func(Object(Closure))
#18 /home/wiqusaha/public_html/xxxx/vendor/craftcms/cms/src/web/CpScreenResponseFormatter.php(50): craft\web\CpScreenResponseFormatter->_formatTemplate(Object(craft\web\Response), Object(craft\web\CpScreenResponseBehavior))
#19 /home/wiqusaha/public_html/xxxx/vendor/yiisoft/yii2/web/Response.php(1109): craft\web\CpScreenResponseFormatter->format(Object(craft\web\Response))
#20 /home/wiqusaha/public_html/xxxx/vendor/craftcms/cms/src/web/Response.php(338): yii\web\Response->prepare()
#21 /home/wiqusaha/public_html/xxxx/vendor/yiisoft/yii2/web/Response.php(340): craft\web\Response->prepare()
#22 /home/wiqusaha/public_html/xxxx/vendor/yiisoft/yii2/base/Application.php(390): yii\web\Response->send()
#23 /home/wiqusaha/public_html/xxxx/web/index.php(23): yii\base\Application->run()
#24 {main}
Copy StacktraceSearch StackoverflowSearch GoogleException
Error
Class "craft\commerce\elements\Product" not found
1. in /home/wiqusaha/public_html/xxxx/vendor/spicyweb/craft-neo/src/services/BlockTypes.phpat line 1143
1134113511361137113811391140114111421143114411451146114711481149115011511152        }

        $conditionsService = Craft::$app->getConditions();
        $conditionHtml = [];
        Neo::$isGeneratingConditionHtml = true;

        foreach ($this->_conditionElementTypes as $elementType) {
            $condition = !empty($blockType?->conditions) && isset($blockType->conditions[$elementType])
                ? $conditionsService->createCondition($blockType->conditions[$elementType])
                : $elementType::createCondition();
            $condition->mainTag = 'div';
            $condition->id = 'conditions-' . StringHelper::toKebabCase($elementType);
            $condition->name = "conditions[$elementType]";
            $condition->forProjectConfig = true;

            $conditionHtml[$elementType] = Cp::fieldHtml($condition->getBuilderHtml(), [
                'label' => Craft::t('neo', '{type} Condition', [
                    'type' => StringHelper::mb_ucwords($elementType::displayName()),
                ]),
2. in /home/wiqusaha/public_html/xxxx/vendor/spicyweb/craft-neo/src/services/BlockTypes.php at line 782– benf\neo\services\BlockTypes::_getConditions(null)
776777778779780781782783784785786787788        $newNamespace = ($baseNamespace ?? $oldNamespace) . "[items][blockTypes][$blockTypeId]";
        $view->setNamespace($newNamespace);
        $view->startJsBuffer();

        $template = $view->namespaceInputs($view->renderTemplate('neo/block-type-settings', [
            'blockType' => $blockType,
            'conditions' => $this->_getConditions($blockType),
            'neoField' => $blockType?->getField(),
        ]));

        $js = $view->clearJsBuffer();
        $view->setNamespace($oldNamespace);

3. in /home/wiqusaha/public_html/xxxx/vendor/spicyweb/craft-neo/src/web/assets/configurator/ConfiguratorAsset.php at line 106– benf\neo\services\BlockTypes::renderSettings()
100101102103104105106107108109110111112     * @return string
     */
    public static function createSettingsJs(Field $field): string
    {
        $blockTypes = $field->getBlockTypes();
        $blockTypeGroups = $field->getGroups();
        $settings = Neo::$plugin->blockTypes->renderSettings();
        $fieldLayoutHtml = Neo::$plugin->blockTypes->renderFieldLayoutDesigner(new FieldLayout(['type' => Block::class]));

        $jsSettings = [
            'namespace' => Craft::$app->getView()->getNamespace(),
            'blockTypes' => self::_getBlockTypesJsSettings($blockTypes),
            'groups' => self::_getBlockTypeGroupsJsSettings($blockTypeGroups),
4. in /home/wiqusaha/public_html/xxxx/vendor/spicyweb/craft-neo/src/Field.php at line 554– benf\neo\web\assets\configurator\ConfiguratorAsset::createSettingsJs(benf\neo\Field)
548549550551552553554555556557558559560        // Disable creating Neo fields inside Matrix, Super Table and potentially other field-grouping field types.
        if ($this->_getNamespaceDepth() >= 1) {
            $html = $this->_getNestingErrorHtml();
        } else {
            $viewService->registerAssetBundle(ConfiguratorAsset::class);
            $viewService->registerAssetBundle(ConverterAsset::class);
            $viewService->registerJs(ConfiguratorAsset::createSettingsJs($this));

            $html = $viewService->renderTemplate('neo/settings', [
                'neoField' => $this,
                'items' => $this->getItems(),
            ]);
        }
5. in /home/wiqusaha/public_html/xxxx/vendor/twig/twig/src/Extension/CoreExtension.php at line 1635– benf\neo\Field::getSettingsHtml()
6. in /home/wiqusaha/public_html/xxxx/vendor/craftcms/cms/src/helpers/Template.php at line 148– twig_get_attribute(craft\web\twig\Environment, Twig\Source, benf\neo\Field, 'getSettingsHtml', ...)
142143144145146147148149150151152153154            if (is_object($value) && get_class($value) === Markup::class) {
                $arguments[$key] = (string)$value;
            }
        }

        try {
            return twig_get_attribute(
                $env,
                $source,
                $object,
                $item,
                $arguments,
                $type,
7. in /home/wiqusaha/public_html/xxxx/vendor/craftcms/cms/src/templates/settings/fields/_type-settings.twig at line 2– craft\helpers\Template::attribute(craft\web\twig\Environment, Twig\Source, benf\neo\Field, 'getSettingsHtml', ...)
123{% namespace namespace ?? null %}
    {{ field.getSettingsHtml()|raw }}
{% endnamespace %}
8. in /home/wiqusaha/public_html/xxxx/vendor/twig/twig/src/Template.php at line 394– __TwigTemplate_55fbf4d2ed5c38f3a7cf3137b1fbdc55::doDisplay(['fieldId' => 80, 'field' => benf\neo\Field, 'fieldTypeOptions' => [['icon' => 'map-location', 'value' => 'craft\fields\Addresses', 'labelHtml' => '<div class="inline-flex"><span>A...'], ['icon' => 'ballot-check', 'value' => 'craft\fields\Dropdown', 'labelHtml' => '<div class="inline-flex"><span>A...'], ['icon' => 'user-group', 'value' => 'craft\fields\Users', 'labelHtml' => '<div class="inline-flex"><span>B...'], ['icon' => '@craft/ckeditor/icon.svg', 'value' => 'craft\ckeditor\Field', 'labelHtml' => '<div class="inline-flex"><span>C...'], ...], 'missingFieldPlaceholder' => null, ...], [])
9. in /home/wiqusaha/public_html/xxxx/vendor/twig/twig/src/Template.php at line 367– Twig\Template::displayWithErrorHandling(['fieldId' => 80, 'field' => benf\neo\Field, 'fieldTypeOptions' => [['icon' => 'map-location', 'value' => 'craft\fields\Addresses', 'labelHtml' => '<div class="inline-flex"><span>A...'], ['icon' => 'ballot-check', 'value' => 'craft\fields\Dropdown', 'labelHtml' => '<div class="inline-flex"><span>A...'], ['icon' => 'user-group', 'value' => 'craft\fields\Users', 'labelHtml' => '<div class="inline-flex"><span>B...'], ['icon' => '@craft/ckeditor/icon.svg', 'value' => 'craft\ckeditor\Field', 'labelHtml' => '<div class="inline-flex"><span>C...'], ...], 'missingFieldPlaceholder' => null, ...], [])
10. in /home/wiqusaha/public_html/xxxx/vendor/craftcms/cms/src/templates/settings/fields/_edit.twig at line 117– Twig\Template::display(['fieldId' => 80, 'field' => benf\neo\Field, 'fieldTypeOptions' => [['icon' => 'map-location', 'value' => 'craft\fields\Addresses', 'labelHtml' => '<div class="inline-flex"><span>A...'], ['icon' => 'ballot-check', 'value' => 'craft\fields\Dropdown', 'labelHtml' => '<div class="inline-flex"><span>A...'], ['icon' => 'user-group', 'value' => 'craft\fields\Users', 'labelHtml' => '<div class="inline-flex"><span>B...'], ['icon' => '@craft/ckeditor/icon.svg', 'value' => 'craft\ckeditor\Field', 'labelHtml' => '<div class="inline-flex"><span>C...'], ...], 'missingFieldPlaceholder' => null, ...])
111112113114115116117118119120121122123{% endif %}

<hr>

<div id="settings">
  <div id="{{ className(field)|id }}">
    {% include 'settings/fields/_type-settings' with {
      namespace: 'types['~className(field)|id~']'
    } %}
  </div>
</div>

11. in /home/wiqusaha/public_html/xxxx/vendor/twig/twig/src/Template.php at line 394– __TwigTemplate_5d702bcd1d2da5d01ea457050d002473::doDisplay(['fieldId' => 80, 'field' => benf\neo\Field, 'fieldTypeOptions' => [['icon' => 'map-location', 'value' => 'craft\fields\Addresses', 'labelHtml' => '<div class="inline-flex"><span>A...'], ['icon' => 'ballot-check', 'value' => 'craft\fields\Dropdown', 'labelHtml' => '<div class="inline-flex"><span>A...'], ['icon' => 'user-group', 'value' => 'craft\fields\Users', 'labelHtml' => '<div class="inline-flex"><span>B...'], ['icon' => '@craft/ckeditor/icon.svg', 'value' => 'craft\ckeditor\Field', 'labelHtml' => '<div class="inline-flex"><span>C...'], ...], 'missingFieldPlaceholder' => null, ...], [])
12. in /home/wiqusaha/public_html/xxxx/vendor/twig/twig/src/Template.php at line 367– Twig\Template::displayWithErrorHandling(['fieldId' => 80, 'field' => benf\neo\Field, 'fieldTypeOptions' => [['icon' => 'map-location', 'value' => 'craft\fields\Addresses', 'labelHtml' => '<div class="inline-flex"><span>A...'], ['icon' => 'ballot-check', 'value' => 'craft\fields\Dropdown', 'labelHtml' => '<div class="inline-flex"><span>A...'], ['icon' => 'user-group', 'value' => 'craft\fields\Users', 'labelHtml' => '<div class="inline-flex"><span>B...'], ['icon' => '@craft/ckeditor/icon.svg', 'value' => 'craft\ckeditor\Field', 'labelHtml' => '<div class="inline-flex"><span>C...'], ...], 'missingFieldPlaceholder' => null, ...], [])
13. in /home/wiqusaha/public_html/xxxx/vendor/twig/twig/src/Template.php at line 379– Twig\Template::display(['fieldId' => 80, 'field' => benf\neo\Field, 'fieldTypeOptions' => [['icon' => 'map-location', 'value' => 'craft\fields\Addresses', 'labelHtml' => '<div class="inline-flex"><span>A...'], ['icon' => 'ballot-check', 'value' => 'craft\fields\Dropdown', 'labelHtml' => '<div class="inline-flex"><span>A...'], ['icon' => 'user-group', 'value' => 'craft\fields\Users', 'labelHtml' => '<div class="inline-flex"><span>B...'], ['icon' => '@craft/ckeditor/icon.svg', 'value' => 'craft\ckeditor\Field', 'labelHtml' => '<div class="inline-flex"><span>C...'], ...], 'missingFieldPlaceholder' => null, ...])
14. in /home/wiqusaha/public_html/xxxx/vendor/twig/twig/src/TemplateWrapper.php at line 38– Twig\Template::render(['fieldId' => 80, 'field' => benf\neo\Field, 'fieldTypeOptions' => [['icon' => 'map-location', 'value' => 'craft\fields\Addresses', 'labelHtml' => '<div class="inline-flex"><span>A...'], ['icon' => 'ballot-check', 'value' => 'craft\fields\Dropdown', 'labelHtml' => '<div class="inline-flex"><span>A...'], ['icon' => 'user-group', 'value' => 'craft\fields\Users', 'labelHtml' => '<div class="inline-flex"><span>B...'], ['icon' => '@craft/ckeditor/icon.svg', 'value' => 'craft\ckeditor\Field', 'labelHtml' => '<div class="inline-flex"><span>C...'], ...], 'missingFieldPlaceholder' => null, ...])
15. in /home/wiqusaha/public_html/xxxx/vendor/twig/twig/src/Environment.php at line 280– Twig\TemplateWrapper::render(['fieldId' => 80, 'field' => benf\neo\Field, 'fieldTypeOptions' => [['icon' => 'map-location', 'value' => 'craft\fields\Addresses', 'labelHtml' => '<div class="inline-flex"><span>A...'], ['icon' => 'ballot-check', 'value' => 'craft\fields\Dropdown', 'labelHtml' => '<div class="inline-flex"><span>A...'], ['icon' => 'user-group', 'value' => 'craft\fields\Users', 'labelHtml' => '<div class="inline-flex"><span>B...'], ['icon' => '@craft/ckeditor/icon.svg', 'value' => 'craft\ckeditor\Field', 'labelHtml' => '<div class="inline-flex"><span>C...'], ...], 'missingFieldPlaceholder' => null, ...])
16. in /home/wiqusaha/public_html/xxxx/vendor/craftcms/cms/src/web/View.php at line 494– Twig\Environment::render('settings/fields/_edit.twig', ['fieldId' => 80, 'field' => benf\neo\Field, 'fieldTypeOptions' => [['icon' => 'map-location', 'value' => 'craft\fields\Addresses', 'labelHtml' => '<div class="inline-flex"><span>A...'], ['icon' => 'ballot-check', 'value' => 'craft\fields\Dropdown', 'labelHtml' => '<div class="inline-flex"><span>A...'], ['icon' => 'user-group', 'value' => 'craft\fields\Users', 'labelHtml' => '<div class="inline-flex"><span>B...'], ['icon' => '@craft/ckeditor/icon.svg', 'value' => 'craft\ckeditor\Field', 'labelHtml' => '<div class="inline-flex"><span>C...'], ...], 'missingFieldPlaceholder' => null, ...])
488489490491492493494495496497498499500 
        // Render and return
        $renderingTemplate = $this->_renderingTemplate;
        $this->_renderingTemplate = $template;

        try {
            $output = $this->getTwig()->render($template, $variables);
        } finally {
            $this->_renderingTemplate = $renderingTemplate;
            $this->setTemplateMode($oldTemplateMode);
        }

        $this->afterRenderTemplate($template, $variables, $templateMode, $output);
17. in /home/wiqusaha/public_html/xxxx/vendor/craftcms/cms/src/web/CpScreenResponseBehavior.php at line 622– craft\web\View::renderTemplate('settings/fields/_edit.twig', ['fieldId' => 80, 'field' => benf\neo\Field, 'fieldTypeOptions' => [['icon' => 'map-location', 'value' => 'craft\fields\Addresses', 'labelHtml' => '<div class="inline-flex"><span>A...'], ['icon' => 'ballot-check', 'value' => 'craft\fields\Dropdown', 'labelHtml' => '<div class="inline-flex"><span>A...'], ['icon' => 'user-group', 'value' => 'craft\fields\Users', 'labelHtml' => '<div class="inline-flex"><span>B...'], ['icon' => '@craft/ckeditor/icon.svg', 'value' => 'craft\ckeditor\Field', 'labelHtml' => '<div class="inline-flex"><span>C...'], ...], 'missingFieldPlaceholder' => null, ...], 'cp')
616617618619620621622623624625626627628     * @param array $variables
     * @return Response
     */
    public function contentTemplate(string $template, array $variables = []): Response
    {
        return $this->contentHtml(
            fn() => Craft::$app->getView()->renderTemplate($template, $variables, View::TEMPLATE_MODE_CP)
        );
    }

    /**
     * Sets the right-hand meta sidebar HTML.
     *
18. craft\web\CpScreenResponseBehavior::craft\web\{closure}()
19. in /home/wiqusaha/public_html/xxxx/vendor/craftcms/cms/src/web/CpScreenResponseFormatter.php at line 133– call_user_func(Closure)
127128129130131132133134135136137138139 
        $docTitle = $behavior->docTitle ?? strip_tags($behavior->title ?? '');
        $crumbs = (is_callable($behavior->crumbs) ? call_user_func($behavior->crumbs) : $behavior->crumbs) ?? [];
        $addlButtons = is_callable($behavior->additionalButtonsHtml) ? call_user_func($behavior->additionalButtonsHtml) : $behavior->additionalButtonsHtml;
        $altActions = is_callable($behavior->altActions) ? call_user_func($behavior->altActions) : $behavior->altActions;
        $notice = is_callable($behavior->noticeHtml) ? call_user_func($behavior->noticeHtml) : $behavior->noticeHtml;
        $content = is_callable($behavior->contentHtml) ? call_user_func($behavior->contentHtml) : ($behavior->contentHtml ?? '');
        $sidebar = is_callable($behavior->metaSidebarHtml) ? call_user_func($behavior->metaSidebarHtml) : $behavior->metaSidebarHtml;
        $pageSidebar = is_callable($behavior->pageSidebarHtml) ? call_user_func($behavior->pageSidebarHtml) : $behavior->pageSidebarHtml;
        $errorSummary = is_callable($behavior->errorSummary) ? call_user_func($behavior->errorSummary) : $behavior->errorSummary;

        if (Craft::$app->getIsMultiSite() && isset($behavior->site)) {
            array_unshift($crumbs, [
20. in /home/wiqusaha/public_html/xxxx/vendor/craftcms/cms/src/web/CpScreenResponseFormatter.php at line 50– craft\web\CpScreenResponseFormatter::_formatTemplate(craft\web\Response, craft\web\CpScreenResponseBehavior)
44454647484950515253545556 
        $request = Craft::$app->getRequest();

        if ($request->getAcceptsJson()) {
            $this->_formatJson($request, $response, $behavior);
        } else {
            $this->_formatTemplate($response, $behavior);
        }
    }

    private function _formatJson(\yii\web\Request $request, YiiResponse $response, CpScreenResponseBehavior $behavior): void
    {
        $response->format = Response::FORMAT_JSON;
21. in /home/wiqusaha/public_html/xxxx/vendor/yiisoft/yii2/web/Response.php at line 1109– craft\web\CpScreenResponseFormatter::format(craft\web\Response)
22. in /home/wiqusaha/public_html/xxxx/vendor/craftcms/cms/src/web/Response.php at line 338– yii\web\Response::prepare()
332333334335336337338339340341342343344 
    /**
     * @inheritdoc
     */
    protected function prepare(): void
    {
        parent::prepare();
        $this->_isPrepared = true;
    }

    /**
     * Clear the output buffer to prevent corrupt downloads.
     *
23. in /home/wiqusaha/public_html/xxxx/vendor/yiisoft/yii2/web/Response.php at line 340– craft\web\Response::prepare()
24. in /home/wiqusaha/public_html/xxxx/vendor/yiisoft/yii2/base/Application.php at line 390– yii\web\Response::send()
25. in /home/wiqusaha/public_html/xxxx/web/index.php at line 23– yii\base\Application::run()
17181920212223    Dotenv\Dotenv::createUnsafeMutable(CRAFT_BASE_PATH)->safeLoad();
}

// Load and run Craft
define('CRAFT_ENVIRONMENT', getenv('ENVIRONMENT') ?: 'production');
$app = require CRAFT_VENDOR_PATH.'/craftcms/cms/bootstrap/web.php';
$app->run();
$_GET = [
    'p' => 'admin/settings/fields/edit/80',
];

$_COOKIE = [
    'b18c8f8715f56d38576d6bf44172d173_username' => '8d74dc86577886b7f181333058294a5cee0897f99fd593f8ebd3dde2a90bbe3da:2:{i:0;s:41:"b18c8f8715f56d38576d6bf44172d173_username";i:1;s:13:"mail@xxxx.ch";}',
    'Craft-2d083c4c-45ff-42c8-b123-35318f335804:sidebar' => 'expanded',
    'b18c8f8715f56d38576d6bf44172d173_license_shun' => 'f26275e8da54c5503d6a56c870dd59eab59cf4e77ea73bba40536efb2dae2322a:2:{i:0;s:45:"b18c8f8715f56d38576d6bf44172d173_license_shun";i:1;s:93:"{"hash":"b3bc668bb720b73080897a1a341b5a30","timestamp":"2024-07-15T14:48:23+02:00","count":8}";}',
    'Craft-339487af-9c44-4979-9ec8-a5ad7f859877:sidebar' => 'expanded',
    'CraftSessionId' => '71dd355520f4a7818495012074adaafc',
    'b18c8f8715f56d38576d6bf44172d173_identity' => 'ba2b2800099b0c7133f83a76d579013264c4ea0c858d7a24dd5dadfc0f5d7beda:2:{i:0;s:41:"b18c8f8715f56d38576d6bf44172d173_identity";i:1;s:160:"[20,"[\\"bIsxkR5pmwcWxNA_s86AugOZVG_VQ2LtQtIGrTdop9lLktWLyDkdTRc3RpGFalwFXqKgcn6K8YkR8IMv75qqO720y03f-Pt_bGJJ\\",null,\\"00fd4bd30da0a03efa8184387b4a441d\\"]",3600]";}',
    'CSRF' => 'ebe995522a707f0de2af6347f4dedb0c3380dcce2e9fd31de35bccbf4110debaa:2:{i:0;s:4:"CSRF";i:1;s:148:"6u2vMTJA5fnzF43gJ7n3XdzPZfgOeCE2cC32nVF8|8209de296c559ce2b296bac80ada95a68dd7a42de0f3444df970d29b4f6401ff6u2vMTJA5fnzF43gJ7n3XdzPZfgOeCE2cC32nVF8|20";}',
];

$_SESSION = [
    'd0d66a77134636dd490e5ccd2e839674__flash' => [],
    'b18c8f8715f56d38576d6bf44172d173__token' => 'lnneOwnTXOXB8847kyMJNk_5NZORDGkcj-bKU-YRJGMmS02Y028qOSfDC284j3CCtY9QCzyaEZE3l-Tl8y9GEJpGspzntIWNT9YS',
    'b18c8f8715f56d38576d6bf44172d173__id' => 20,
    '__authKey' => '["lnneOwnTXOXB8847kyMJNk_5NZORDGkcj-bKU-YRJGMmS02Y028qOSfDC284j3CCtY9QCzyaEZE3l-Tl8y9GEJpGspzntIWNT9YS",null,"00fd4bd30da0a03efa8184387b4a441d"]',
    'b18c8f8715f56d38576d6bf44172d173__expire' => 1721748739,
    '__duration' => 3600,
];
Yii Framework
2024-07-23, 16:32:19

Yii Framework/2.0.51-dev

Neo version

5.0.5

Craft CMS version

5.2.6

What is the affected Neo field's propagation method?

No response

Does this issue involve templating, and if so, is eager-loading used?

This is not a templating issue

ttempleton commented 1 month ago

It looks like Neo is trying to register products as supported element types for block type conditions, which should only happen if Craft Commerce is still installed.

Is it possible that you might have removed the Composer package for Craft Commerce without first uninstalling the plugin?

alexanderbuergin commented 1 month ago

Hello,

no, i removed the Plugin via the CP.

Regards, Alexander

ttempleton commented 1 month ago

I'm still unable to reproduce the error, but I've put some extra checks in for existence of the Craft Commerce classes which hopefully resolves it for you. Please let me know if the error persists with Neo 5.1.2, though.