0

Hi today i have noticed my website crashes always . so i have seen many kind of errors in website (An error has happened during application run. See exception log for details. Could not write error message to log. Please use developer mode to see the message.). To solve this error i am taking my EC2 instance in aws and then reboot the instance after i run the following code php bin/magento cache:clean after running this code then the website working perfectly . But the problem is every 10 or 20 minutes the website is crashing . I have to run this command again and again . So now i am really worry about this situation .

Please see the list of errors i am facing in my logs

**1) Exception log-->** 2020-05-22 08:53:58] main.CRITICAL: The element 'product.info.options' already has a child with alias 'date' {"exception":"[object] (Magento\\Framework\\Exception\\LocalizedException(code: 0): The element 'product.info.options' already has a child with alias 'date' at /var/www/html/vendor/magento/framework/Data/Structure.php:611)"} []

2) **system.log-->** [2020-05-22 09:37:08] main.INFO: Cron Job sales_send_order_creditmemo_emails is successfully finished. Statistics: {"sum":0.00060582160949707,"count":1,"realmem":0,"emalloc":1208,"realmem_start":148897792,"emalloc_start":146366248} [] []

3) **magento.cron.log-->** Stack trace:
#0 [internal function]: Magento\Framework\App\ErrorHandler->handler(2, 'fwrite(): SSL o...', '/var/www/html/v...', 324, Array)
#1 /var/www/html/vendor/magento/zendframework1/library/Zend/Mail/Protocol/Abstract.php(324): fwrite(Resource id #2942, 'QUIT\r\n')
#2 /var/www/html/vendor/magento/zendframework1/library/Zend/Mail/Protocol/Smtp.php(385): Zend_Mail_Protocol_Abstract->_send('QUIT')
#3 /var/www/html/vendor/magento/zendframework1/library/Zend/Mail/Transport/Smtp.php(144): Zend_Mail_Protocol_Smtp->quit()
#4 [internal function]: Zend_Mail_Transport_Smtp->__destruct()
#5 {main}
  thrown in /var/www/html/vendor/magento/framework/App/ErrorHandler.php on line 



4)**update.log-->** [2020-05-22 09:48:01] update-cron.ERROR: Cron readiness check failure! Found non-writable paths:    /var/www/html/.github   /var/www/html/.htaccess.sample  /var/www/html/.php_cs.dist  /var/www/html/.travis.yml   /var/www/html/.user.ini [] []

5) **update.cronlog-->** update-cron: Please check var/log/update.log for execution summary.

6) **setup.cron.log-->**setup-cron: Please check var/log/update.log for execution summary.

Please help.

1 Answer 1

1

I've seen the 'product.info.options' error before yes. It will happen every time someone loads a product.

In your theme you have duplicated the following XML in a catalog_product_view.xml file

<block class="Magento\Catalog\Block\Product\View" name="product.info.options.wrapper" as="product_options_wrapper" template="Magento_Catalog::product/view/options/wrapper.phtml">
    <block class="Magento\Catalog\Block\Product\View\Options" name="product.info.options" as="product_options" template="Magento_Catalog::product/view/options.phtml">
        <block class="Magento\Catalog\Block\Product\View\Options\Type\DefaultType" name="product.info.options.default" as="default" template="Magento_Catalog::product/view/options/type/default.phtml"/>
        <block class="Magento\Catalog\Block\Product\View\Options\Type\Text" name="product.info.options.text" as="text" template="Magento_Catalog::product/view/options/type/text.phtml"/>
        <block class="Magento\Catalog\Block\Product\View\Options\Type\File" name="product.info.options.file" as="file" template="Magento_Catalog::product/view/options/type/file.phtml"/>
        <block class="Magento\Catalog\Block\Product\View\Options\Type\Select" name="product.info.options.select" as="select" template="Magento_Catalog::product/view/options/type/select.phtml"/>
        <block class="Magento\Catalog\Block\Product\View\Options\Type\Date" name="product.info.options.date" as="date" template="Magento_Catalog::product/view/options/type/date.phtml"/>
    </block>
    <block class="Magento\Framework\View\Element\Html\Calendar" name="html_calendar" as="html_calendar" template="Magento_Theme::js/calendar.phtml"/>
</block>

But possibly using different template files or have subtle difference

The key part is that the option types need to come out as they have already been defined in the parent theme

<block class="Magento\Catalog\Block\Product\View" name="product.info.options.wrapper" as="product_options_wrapper" template="Magento_Catalog::product/view/options/wrapper.phtml">
    <block class="Magento\Catalog\Block\Product\View\Options" name="product.info.options" as="product_options" template="Magento_Catalog::product/view/options.phtml"/>
    <block class="Magento\Framework\View\Element\Html\Calendar" name="html_calendar" as="html_calendar" template="Magento_Theme::js/calendar.phtml"/>
</block>

Or alternatively if you are using different phtml

You need to change something like this

<block class="Magento\Catalog\Block\Product\View\Options\Type\DefaultType" name="product.info.options.default" as="default" template="Magento_Catalog::product/view/options/type/default.phtml"/>

To something like this

<referenceBlock name="default" template="product/view/options/type/different-default.phtml"/>

That will stop the exception log entry every time you view a product

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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