With a current, vanilla Magento 1.9.1 (CE) or 1.14.1/1.14.2 (EE) what is the first event that can be observed?
- for the frontend (via
/index.php
; when the installer did run already) - for the frontend, when the installer did not yet run (if it makes a difference)
- for the adminhtml
- in cron
- in webservice API 1
- in webservice API 2
(this question might be looking for pure facts, but more interesting in the scope of Magento 1 is how to find these events in code)
In process of finding out more, I've collect some web-resources:
- What's the earliest event Magento dispatches? (Q&A Jun 2011)
- Magento Startup Events (Sep 2012; by Alan Storm)
- What is the first event fired in Magento? – (Apr 2014; by E. Schrade)
Best Answer
It is possible to observe these events yourself as follows:
/app/Mage.php modify the
dispatchEvent()
function as below:Now when you run the page, you'll notice that
/var/log/events.log
logs every event, in order, when loading whichever page you're interested in observing.Make sure that this is performed in a staging environment where you are the only person using the site, to ensure you're logging the correct events.
Clean out the log file after observing each page individually so that the first event logged is always the first event fired.