Custom dialog alert/warning on preAdd event on asset

Hi,

How can we able to create a custom dialog of alert/warning in pimcore 6.4? And also I’m not able to throw an exception on preAdd event of asset.

THanks in advance.
Karthikeyan B

maybe this will solve your issue https://github.com/pimcore/pimcore/pull/5912

i tried but stil not resolved.

Did you try this in your Listener ‘throw new \Pimcore\Model\Element\ValidationException(“Alert Message”, 123);’ ?

Yeah i tried, its not giving any error popup in UI. But when i inspect and API request is showing that exception.

.

It also didnt give popup.

Try with debug mode turned off

Tried that too it didn’t work.

@dvesh3 it works for a pimcore 6.2.3 instance but its not working on pimcore 6.4 instance.

Can you check?

Then seems like a bug. Currently works only for data object events.

This bug was introduced when jquery was removed from Pimcore Admin UI in 6.3.0 version. It should be fixed in 6.6.0 https://github.com/pimcore/pimcore/pull/6009

1 Like