benjaminkott / bootstrap_package

Bootstrap Package delivers a full configured theme for TYPO3, based on the Bootstrap CSS Framework.
https://www.bootstrap-package.com/
MIT License
336 stars 202 forks source link

Navbar not loading all navbar-items #968

Closed RhoKappa closed 3 years ago

RhoKappa commented 3 years ago

Navbar not loading all navbar-items

Prerequisites

Description

The navbar-item "Home" is not being loaded on pages <> Home as well as the main logo AND the inverted logo are both loaded/displayed (instead of just one). I tested all kind of settings in the template constants (especially "Bootstrap Package: Navigation" & "Logo"); however, without success.

Steps to Reproduce

  1. show the root page (home) in preview mode, check main navigation on top
  2. show any other page in preview mode, check main navigation on top

Expected behavior

An the root page (home) and especially on all other pages, the navbar-item "home" should be visible/selectable. On all pages, the menu bar should display just one logo, either the normal logo or the inverted logo, but not both.

Actual behavior

On the "Home" page, all navbar-items are loaded, but once another page is selected, "home" is missing in the navbar-items. Furthermore, when any other page than "home" is selected/active, both the logo AND the inverted logo are both loaded/displayed (instead of just one).

Screenshots

Versions

Typo3 9.5.24 Introduction Package 4.0.1 Bootstrap Package 10.0.9 using Firefox 85.0

gilbertsoft commented 3 years ago

I've checked the default behavior of ext:introduction using my demo https://github.com/GsTYPO3/typo3-introduction#typo3-cms-introduction-package-with-ddev-local and it works just fine.

So it's most probably related to a change you did. Without more information about your changes I'm not able to say more at the moment.

Here some examples of the default behavior: grafik grafik grafik grafik

RhoKappa commented 3 years ago

Hi gilbertsoft, thanks for checking. Attached is how my navbar looks on pages other than Home. T3_navbar_bug_01 T3_navbar_bug_02

Actually, the only steps I did before the error ocured were: installing the bootstrap package, installing the introduction package and the extension "dp_cookieconsent" (10.6.1), i.e. no other changes. But maybe it was caused by the cookieconsent extension. So, I'll try to re-install Typo3 just with the Bootstrap and Introduction Package. Let's see.

rumpfwerk commented 3 years ago

Hello RhoKappa, I think you do not to have to reinstall things. Just deinstall the cookie-Extension and clear all caches (for security, that this is done).

RhoKappa commented 3 years ago

Hello rumpfwerk & thanks for the tip. I first deactivated "dp_cookieconsent" and then removed it, unfortunately with no effect, even after flushing all Typo 3 & PHP caches. Then I also cleared persistent database tables, again with no effect. I guess re-installing v. 9.5 will also not help, since with the previous v. 8.7 I had the same issue. I will upgrade my PHP version (7.2 > 7.4), re-install Typo3, Bootstrap and Introduction package and then we'll see what happens. Otherwise I'll probably have to learn Fluid and adapt the template (..\bootstrap_package\Resources\Private\Partials\Page\Navigation\main.html)...

rumpfwerk commented 3 years ago

Hello RhoKappa, I do not think, that it depends on the PHP-Version https://typo3.org/cms/roadmap

Learning Fluid is always a goog thing ;-), but the Bootstrap-Package should work "out of the box". I am only guessing: BTP has an integrated SASS-Compiler, that produces the css. It looks for me, that the error is related to css (and the inverted logo covers the home-button) perhaps missing write-conditions somewhere

RhoKappa commented 3 years ago

OK, thanks. I've got a solution now without learning Fluid ;-) I installed Typo3 10.4.11 with Bootstrap Package 11.0.2 and Introduction Package 4.2.0 Now it works :-)

gilbertsoft commented 3 years ago

This issue is related to CSS most probably. So it looks like you somehow have messed up your SCSS files. It's also very important if you are in composer mode or not. The SCSS compiler has some issues in composer mode and with a sitepackage.

RhoKappa commented 3 years ago

Hm, actually I did not touch the CSS itself, but maybe the template editor does not fill the CSS in the right way or sequence. I don't know whether I am in composer mode or not: how do I see or change that?

And unfortunately I was pleased too quickly after I installed Typo3 10.4.11 with Bootstrap Package 11.0.2 and Introduction Package 4.2.0: the error now occured again and I am not able to correct it. At least I can reproduce the error now

I am stuck now :-( Any idea how the CSS is created correctly from the Template constants as in the pristine bootstrap/ introduction package?

RhoKappa commented 3 years ago

Checking the site with the Code Inspector, I found that this time the navbar is OK on the HOME page as well as on the FEATURES page and the CONTENT EXAMPLES pages, but not on the CUSTOMIZE page and the PAGES page. It may also be an error in the fluid template, not (just) in the CSS (?). Last time the navbar error occured on all pages apart from HOME. Please see the code inspector screenshops from the HOME page: Home FEATURES page: Features CUSTOMIZE page (with error: not HOME page link): Customize

RhoKappa commented 3 years ago

OK, flushing all Typo3 & PHP caches several (!) times lead to the desired behaviour - navbar loads properly now! :-) Still, rendering the final page with navbar etc. seems to be quite erratic. Anyway, for the time being, I can cope with the result. Thanks for your help!

rumpfwerk commented 3 years ago

@RhoKappa Do not know, if it causing you problems, but I hat some probs with the constant (BTP-config) [config.sendCacheHeaders]

It controls via http-header the caching behaviour of the browser and this feature under some circumstances causes old sites (from browser-cache) in your browser (refreshing is without "hard" refresh) Thanks for the detailed sharing of your issues.