shopware / frontends

Shopware Frontends is a framework for building custom, headless storefronts with Shopware 6.
https://frontends.shopware.com
MIT License
165 stars 48 forks source link

[BUG] Fehlende slotId im Contact Form #898

Open innpyt opened 4 months ago

innpyt commented 4 months ago

Is there an existing issue for this?

Current Behavior

ContactFormRoute.php erwartet slotId, sonst wird es an core.basicInformation.email gesendet. Und slotId ist irgendwie nicht im /store-api/pwa/page response drin, sowie cms_slot_id, der im Definition auch drin steht. Id ist laut CmsSlotDefinition ist nicht apiAware.

PS: mit eigene extension habe ich es auch nicht gekriegt. `class SlotExtension extends EntityExtension { public function extendFields(FieldCollection $collection): void { $collection->add((new IdField('id', 'id'))->addFlags(new Runtime(), new PrimaryKey(), new Required(), new ApiAware())); }

public function getDefinitionClass(): string
{
    return CmsSlotDefinition::class;
}

}` gibt ein 500 mit Undefined array key \"cms_slot.id\", und ohne Requires/Primary flags kriege ich einfach "id": null.

Expected Behavior

slotId oder cms_slot_id steht im pwa/page response drin

Steps To Reproduce

Erwartet:

Environment

- OS: Ubuntu 20.12.2
- Node: 20.12.2
- pnpm:0.0.1
- SW: 6.5.3.3

Anything else?

No response

BrocksiNet commented 2 months ago

@mdanilowicz this is released (in 6.6.4.0) and can now be fixed :tada: