Answer the question
In order to leave comments, you need to log in
When does OnBeforeIBlockElementUpdate not fire when an element changes?
Hello!
The activity of the elements on the site changes, I still can’t understand why.
I put in init.php an entry in the activity change file (output print_r (debug_backtrace (DEBUG_BACKTRACE_IGNORE_ARGS), true)), but all he caught was what was changed through the admin panel and through the php console (I did it myself), i.e.
modules/main/admin/php_command_line.php
modules/iblock/admin/iblock_element_edit.php
Question: how else can I track the reason for replacing element activity (why OnBeforeIBlockElementUpdate didn't work).
There is no import through 1s on the site.
Answer the question
In order to leave comments, you need to log in
Events are triggered only when API methods are called (For example: Add, Update)
i.e. if the developer bypassed the activity change and forgot to call ExecuteModuleEventEx() on your OnBeforeIBlockElementUpdate , then the change will not fire the event.
But they rarely do this, but they do. For example:
Use UpdateList() - it updates elements, but does not call Event (Bitrix says this method Update list of elements w/o any events)
or hardcore
the event won't fire.
Look for anomalies in the code.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question