0

was trying to add custom head script for favicons / app icons

    <link rel="apple-touch-icon" sizes="180x180" href="Magento_Theme::icons/apple-touch-icon.png" />
    <link rel="icon" type="image/png" sizes="32x32" href="Magento_Theme::icons/favicon-32x32.png" />
    <link rel="icon" type="image/png" sizes="16x16" href="Magento_Theme::icons/favicon-16x16.png" />
    <link rel="manifest" href="Magento_Theme::icons/site.webmanifest" />
    <link rel="mask-icon" href="Magento_Theme::icons/safari-pinned-tab.svg" color="#ee731e" />
    <meta name="apple-mobile-web-app-title" content="M &amp; M" />
    <meta name="application-name" content="M &amp; M" />
    <meta name="msapplication-TileColor" content="#ffffff" />
    <meta name="msapplication-TileImage" content="Magento_Theme::icons/mstile-144x144.png" />
    <meta name="theme-color" content="#ff0000" />

but getting following error:

Exception #0 (Exception): Warning: simplexml_load_string(): Entity: line 7940: parser error : xmlParseEntityRef: no name in /vendor/magento/framework/View/Model/Layout/Merge.php on line 534

it seem that problem lies with this xml code, but can't seem to find my problem

although when i use custom script :

$string = '<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
        <!-- ADD JQUERY -->
        <meta name="x_ua_compatible" content="IE=edge"/>
        <meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
        <!-- ADD CSS  -->
        <css src="css/styles-m.css"/>
        <css src="css/styles-l.css" media="screen and (min-width: 768px)"/>
        <css src="css/print.css" media="print"/>
        <css src="css/ytextend.css"/>
        <css src="css/yttheme.css"/>
        <css src="css/css-fix.css"/>
        <css src="css/custom.css"/>

        <link rel="apple-touch-icon" sizes="180x180" href="Magento_Theme::icons/apple-touch-icon.png"/>
        <link rel="icon" type="image/png" sizes="32x32" href="Magento_Theme::icons/favicon-32x32.png"/>
        <link rel="icon" type="image/png" sizes="16x16" href="Magento_Theme::icons/favicon-16x16.png"/>
        <link rel="manifest" href="Magento_Theme::icons/site.webmanifest"/>
        <link rel="mask-icon" href="Magento_Theme::icons/safari-pinned-tab.svg" color="#ee731e"/>
        <meta name="apple-mobile-web-app-title" content="M &amp; M"/>
        <meta name="application-name" content="M &amp; M"/>
        <meta name="msapplication-TileColor" content="#ffffff"/>
        <meta name="msapplication-TileImage" content="Magento_Theme::icons/mstile-144x144.png"/>
        <meta name="theme-color" content="#ff0000"/>
    </head>
</page>
';

var_dump(simplexml_load_string($string));

i get no error with output..

Your Answer

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

Browse other questions tagged or ask your own question.