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

Showing previously in menu hidden pages needs cache flush #115

Open
jonakieling opened this issue Mar 28, 2025 · 0 comments
Open

Showing previously in menu hidden pages needs cache flush #115

jonakieling opened this issue Mar 28, 2025 · 0 comments

Comments

@jonakieling
Copy link

Hello there,

setting nav_hide to 1 invalidates cache and the page is no longer shown in the menu.

ISSUE: setting nav_hide back to 0, the page is still hidden.

Versions

TYPO3 12.4.28
b13/menu 1.1.2

Context

This is my test setup with a clean TYPO3 installation.

backend

- ROOT [0]
 - Home [1]
  - Subpage [2]
   - Nested Subpage [3]
  - Subpage2 [4]
   - Nested Subpage2 [5]

frontend

- Subpage [2]
 - Nested Subpage [3]
  - Subpage2 [4]
   - Nested Subpage2 [5]

typoscript

# Default PAGE object:
page = PAGE
page.10 = COA_INT
page.10 {
  10 = TREEMENU
  10.entryPoints = 1
  10.depth = 2
  10.includeNotInMenu = 0
  10.renderObj.level0 = TEXT
  10.renderObj.level0.typolink.parameter.data = field:uid
  10.renderObj.level0.typolink.ATagParams = class="active"
  10.renderObj.level0.typolink.ATagParams.if.isTrue.field = isInRootLine
  10.renderObj.level0.dataWrap = <li class="firstLevel">|<ul>{field:subpageContent}</ul></li>
  
  10.renderObj.level1 = TEXT
  10.renderObj.level1.typolink.parameter.data = field:uid
  10.renderObj.level1.typolink.ATagParams = class="active"
  10.renderObj.level1.typolink.ATagParams.if.isTrue.field = isInRootLine
  10.renderObj.level1.dataWrap = <li class="firstLevel">|<ul>{field:subpageContent}</ul></li>
  
  10.renderObj.level2 = TEXT
  10.renderObj.level2.typolink.parameter.data = field:uid
  10.renderObj.level2.typolink.ATagParams = class="active"
  10.renderObj.level2.typolink.ATagParams.if.isTrue.field = isInRootLine
  10.renderObj.level2.dataWrap = <li class="firstLevel">|<ul>{field:subpageContent}</ul></li>
  
  20 = TEXT
  20.value = Hello World!
}

This is the in-project setup that does not work (sidenote: only top-level pages stay hidden, subpages are correctly displayed, haven't figured out why yet)

page = PAGE
page {
  10 = FLUIDTEMPLATE
  10 {
    dataProcessing {
      10 = B13\Menus\DataProcessing\TreeMenu
      10.entryPoints = 1
      10.as = mainNavigation
      10.depth = 2
    }
  }
}

Findings and Debug

When I talk about a page being shown or not shown I always set nav_hide on this page. This report does not talk about subpages being hidden, when parent pages are changed.

When includeRootPages is set to 1 in the above example, pages Subpage [1] and Subpage2 [4] are correctly shown again, when setting nav_hide to 0. Nested Subpage [3] and Nested Subpage2 [5] still stay hidden, when setting nav_hide back to one.

When includeRootPages is set to 0 all pages have the cache invalidation issue (except in our project, see sidenote above)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant