2

I'm using Magento 2 CE Version 2.1.0

I already referred Magento SO post with the same error.

When I'm going to Edit Any of the Product then while loading it's giving this error. Below are the details of log files

var\log\debug.log

[2016-09-30 02:15:53] main.DEBUG: cache_invalidate: {"method":"GET","url":"http:/","invalidateInfo":{"tags":["FPC"],"mode":"matchingTag"},"is_exception":false} [] [2016-09-30 02:15:59] main.DEBUG: cache_invalidate: {"method":"GET","url":"http://localhost/magento2/admin/catalog/product/edit/id/2048/set/16/type/simple/store/0/key/83d52c6cd14f1a381e2ceadbc0485a387f7e57f44c790eeff40a79e21f5dbd0a/back/edit/","invalidateInfo":{"tags":["interception","CONFIG"],"mode":"matchingTag"},"is_exception":false} []

var\log\system.log

[2016-09-30 02:16:07] main.INFO: Cache file with merged layout: LAYOUT_adminhtml_STORE0_3a828e091252a8ca686703b2c072394bd and handles default, catalog_product_edit, catalog_product_simple: Please correct the XML data and try again. [] [] [2016-09-30 02:16:07] main.INFO: Cache file with merged layout: LAYOUT_adminhtml_STORE0_3cf9ab1b1723bedc1dcd665a812b00335 and handles admin-1column: Please correct the XML data and try again. [] [] [2016-09-30 02:16:07] main.CRITICAL: Broken reference: the 'header' tries to reorder itself towards 'global.notices', but their parents are different: 'page.wrapper' and 'notices.wrapper' respectively. [] [] [2016-09-30 02:16:07] main.CRITICAL: Broken reference: the 'page.breadcrumbs' tries to reorder itself towards 'notifications', but their parents are different: 'page.wrapper' and 'notices.wrapper' respectively. [] [] [2016-09-30 02:16:07] main.CRITICAL: Broken reference: the 'notification.messages' tries to reorder itself towards 'user', but their parents are different: 'header.inner.right' and 'header' respectively. [] [] [2016-09-30 02:16:07] main.INFO: Cache file with merged layout: LAYOUT_adminhtml_STORE0_36f1b068ec7ccf4878f9284dd1137afd1 and handles catalog_product_prices: Please correct the XML data and try again. [] [] [2016-09-30 02:16:09] main.INFO: Item Magento_Backend::system_currency was removed [] []

  • which version have you used for magento? – Rakesh Jesadiya Oct 4 '16 at 7:02
  • Updated in Question @Rakesh Please check – Ankit Shah Oct 4 '16 at 7:04
  • Hi @J. Chomel u put Bounty On this Awsome? – Ankit Shah Oct 4 '16 at 7:04
  • 1
    just disable this moudle and check again – Rakesh Jesadiya Oct 4 '16 at 7:48
  • 1
    @Rakesh Good suggestion. Sometimes will go so much advance. We forgot basic thing :) – Ankit Shah Oct 4 '16 at 7:49
4
+50

Regarding the debug file

So the messages like this main.DEBUG: cache_invalidate in Magento 2 are not errors, there are only debug messages to tell that the cache is invalidated (which is not a problem nor an error).

Regarding the system file

So the messages like this Broken reference: the 'block1' tries to reorder itself towards 'block2' is not a real error either. As you can see from this github issue:

Ok, guys. There is no bug here ) Really. There are two reasons, why you all see such a logs.

Reason 1 People keep forgetting remove "before" and "after" attributes for blocks which have been moved to another parent, so those are no longer relevant. Internal ticket in progress MAGETWO-53410 and we will clean up legacy references soon.

Reason 2 As an example, let's take Such references mostly (if not all) reside in default.xml files (so will be applied to all pages without exclusions), while the container "sidebar.additional” is added by 2columns-left.xml layout only. So, on pages where different page layout is used, the reference will lead to nowhere, and you will see CRITICAL error logged (while it is not critical at all).

The tricky thing is that sometimes that could be a normal case and developer understands why it happens (if want to add a block to specific container to all pages on which target container available, and don’t need that block to be added to the pages where target container is not available).

Short excerpt from internal ticket description: "Stop logging such cases at all, or at least stop marking them as CRITICAL (ensure that it’s not logged in production mode). Also it will be helpful if logged message will say the URL of the page where target container is missed".

So, as you see, we still think that logging such "broken" references is a right thing to do, since some of them are really could be caused by misspells in layout files.

I reckon there was a lot of errors like this in the logs in the early stable releases as you can see from those two issues:

So if you wanna get rid of them, I reckon you should update to the last version. Seems like Magento fixed it in the develop branch but I'm not sure if the bug fixes are part of 2.0.8/2.1.1 already.

  • @Raphale Can't fix in my current Version? – Ankit Shah Oct 4 '16 at 7:38
  • @AnkitShah as I said try to update to 2.1.1 and see if that's fixed. I am using 2.1.1 and I don't have those errors anymore. If you still have them and installed Magento 2 via GitHub you can pull the develop branch where it seems to be fixed ;) – Raphael at Digital Pianism Oct 4 '16 at 7:40
  • @RaphaelatDigitalPianism Is possible magento 2.0.0 theme used for Magento 2.1.7 – zus Mar 7 '18 at 10:14
0

These annoying and absolutely useless messages are generated by function execute() in \Magento\Framework\Cache\InvalidateLogger

/**
 * Logger invalidate cache
 * @param mixed $invalidateInfo
 * @return void
 */
public function execute($invalidateInfo)
{
    $this->logger->debug('cache_invalidate: ', $this->makeParams($invalidateInfo));
}

I use simple fix to get rid of it:

Extend InvalidateLogger in your module:

   /**
     * Cache configuration model. Provides cache configuration data to the application
     *
     * Copyright © 2013-2017 Magento, Inc. All rights reserved.
     * See COPYING.txt for license details.
     */
    namespace Vendor\Module\Magento\Framework\Cache;

    class InvalidateLogger extends \Magento\Framework\Cache\InvalidateLogger
    {
        /**
         * Logger invalidate cache
         * @param mixed $invalidateInfo
         * @return void
         */
        public function execute($invalidateInfo)
        {
            // Stop spamming in my log
        }
    }

And add mapping to di.xml of you module:

<!-- Disable Logger invalidate cache -->
<preference for="Magento\Framework\Cache\InvalidateLogger"
            type="Vendor\Module\Magento\Framework\Cache\InvalidateLogger"/>
0

As I only need to disable this line on a development server (and I will not get an update of the code), I have enabled myself to comment out some core code in Magento (quick dirty temp fix)

I have commented out the line

public function execute($invalidateInfo)
{
    //this line : 
    //$this->logger->debug('cache_invalidate: ', $this->makeParams($invalidateInfo)); 
}

in

vendor/magento/framework/Cache/InvalidateLogger.php

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.