cancel
Showing results for 
Search instead for 
Did you mean: 

Magento\Framework\Exception\LocalizedException: The XML in file Element 'event': Missing child eleme

Magento\Framework\Exception\LocalizedException: The XML in file Element 'event': Missing child eleme

Hi,

i am getting below error in magento 2.4 and it is working fine in magento 2.3 and how can i resolve this one?

Magento\Framework\Exception\LocalizedException: The XML in file "/var/www/html/magento240/app/code/PPPL/PhonePe/etc/frontend/events.xml" is invalid: Element 'event': Missing child element(s). Expected is ( observer ). Line: 4 Verify the XML and try again. in /var/www/html/magento240/vendor/magento/framework/Config/Reader/Filesystem.php:156 Stack trace: #0 

1 REPLY 1

Re: Magento\Framework\Exception\LocalizedException: The XML in file Element 'event': Missing child e

Hello @sekhar_n 

 

Seems like child node is missing in your events.xml file, please add a observer node inside event tag like below :

<observer name="observer_unique_name" instance="Vendor\Module\Observer\ClassName" />

 

Hope it works ! 

Problem Solved ? Click on 'Kudos' & Accept as Solution ! Smiley Happy