yokai-php / sonata-workflow

Integrate Symfony workflow component in Sonata Admin
MIT License
22 stars 12 forks source link

Issue with template #21

Closed gansky-alexander closed 4 years ago

gansky-alexander commented 4 years ago

I am configured all according to documentation but i got exception about template:

An exception has been thrown during the rendering of a template ("Place "" is not valid for workflow "order".").

How can i fix this issue?

gansky-alexander commented 4 years ago

Sorry :)

I figured out what is the issue. My entity contain empty "status". Maybe it will be better to rename the error message to "Your place is "" use "new", ..., ... instead?"

Issue can be closed.

yann-eugone commented 4 years ago

Hello @gansky-alexander

The exception you encoutered was generated by Symfony (https://github.com/symfony/workflow/blob/4.4/Workflow.php#L86).

I believe that this is because an entity under workflow should be initialized with a valid state.