Skip to content
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

import.xml doesn't allow numbers in vendor name and class name #4470

Closed
tzsolti opened this issue May 11, 2016 · 3 comments
Closed

import.xml doesn't allow numbers in vendor name and class name #4470

tzsolti opened this issue May 11, 2016 · 3 comments
Labels
bug report Component: Setup 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: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release

Comments

@tzsolti
Copy link

tzsolti commented May 11, 2016

Preconditions

  1. Magento 2.

Steps to reproduce

  1. Create a simple module with a vendor name which contains at least one number (ex. test123) which creates an import entity
  2. etc/import.xml will look something like:
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_ImportExport:etc/import.xsd">
<entity name="catalog_product" label="Products test" model="test123\somename\Model\Something" behaviorModel="Magento\ImportExport\Model\Source\Import\Behavior\Basic" />
</config>
  1. Enable module, clear the cache and open the Magento backend Import page

Expected result

  1. It should load the import page

Actual result

  1. The site will die with an error message similar to this:

Invalid XML in file <path_to_website_root>/app/code/test123/somename/etc/import.xml:
Element 'entity', attribute 'model': [facet 'pattern'] The value 'test123\somename\Model\Something' is not accepted by the pattern '[A-Za-z_\]+'.
Line: 3

Element 'entity', attribute 'model': 'test123\somename\Model\Something' is not a valid value of the atomic type 'modelName'.
Line: 3

The same happens also for export.xml.

@maksek
Copy link
Contributor

maksek commented May 12, 2016

@tzsolti, thanks for reporting, we are aware of the issue, and going to resolve it.

@maksek maksek added PS Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development labels May 12, 2016
@nhp
Copy link

nhp commented Jul 2, 2016

Would be fixed by PR #5420

@vkorotun vkorotun removed the PS label Aug 4, 2016
tkn98 added a commit to tkn98/magento2 that referenced this issue Mar 29, 2017
The solidusbackslash character ("\")  was put more than once in the same
regex character class across some XSD files. Per each character class
there is no need to specify it twice.

I ran over this while looking into an issue with class-name validation
which do not allow digits within class names.

Refs:

- https://www.w3.org/TR/xmlschema11-2/#cces

- magento#4470

- magento#5420

- magento#8307
@magento-engcom-team magento-engcom-team added Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development bug report Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed Component: Setup labels Sep 11, 2017
@magento-engcom-team magento-engcom-team changed the title import.xsd doesn't allow numbers in vendor name and class name import.xml doesn't allow numbers in vendor name and class name Nov 24, 2017
@magento-engcom-team magento-engcom-team added Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed and removed Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed labels Nov 24, 2017
@magento-engcom-team
Copy link
Contributor

@tzsolti, thank you for your report.
The issue is already fixed in develop branch, 2.2.1

@magento-engcom-team magento-engcom-team added 2.1.x 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 Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release labels Nov 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Component: Setup 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: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release
Projects
None yet
Development

No branches or pull requests

6 participants