Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Magento 2.1.0] Catalog nav bar is missing in 2.1.0 #5423

Closed
Ctucker9233 opened this issue Jul 3, 2016 · 90 comments
Closed

[Magento 2.1.0] Catalog nav bar is missing in 2.1.0 #5423

Ctucker9233 opened this issue Jul 3, 2016 · 90 comments
Assignees
Labels
Area: Frontend bug report Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development

Comments

@Ctucker9233
Copy link

Steps to reproduce

  1. Put store in maitenance mode
  2. Install Magento 2.1.0 from .zip folder per magento documentation
  3. run setup:upgrade and setup:di:compile commands
  4. Navigate to front end

Expected result

Store page displays normally with catalog navigation

Actual result

Store page displays without catalog navigation

Note: Multi-store setup
backend
frontend

@acidreian666
Copy link

what did you upgrade from?
is your Storefront using SSL aka (https://)
Are you running Varnish?
Theres simular issues going around.

@JDavidVR
Copy link
Contributor

JDavidVR commented Jul 3, 2016

I have same problem upgrading from 2.0.7 to 2.1 I don't know why, probably its an issue with changes to the settings, before 2.1 it was on store>configuration>design, now it is on content > theme(or something like that)

@Ctucker9233
Copy link
Author

Ctucker9233 commented Jul 3, 2016

@acidreian666 I upgraded from 2.0.7 and it uses SSL. I don't use varnish.

@Ctucker9233
Copy link
Author

@JDavidVR It would seem that my theme is working ok. I didn't manipulate anything having to do with that nav bar.

@Ctucker9233
Copy link
Author

If themes can't transfer from 2.0.7 to 2.1, that is a critical oversight.

@Ctucker9233
Copy link
Author

If I clear /var/cache, /var/page_cache and /var/generation according to the documentation, http://devdocs.magento.com/guides/v2.1/comp-mgr/cli/cli-upgrade.html, this happens:

Warning: ltrim() expects parameter 1 to be string, object given in /home/tuckersf/public_html/vendor/magento/framework/Code/Generator/EntityAbstract.php on line 152

Notice: Uninitialized string offset: 0 in /home/tuckersf/public_html/vendor/magento/framework/Autoload/ClassLoaderWrapper.php on line 81

Notice: Uninitialized string offset: 0 in /home/tuckersf/public_html/vendor/composer/ClassLoader.php on line 317

Notice: Uninitialized string offset: 0 in /home/tuckersf/public_html/vendor/composer/ClassLoader.php on line 349
An error has happened during application run. See exception log for details.

@acidreian666
Copy link

So I been trying to Replicate the original problem my tests have been as fallowed.
Test 1
Install magento on Ubuntu 16.04 server w/ Nginx php7.0-fpm varnish mysql
installed magento2 to html dir
via
sudo wget magento2.1.zip (from official magento website)
then installed m2.1 via website installer http://localhost/setup/
no issues.

Finished install = Functional 2.1 with NO menu on Homepage no matter what configurations are used.

Test 2
Installed Magento 2 Stack via Bitnami on Debain server.
m2.0.7 with apache mysql php7 varnish memcached ect.. basic stuff.
after using and making sure basic configuration is set and m2.0.7 is functional via http://localhost/
using Admin backend System Upgrade and upgrading to 2.1 upgrades flawlessly.
Finished install = Functional 2.1 with menu on Homepage (Menus are working Functionally)
*Note
Using Varnish w/ Apache & m2.1 with SSL menu disappears the same way as it does using Test1.

Thoughts.
Issues with Nginx server using 2.1 compatibility?
Issues using the Official Magento2.1 zip from website?
Or could it be because of Debain jesse vs Ubuntu 16.04?

I'm going to do more testing.

@JDavidVR
Copy link
Contributor

JDavidVR commented Jul 3, 2016

@Ctucker9233 I did more tests, trying to change configuration on backend and I agree with you this is a critical issue, for sites that are already build on 2.0.x and want to upgrade to 2.1

In logs I have this error:
[2016-07-03 23:08:39] main.INFO: Cache file with merged layout: LAYOUT_frontend_STORE1_2c7461af04bb11fe209659d7147d2c579 and handles default, cms_index_index, cms_page_view, cms_index_index_id_home: Please correct the XML data and try again. [] []
[2016-07-03 23:08:39] main.INFO: Cache file with merged layout: LAYOUT_frontend_STORE1_20a98983867a1770682b48d9a0ad63441 and handles 1column: Please correct the XML data and try again. [] []
[2016-07-03 23:08:39] main.CRITICAL: Broken reference: the 'currency' element cannot be added as child to 'header.panel', because the latter doesn't exist [] []
[2016-07-03 23:08:39] main.CRITICAL: Broken reference: the 'catalog.compare.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2016-07-03 23:08:39] main.CRITICAL: Broken reference: the 'sale.reorder.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2016-07-03 23:08:39] main.CRITICAL: Broken reference: the 'wishlist_sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2016-07-03 23:08:39] main.CRITICAL: Broken reference: the 'header.links' element cannot be added as child to 'header.panel', because the latter doesn't exist [] []
[2016-07-03 23:08:39] main.CRITICAL: Broken reference: the 'paypal.partner.right.logo' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2016-07-03 23:08:39] main.CRITICAL: Broken reference: the 'bml.right.logo' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2016-07-03 23:08:39] main.CRITICAL: Broken reference: the 'currency' tries to reorder itself towards 'store_language', but their parents are different: 'header.panel' and '' respectively. [] []
[2016-07-03 23:08:39] main.CRITICAL: Broken reference: the 'store.settings.currency' tries to reorder itself towards 'store_language', but their parents are different: 'store.settings' and '' respectively. [] []
[2016-07-03 23:08:39] main.INFO: Cache file with merged layout: LAYOUT_frontend_STORE1_26f1b068ec7ccf4878f9284dd1137afd1 and handles catalog_product_prices: Please correct the XML data and try again. [] []
[2016-07-03 23:08:43] main.INFO: Cache file with merged layout: LAYOUT_frontend_STORE1_22b24c6d6a5609522924195bc1e69d26e and handles default, not_noroute_other: Please correct the XML data and try again. [] []
[2016-07-03 23:08:44] main.INFO: Cache file with merged layout: LAYOUT_frontend_STORE1_20a98983867a1770682b48d9a0ad63441 and handles 1column: Please correct the XML data and try again. [] []
[2016-07-03 23:08:44] main.CRITICAL: Broken reference: the 'currency' element cannot be added as child to 'header.panel', because the latter doesn't exist [] []
[2016-07-03 23:08:44] main.CRITICAL: Broken reference: the 'catalog.compare.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2016-07-03 23:08:44] main.CRITICAL: Broken reference: the 'sale.reorder.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2016-07-03 23:08:44] main.CRITICAL: Broken reference: the 'wishlist_sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2016-07-03 23:08:44] main.CRITICAL: Broken reference: the 'header.links' element cannot be added as child to 'header.panel', because the latter doesn't exist [] []
[2016-07-03 23:08:44] main.CRITICAL: Broken reference: the 'currency' tries to reorder itself towards 'store_language', but their parents are different: 'header.panel' and '' respectively. [] []
[2016-07-03 23:08:44] main.CRITICAL: Broken reference: the 'store.settings.currency' tries to reorder itself towards 'store_language', but their parents are different: 'store.settings' and '' respectively. [] []
[2016-07-03 23:08:44] main.INFO: Cache file with merged layout: LAYOUT_frontend_STORE1_26f1b068ec7ccf4878f9284dd1137afd1 and handles catalog_product_prices: Please correct the XML data and try again. [] []

