Skip to content

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

Closed
@tzsolti

Description

@tzsolti

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: SetupFixed in 2.2.xThe issue has been fixed in 2.2 release lineFixed in 2.3.xThe issue has been fixed in 2.3 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.1.xThe issue has been reproduced on latest 2.1 releasebug report

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions