Closed cmfcmf closed 8 years ago
Some explanation about it should work.
The preSave
callback executes the validate
method and aborts if an error occurs:
https://github.com/Guite/MostGenerator/blob/master/org.zikula.modulestudio.generator/src/org/zikula/modulestudio/generator/cartridges/zclassic/models/EventListener.xtend#L406
The actual validation is done here:
https://github.com/Guite/MostGenerator/blob/master/org.zikula.modulestudio.generator/src/org/zikula/modulestudio/generator/cartridges/zclassic/models/entity/EntityMethods.xtend#L315
As you can see in lines 318 - 323 the flash bag is filled immediately before false
is returned.
I was editing routes with an earlier version of the Routes module. I think returning false from the entity callback didn't stop the creation.
Fixed in 997ed9d2130bff322a8f9ea0e4cdcf8861e458c1
Can you elaborate on which specific use case you tested that? From what I've seen so far entities are indeed stopped from being processed if a validation error occurs.