I am running my custom plugin in Magento 2.2.2 fresh install.

I have customised Magento search page. When I hit search page then below error comes.

enter image description here

It's working perfectly in Magento 2.1 and 2.2.0 but not working in Magento 2.2.2.

Below is the code which I am using.

<?xml version="1.0"?>
 * Copyright © 2013-2017 Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
        <script src="Vendor_ModuleName::js/timer.js" type="text/javascript"></script>
        <referenceBlock name="search_result_list" template="Vendor_ModuleName::product/list.phtml">

I have solved this issue by changing below line.

<script src="Vendor_ModuleName::js/timer.js" type="text/javascript"></script>

change with

<script type="text/javascript" src="Vendor_ModuleName::js/timer.js"/>

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.