@Ctucker9233
Copy link
Author

@JDavidVR Thanks for testing this out. So am I screwed and just need to do a clean install of 2.0.7?

@Ctucker9233
Copy link
Author

@JDavidVR where did you find that log? Do you think there is a way to programatically fixing this?
@magento-team please investigate this.

@erikhansen
Copy link
Contributor

erikhansen commented Jul 4, 2016

I'm also experiencing this issue. I upgraded Magento Enterprise 2.0.7 to 2.1. I changed the theme to the Magento/luma theme and am still not seeing the main navigation. I am using Varnish. I logged a similar issue for 2.0.x, but it was marked as fixed in 2.1: #3897 (comment)

@pboisvert
Copy link

Olena--can you have the team check this scenario?

@Ctucker9233
Copy link
Author

@tkacheva In my scenario, I am not using varnish unless it got switched on without me knowing. It wouldn't surprise me at this point. How would I make sure that varnish is not running?

@Ctucker9233
Copy link
Author

I've created my own menu as a sort of work around. Just buttons with straight links. I would still like to see this fixed as soon as possible. If it is a glitch with the upgrade procedure, the official documentation needs to change. That's what I used to arrive at this point. I can't continue to use Magento if I need to do a wipe, install new version and reimport data every time there is an upgrade. It is just not feasible.

@acidreian666
Copy link

Alright guys i have like 10 Magento 2 servers running on google cloud.
I figured out where the menu bar went well actually idk what code is stoping it from loading but...
ssh'd to my website root Dir
sudo cd /var/www/html/
run
sudo find . -type d -exec chmod 777 {} ;
&
sudo find . -type f -exec chmod 777 {} ;

Now menu is back and all permissions are messed up but its back and functional..

so where is the exact permissions required for every folder in a based 2.1 install?

@tkacheva
Copy link

tkacheva commented Jul 5, 2016

@eug123 Could you look into it?

@Ctucker9233
Copy link
Author

@acidreian666 So it's a permissions thing? Can you tell which folder is causing the problem? My site is live so I'd rather not change the permissions for every folder. It might be a security risk. Thanks for taking the time to really investigate this.

@Ctucker9233
Copy link
Author

@tkacheva or @eug123 Is there any update on a timeline for this being fixed?

@acidreian666
Copy link

acidreian666 commented Jul 5, 2016

@Ctucker9233 so I have found that my sever with
m2.1
varnish4.1
nginx-latest U
buntu 16.04
mysql-latest
php7.0.8-fpm
Permissions all = 777 files & folders of /var/www/html/
functions perfectly untill I listen to port 443 and attempted to view the site in https://example.com then the menu navigation is gone. So then using nginx-latest to reverse proxy SSL termination it opens the site and leaves things broken and not responsive. Example still no menu in https and also now no menu in http either like it was before. Ex.2 adding to cart after product search also broken. List gos and gos.but I think that aside has more to do with SSL proxy & varnish.

Also I might add I have never switched from default mode to developer or production. But I did flush cache and reindex and static deploy manually.

@Ctucker9233
Copy link
Author

@tkacheva @eug123 Any new information on this issue?

@Ctucker9233
Copy link
Author

@tkacheva @eug123 @magento-team Is there any news on this issue? It is really effecting customer experience.

@JDavidVR
Copy link
Contributor

JDavidVR commented Jul 7, 2016

I'm having this problem even in clean installation :(

@acidreian666
Copy link

@JDavidVR please list your full server setup & distribution information with components your using. I have installed and setup m21 10 times in the past 4 days with a functional navigation bar.

@Ctucker9233
Copy link
Author

@acidreian666 On any of your setups did you install 2.0.7 and then upgrade to 2.1.0? I think this is where the problem really lies.

I'm hosted on siteground.com
Apache (not sure which version)
mysql (latest)
PHP version 5.6.23
Magento 2.1.0

I've flushed all caches repeatedly. The only thing I haven't tried is to set permissions on everything to 777 like you did. I don't know if that is safe to do.

@acidreian666
Copy link

acidreian666 commented Jul 8, 2016

@Ctucker9233 Are you using Varnish or Memcached or something simular or a cloudflare or Maxcdn?
I have never used Php 5.6 because theres 30x faster speed when using php7 from my expirence.

here is the question flushing the caches meaning your running the site in Devoloper mode not production?

have you tried
sudo rm -r pub/static/*
sudo php bin/magento setup:static-content:deploy

http://devdocs.magento.com/guides/v2.0/config-guide/bootstrap/magento-modes.html

I did 1 upgrade from 2.0.7 without a problem and multiple upgrades from 2.0.6 to 2.1 without problems.
but that was only with fixing permissions.

I think after your upgrade from 2.0.7 the System upgrade does not keep permissions on the deployed files or something in the theme that causes a permission issue. thus the menu is gone.

if you had your website up and running on a cloud server or something it would be abit easier to clone it and change domain to an Ip addess using mysql commands then changing permissions to 777 to check if thats the issue your having with your offical site.

@ooples
Copy link

ooples commented Nov 11, 2016

I'm having this same issue as well. I notice that in the admin settings it gives you the option between built in cache and varnish cache and it says that varnish is recommended so I'm wondering why if this seems to be such a common issue.

@Tristan-N
Copy link

@Ctucker9233 I have the same issue, using Magento 2.1.2 on PHP 7.0.14 on Apache server.

When I switch to Built-In cache, the navbar appears again. When I found the <esi:include src="url/of/your/site" /> rule like @KevinMace mentioned, I noticed that my URL contained a lot of %22 signs, instead of the " symbol.

<esi:include src="http://site.url.here/page_cache/block/esi/blocks/[%22catalog.topnav%22]/handles/[%22default%22,%22catalog_category_view%22,%22catalog_category_view_type_layered%22,%22catalog_category_view_type_layered_without_children%22,%22catalog_category_view_id_688%22,%22catalog_category_view_layout_update_ba80f00be44c0fe6892e24d5b04c895d%22]/" /></div>

Now figuring out how to solve this. If somebody knows something, please let me know. Otherwise, I hope this helps some people out while they're debugging.

@KevinMace
Copy link
Member

@Tristan-N Have you enabled ESI in your Varnish config? That will replace this string

<esi:include src="http://site.url.here/page_cache/block/esi/blocks/[%22catalog.topnav%22]/handles/[%22default%22,%22catalog_category_view%22,%22catalog_category_view_type_layered%22,%22catalog_category_view_type_layered_without_children%22,%22catalog_category_view_id_688%22,%22catalog_category_view_layout_update_ba80f00be44c0fe6892e24d5b04c895d%22]/" /

with the correct content (in this instance, the navigation)

@KevinMace
Copy link
Member

KevinMace commented Dec 12, 2016

@Tristan-N in your default.vcl, you should have a section like below. Have you moved the Magento generated .vcl in to your server's Varnish directory?

if (beresp.http.content-type ~ "text") { set beresp.do_esi = true; }

@Tristan-N
Copy link

@KevinMace No, in the Varnish config folder there is a config file dat includes the vcl file from the Magento folder.

@Jilco
Copy link

Jilco commented Dec 23, 2016

@KevinMace have you already figured out how to do this? Or anybody else? I'm facing the same issues afte migration from 1.9.2.4 to 2.1.3. The navigation bar is missing, also with a normal HTTP request. I'm not able to modify varnish settings in Core Magento, or am I wrong? Magento is using a build in version of Varnish in my understanding.

@joe2010
Copy link

joe2010 commented Dec 30, 2016

@plhbbillygarcia
Copy link

Hello does anyone have any solutions to the above. I am at my wits end with 2.1. I am managing a project with over 5000 items and my clients work flow is halted because of this navigation search bar issue. We moved from 1.9 to 2.1.2 5.7 for MYSQL and 5.6.5 for PHP. We are so upset with this new version.. Any help would be great.

@timstoel
Copy link

The solution is staying on Magento 1.9 and waiting it out on Magento 2. We spent a lot of time and money on Magento 2 and had to roll back to 1.9.

@plhbbillygarcia
Copy link

plhbbillygarcia commented Jan 24, 2017

Yes I wish.... But the investment on my clients end is too deep. We can't role back now. The team that is working on this are having a hard time and I am as well.. Can anyone give me an idea of how to approach a solution. I have a team that can build what is needed but they need direction. We are far too into this with all variables and can't hit brakes... I would like to help write code to fix this stupid shit somehow... Thank you all for reading and hopefully writing..
Smiles
Billy

@Jilco
Copy link

Jilco commented Jan 24, 2017 via email

@timstoel
Copy link

@plhbbillygarcia Unfortunately Magento 2 is just not production ready. I would imagine by the time your client pays to fix everything that is broken, Magento 2 will be further along. I can't see taking a lone ranger type mission on trying to fix the many, many issues with Magento 2. It sounds like your client has an unrealistic expectation for Magento 2 at this time and you may need to educate them on the issues at hand.

@dvershinin
Copy link

To anyone experiencing this issue with Varnish and already added -p feature=+esi_ignore_https to your Varnish configuration, the following are correct steps to fix:

  1. enable developer mode in Magento
  2. enable display of PHP error logs, if that is disabled system wide (php_admin_value)
  3. navigate to your page and identify the PHP fatal error in place of navigation area
  4. edit corresponding PHP file to fix.

In my case error was with Magestore Giftvoucher plugin.

Basically a fatal PHP error may occur only while Varnish is in use (ESI processing) and may not be experience otherwise. Not all the plugins are Varnish-ready.

@mttjohnson
Copy link

@dvershinin
To add some additional options to use when checking for Varnish specific issues and ESI includes I have found it useful to use curl to simulate a specific backend request from Varnish.

I have a gist with some example commands, and brief comments.

Using varnishlog you can see all the necessary header information you'd need to makes calls to the backend HTTP server the same way Varnish is, and then set the HTTP header details with curl on the command line.

This can provide some additional insight to what Varnish is receiving, or trying to request before it removes headers, combines ESI includes, and responds to the browser. It can also be useful to test the infrastructure behind Varnish and know you aren't getting a cached hit from Varnish, or have to clear the Varnish cache.

@shoaibrehman
Copy link

Hey guys,

I had the same issue with one of my clients and after going through this entire thread here, I can conclude that it is the varnish configuration issue.

I spoke to my hosting company and they confirmed that Varnish was only configured to support HTTP requests. They configured varnish for HTTPS as well and everything is working fine now.

@dunarri
Copy link

dunarri commented Feb 26, 2017

I've circled back to this after installing the latest Magento 2.1.5 and it would appear it is resolved.

@rgoncharuk
Copy link

@Ctucker9233 internal MAGETWO-55189 closed as Won`t Fix. As I understood you agreed that the upgrade way mentioned in the description can not be used. Improvements into documentation can be created as PR to https://github.com/magento/devdocs Feel free to connect the Community Engineering team for support on that PR

@Ctucker9233
Copy link
Author

@rgoncharuk Thanks, although that is disappointing to hear. It is clear that other people that have commented on this thread have a similar issue and it clearly is not a documentation issue. I have since resolved the issue by separating my multi-site into two independent ones. If nothing else, the documentation for setting up multi-sites should be reviewed and revised by the Magento Team seeing as how you(Magento) created it and not me.

@moejoee91
Copy link

Hello everyone,
im having something similar to this and it's driving me crazy, all of a sudden my nav-bar was gone, and im not even using varnish, i'm using the built in cache, all i did right before this happened is i did setup cloudflare and it went down hill from there
any ideas what might be causing the problem ?

@magento-engcom-team magento-engcom-team added the Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed label Dec 13, 2017
@Ctucker9233
Copy link
Author

@moejoee91 Try disabling Cloudflare and see if it changes anything.

@AdamReece-WebBox
Copy link

This still doesn't work today. I've tried:

  • Removal of all cache folder content (pub/static, var/cache, var/generation, var/page_cache, and var/view_preprocessed)
  • Removal of all vendor folder content
  • composer update
  • php bin/magento setup:upgrade
  • php bin/magento setup:di:compile
  • php bin/magento setup:static-content:deploy

All ran successfully, but still no navbar.

It appears that ESI tags are not being processed, which is required for the navbar.

This is on a cPanel based hosting account without any Varnish caching. (Magento 2.1.8, PHP 7.0.31)

@dvershinin
Copy link

@AdamReece-WebBox in absence of Varnish, nothing can do ESI processing on a cPanel server.

@AdamReece-WebBox
Copy link

Hi @dvershinin,

It appears that the agency that gave us the project to deploy didn't tell us that Varnish cache was enabled in Magento's settings.

Switching this to use Magento's built-in cache resolved the issue. (ESIs process as intended now.)

@ftudlong
Copy link

ftudlong commented Sep 3, 2018

But can you switch back to varnish after resolving the issue?

@AdamReece-WebBox
Copy link

Would there be much benefit in that? I don't really want to disrupt a live store, particularly as it's already performing very well with the built in cache.

magento-engcom-team pushed a commit that referenced this issue Mar 7, 2020
[tango] MC-23890: 2.3 Customer module Recurring setup script performance problems.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Frontend bug report Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development
Projects
None yet
Development

No branches or pull requests