Freitextfeld produziert Fehler bei Registrierung

Hallo,

ich habe ein riesen Problem mit den Freitextfeldern:

Im Bereich „Kunde (s_user_attributes)“ habe ich ein Freitextfeld „is_18_years“ ( Checkbox INT(1) ) angelegt. Die Checkbox wird mir im Backend angezeigt und funktioniert. Nun habe ich das massive Problem, dass sich keiner mehr im Shop registrieren kann, weil der folgende Fehler kommt:

Neither the property "is_18Years" nor one of the methods "getIs18Years()", "is18Years()", "isIs18Years()", "hasIs18Years()", "__get()" exist and have public access in class "Shopware\Models\Attribute\Customer". in vendor/symfony/property-access/PropertyAccessor.php on line 486 Stack trace: #0 vendor/symfony/property-access/PropertyAccessor.php(387): Symfony\Component\PropertyAccess\PropertyAccessor->readProperty(Array, 'is_18Years') #1 vendor/symfony/property-access/PropertyAccessor.php(147): Symfony\Component\PropertyAccess\PropertyAccessor->readPropertiesUntil(Array, Object(Symfony\Component\PropertyAccess\PropertyPath), 1, true) #2 vendor/symfony/form/Extension/Core/DataMapper/PropertyPathMapper.php(92): Symfony\Component\PropertyAccess\PropertyAccessor->getValue(Object(Shopware\Models\Attribute\Customer), Object(Symfony\Component\PropertyAccess\PropertyPath)) #3 vendor/symfony/form/Form.php(623): Symfony\Component\Form\Extension\Core\DataMapper\PropertyPathMapper->mapFormsToData(Object(RecursiveIteratorIterator), Object(Shopware\Models\Attribute\Customer)) #4 vendor/symfony/form/Form.php(567): Symfony\Component\Form\Form->submit(Array, true) #5 engine/Shopware/Controllers/Frontend/Register.php(413): Symfony\Component\Form\Form->submit(Array) #6 engine/Shopware/Controllers/Frontend/Register.php(113): Shopware_Controllers_Frontend_Register->createCustomerForm(Array) #7 engine/Library/Enlight/Controller/Action.php(159): Shopware_Controllers_Frontend_Register->saveRegisterAction() #8 engine/Library/Enlight/Controller/Dispatcher/Default.php(523): Enlight_Controller_Action->dispatch('saveRegisterAct...') #9 engine/Library/Enlight/Controller/Front.php(223): Enlight_Controller_Dispatcher_Default->dispatch(Object(Enlight_Controller_Request_RequestHttp), Object(Enlight_Controller_Response_ResponseHttp)) #10 engine/Shopware/Kernel.php(177): Enlight_Controller_Front->dispatch() #11 vendor/symfony/http-kernel/HttpCache/HttpCache.php(487): Shopware\Kernel->handle(Object(Enlight_Controller_Request_RequestHttp), 1, true) #12 engine/Shopware/Components/HttpCache/AppCache.php(255): Symfony\Component\HttpKernel\HttpCache\HttpCache->forward(Object(Symfony\Component\HttpFoundation\Request), true, NULL) #13 vendor/symfony/http-kernel/HttpCache/HttpCache.php(258): Shopware\Components\HttpCache\AppCache->forward(Object(Symfony\Component\HttpFoundation\Request), true) #14 vendor/symfony/http-kernel/HttpCache/HttpCache.php(275): Symfony\Component\HttpKernel\HttpCache\HttpCache->pass(Object(Symfony\Component\HttpFoundation\Request), true) #15 engine/Shopware/Components/HttpCache/AppCache.php(133): Symfony\Component\HttpKernel\HttpCache\HttpCache->invalidate(Object(Symfony\Component\HttpFoundation\Request), true) #16 vendor/symfony/http-kernel/HttpCache/HttpCache.php(206): Shopware\Components\HttpCache\AppCache->invalidate(Object(Symfony\Component\HttpFoundation\Request), true) #17 engine/Shopware/Components/HttpCache/AppCache.php(114): Symfony\Component\HttpKernel\HttpCache\HttpCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #18 shopware.php(113): Shopware\Components\HttpCache\AppCache->handle(Object(Symfony\Component\HttpFoundation\Request)) #19 {main} Shop Service

Hallo,

ich habe das exakt gleiche Problem.

Es scheinen die Getter / Setter nicht generiert worden zu sein. 
Leider finde ich in der Doku nicht wie und wo das zu tun ist.

 

Hast Du das Problem mittlerweile beheben können?

 

Leider nein! Da mir keiner helfen konnte, habe ich die Felder wieder rausgelöscht…

Mir geht es genau so! Bei mir wurden auch keine Getter / Setter erstellt, habe auch alles so gemacht wie in dem SW5 Buch. Im Gegensatz zu meinen Vorrednern habe ich das Attribut per Plugin erweitert:

private function registerArticleImagesAttributes(InstallContext $context)
    {
        $context->scheduleClearCache(InstallContext::CACHE_LIST_DEFAULT);
        $service = $this->container->get('shopware_attribute.crud_service');

        $service->update('s_articles_img_attributes', 'rsImage', 'boolean', [
            //user has the opportunity to translate the attribute field for each shop
            'translatable' => true,
            //attribute will be displayed in the backend module
            'displayInBackend' => false,
            //in case of multi_selection or single_selection type, article entities can be selected,
            'entity' => 'Shopware\Models\Article\Image',
            //numeric position for the backend view, sorted ascending
            'position' => 100,
            //user can modify the attribute in the free text field module
            'custom' => false
        ],
            null,
            false,
            0 // default
        );
    }

Kann sich hier seitens Shopware jemand melden?

1 „Gefällt mir“

Da die Antwort mir leider nicht geholfen, hier mein kleines Statement nach einigen Tests.

Der Freitextfeld Spaltenname darf kein Unterstrich mit einer nachfolgenden Zahl beinhalten z.b.

custom_1_text // FEHLER
custom_1 // FEHLER
custom1 // OK
custom_text1 // OK