taslam

Observing Me2EPro Order Success Event Error

Recommended Posts

Hi there,

  I am trying to observe M2ePro's order event in magento2. Event name is: m2epro_order_place_success

The issue is that when I add following in events.xml file of my module. Magento2's static content deploy command throws XML validation errors saying that event name can only have a-z or A-Z characters. 

 

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
    <event name="m2epro_order_place_success">
        <observer name="my_event_name"
                  instance="mynamespace\modulename\Observer\ObserverClass"
                  shared="true"
                  disabled="false"
                />
    </event>
</config>

 

Error text is, when execute command:  php bin/magento setup:static-content:deploy

Quote

                                                                                                                                            
  [Magento\Framework\Exception\LocalizedException]                                                                                          
  Invalid XML in file /var/www/html/magento-web/app/code/mynamespace/modulename/etc/events.xml:                                                   
  Element 'event', attribute 'name': [facet 'pattern'] The value 'm2epro_order_place_success' is not accepted by the pattern '[a-zA-Z_]+'.  
  Line: 4                                                                                                                                   
  Element 'event', attribute 'name': 'm2epro_order_place_success' is not a valid value of the atomic type 'eventName'.                      
  Line: 4                                                                                                                                   
  Element 'event', attribute 'name': Warning: No precomputed value available, the value was either invalid or something strange happend.    
  Line: 4                                                                                                                                   
            

 

Edited by taslam

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.