sonata-project / SonataFormatterBundle

Symfony SonataFormatterBundle
https://docs.sonata-project.org/projects/SonataFormatterBundle
MIT License
81 stars 117 forks source link

Use PRE_SUBMIT since SUBMIT is not dispatched when inherit_data is set to true #722

Closed jordisala1991 closed 1 year ago

jordisala1991 commented 1 year ago

Subject

I am targeting this branch, because fixes a bug with the formatter type.

Closes #715

Changelog

### Fixed
- Fix `FormatterType` listener option, now it should update `target_field` when listener is set to "true" (its default value).
jordisala1991 commented 1 year ago

@shiroko @haivala can you test this PR?

for @haivala , previous to this PR, even if you can use the formatter block inside page-bundle 4.x, your changes won't get saved, right? After this PR they should get saved. I would like to confirm that previous to this PR, on page-bundle it wasnt really working.

On tests inside this bundle it is working now.

haivala commented 1 year ago

True. I did not change the content of the block to test it properly. Now that I tested it (without this PR) I can see the changes in the PageAdmin but not in the frontend.

shiroko commented 1 year ago

I tested and confirmed that the target_field is properly set. I did not test the FormatterBlockService. Thanks!

haivala commented 1 year ago

can we get a release when this is merged?

jordisala1991 commented 1 year ago

can we get a release when this is merged?

Can you confirm that with this PR it works with the block and previously it did not?

haivala commented 1 year ago

can we get a release when this is merged?

Can you confirm that with this PR it works with the block and previously it did not?

I tested and it works