I have a custom observer for admin admin_system_config_changed_section_{{$section_name}} the following are:


<?xml version="1.0" encoding="UTF-8"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
<event name="admin_system_config_changed_section_section_name">
    <observer name="custom_admin_system_config_change_section_name" instance="Vendor\Module\Observer\ConfigObserver"/>

Where section_name in system.xml:

...<section id="section_name ... and when loaded in the backend url:


Observer class:

namespace Vendor\Module\Observer;

use Magento\Framework\Event\ObserverInterface;
use Magento\Framework\Event\Observer as EventObserver;
use Psr\Log\LoggerInterface as Logger;

class ConfigObserver implements ObserverInterface
     * @var Logger
    protected $logger;

     * @param Logger $logger
    public function __construct(
        Logger $logger
    ) {
        $this->logger = $logger;

    public function execute(EventObserver $observer)


When go load the backend url I get error:

1 exception(s):
Exception #0 (Magento\Framework\Exception\LocalizedException): Invalid XML in file .../htdocs/app/code/Vendor/Module/etc/adminhtml/events.xml:
Element 'event', attribute 'name': [facet 'pattern'] The value 'admin_system_config_changed_section_section_name' is not accepted by the pattern '[a-zA-Z_]+'.
Line: 3

Element 'event', attribute 'name': 'admin_system_config_changed_section_section_name' is not a valid value of the atomic type 'eventName'.
Line: 3

Element 'event', attribute 'name': Warning: No precomputed value available, the value was either invalid or something strange happend.
Line: 3

What seems to be the problem here? as far as I can see it's within naming convention [a-zA-Z_]+


It's a Bug.


It can't accept numbers.


| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.