Skip to content

I can not to subscribe on change of all sections in Stores ->Configuration using event admin_system_config_changed_section #5035

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
katesuykovskaya opened this issue Jun 15, 2016 · 4 comments
Assignees
Labels
bug report Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release

Comments

@katesuykovskaya
Copy link

Steps to reproduce

  1. M 2.0.7
  2. Create extension, create etc/adminhtml/system.xml there
  3. add section tab with id, that contains number, in my case "b2b" https://drive.google.com/a/interiorwebdesign.com/file/d/0BzTvZltZJMLlemNCOGVwdUM5S00/view?usp=drivesdk
  4. create etc/adminhtml/events.xml and add event listener to listen to changing of this section https://drive.google.com/a/interiorwebdesign.com/file/d/0BzTvZltZJMLlRFpqOEIyc2RKRW8/view?usp=drivesdk

Actual result

  1. Error message Invalid XML in file D:/OpenServer/domains/magento207.loc/app/code/IWD/SalesRep/etc/adminhtml/events.xml:
    Element 'event', attribute 'name': [facet 'pattern'] The value 'admin_system_config_changed_section_b2b' is not accepted by the pattern '[a-zA-Z_]+'.
    Line: 3

Element 'event', attribute 'name': 'admin_system_config_changed_section_b2b' 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

Expected result

  1. There should be ability to subcsribe on changing of each section, so I see 2 possible options:
    • extend regex to allow numbers be in name of event, or
    • disallow to set name of section, that contains numbers
      In other words, patterns, that are used to validate there values should be compatible.
@katesuykovskaya katesuykovskaya changed the title I can to subscribe on change of all sections in Stores ->Configuration using event admin_system_config_changed_section I can not to subscribe on change of all sections in Stores ->Configuration using event admin_system_config_changed_section Jun 15, 2016
@veloraven veloraven self-assigned this Jun 23, 2016
@veloraven veloraven removed their assignment Jun 23, 2016
@mtauqir
Copy link

mtauqir commented Mar 4, 2017

I am on 2.1.4 version of magento.
I am still seeing this validation error but on events.xml file validation.

I am trying to observe an event from a third part module. The event has a number in its name. That number is in actually third party company's name.

Strange thing is that they are able to raise this event with numbers in its name, but XML validation prevents me to observe it. And obviously due to copyrights I am not allowed to edit their code to rename event name.

@magento-engcom-team magento-engcom-team added bug report Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed labels Sep 11, 2017
@orlangur
Copy link
Contributor

This was fixed in #10837 for 2.3.x.

@orlangur orlangur added Fixed in 2.3.x The issue has been fixed in 2.3 release line Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release labels Oct 20, 2017
@magento-engcom-team magento-engcom-team added 2.1.x Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed labels Nov 27, 2017
@Mobecls Mobecls self-assigned this Dec 15, 2017
Mobecls pushed a commit to Mobecls/magento2 that referenced this issue Dec 15, 2017
  - Allowed to use digits at names of events
Mobecls added a commit to Mobecls/magento2 that referenced this issue Dec 15, 2017
Cannot subscribe to events with a number in name
Mobecls added a commit to Mobecls/magento2 that referenced this issue Dec 15, 2017
Cannot subscribe to events with a number in name
@okorshenko
Copy link
Contributor

Hi @katesuykovskaya. Thank you for your report.
The issue has been fixed in #12758 by @Mobecls in 2.2-develop branch
Related commits:

The fix will be available with the upcoming patch release.

@okorshenko okorshenko added the Fixed in 2.2.x The issue has been fixed in 2.2 release line label Dec 22, 2017
@magento-engcom-team
Copy link
Contributor

Hi @katesuykovskaya. Thank you for your report.
The issue has been fixed in magento-engcom/magento2ce#1362 by @magento-engcom-team in 2.3-develop branch
Related commit(s):

The fix will be available with the upcoming 2.3.0 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release
Projects
None yet
Development

No branches or pull requests

8 participants