Skip to content

Magento 2.2: Element 'remove', attribute 'media': The attribute 'media' is not allowed. #2

Description

@Tjitse-E

Preconditions:
Magento 2.2
PHP 7.1
snowdog/frontools 1.5.8
snowdog/theme-blank-sass 0.10.0

Apparently Magento 2.2 is rather strict about the XML configuration. This piece of code:

<remove src="css/print.css" media="print" />

Generates the following error in M2.2:

Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'remove', attribute 'media': The attribute 'media' is not allowed.
Line: 23

If you remove the 'media' attribute of print.css this issue is resolved.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions