cuny-academic-commons / commons-in-a-box

Commons In A Box - A suite of community and collaboration tools for WordPress, designed especially for academic communities
http://commonsinabox.org
72 stars 14 forks source link

OpenLab Bug- If headers are not shown to logged out users on a subsite, footer is duplicated twice #437

Closed beckej13820 closed 1 year ago

beckej13820 commented 1 year ago

I'm seeing a bug when we use the option not to display the global header to all users.

To replicate:

  1. Create a subsite (I've replicated on both projects and portfolios)
  2. Under Site Settings, uncheck "Show WordPress Admin Bar to non-logged-in users to my site.
  3. Visit the site logged in. When you are logged in, the universal footer appears correctly.
  4. Visit the site logged out or in an incognito window. When you are logged out, the universal footer is not styled correctly, and is repeated twice.

Here are two screenshots. In screenshot 1, as a logged in user, the footer is displayed as expected.

Screenshot 2023-04-21 125537

In screenshot 2, as a logged-out-user, no header is displayed as expected, but the footer is displayed twice, and the columns are broken.

Screenshot 2023-04-21 125811

boonebgorges commented 1 year ago

Thanks for the detailed report. The necessary styles for rendering the footer are bundled with the styles for the header/toolbar, and were loaded on the add_admin_bar_menus hook as part of the OpenLab_Admin_Bar class. When the toolbar is turned off, this hook never fires. I've made a change in https://github.com/cuny-academic-commons/cbox-openlab-core/commit/306141c81e2f26056853848356db48807e3933dd so that these styles are always loaded.