Bug #17158

HMENU doesn't work with special=userfunction and expAll

Added by Raphael GEYER over 13 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Frontend
Target version:
-
Start date:
2007-03-27
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
7
PHP Version:
5.6
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

The generated menu displays sub-pages for each item which doesn't have a _SUB_MENU entry in the given menuArr.
The added sub-pages are taken from the page tree.

This behaviour can be reproduced by using the function makeMenuArray from the TSref and some TS code like the following (you need also to have some pages created at level 1) :

includeLibs.tx_ameos_navigation = fileadmin/class.tx_ameos_navigation.php

lib.menu_haut = HMENU
lib.menu_haut {
entryLevel = 0
special = userfunction
special.userFunc = tx_ameos_navigation->makeMenuArray

1 = TMENU
1 {
expAll = 1
NO.allWrap = 1>|<br>
}
2 = TMENU
2 {
expAll = 1
NO.allWrap = 2->|<br>
}
3 = TMENU
3 {
expAll = 1
NO.allWrap = 3-->|<br>
}

}

The joined patch adds a new test which allows the the generation of the sub pages only if there is a _SUB_MENU entry.

Is this the right way to correct this or are there any hidden things ?
I'm not sure everything is right this way because start and makeMenu should use the HMENU array and also check for _SUB_MENU and this is not the case ...
(issue imported from #M5304)


Files

ameos_menu.patch (853 Bytes) ameos_menu.patch Administrator Admin, 2007-03-27 12:26
pagetree.png (41.7 KB) pagetree.png Morten Pless, 2015-10-15 15:53
template-setup.txt (637 Bytes) template-setup.txt Morten Pless, 2015-10-15 15:53
genericfunctions.php (1.84 KB) genericfunctions.php Morten Pless, 2015-10-15 15:53
#1

Updated by Alexander Opitz over 7 years ago

  • Status changed from New to Needs Feedback
  • Target version deleted (0)

The issue is very old, does this issue exists in newer versions of TYPO3 CMS (4.5 or 6.1)?

#2

Updated by Bas van Beek over 7 years ago

When creating 3 levels of menu items by a custom PHP script the third level displays also menu items that are coming from standard TYPO3 pages (from the root line).

After manually patching the file typo3/sysext/cms/tslib/class.tslib_menu.php the issue has been resolved.

This is issue is happening in TYPO3 4.5.29. Not yet tested 4.7 branch.

#3

Updated by Alexander Opitz over 7 years ago

  • Category set to Frontend
  • Status changed from Needs Feedback to New
#4

Updated by Benni Mack almost 6 years ago

  • Is Regression set to No

hey, could you provide a patch for 6.2/master?

#5

Updated by Benni Mack almost 6 years ago

  • Status changed from New to Needs Feedback

Hey,

can you recheck this please with the current master?

Just from reading, the userfunction needs to deliver the right information so the TYPO3 Core code knows that a submenu is available for an item.

#6

Updated by Alexander Opitz over 5 years ago

  • Status changed from Needs Feedback to Closed

No feedback within the last 90 days => closing this issue.

If you think that this is the wrong decision or experience this issue again, then please write to the mailing list typo3.teams.bugs with issue number and an explanation or open a new ticket and add a relation to this ticket number.

#7

Updated by Morten Pless about 5 years ago

I think this bug should be fixed.
There is no point having special = userfunction if it doesn't behave.

I have attached files to help you reproduce this faulty behaviour in a clean 6.2.15 install

#8

Updated by Felix Richter almost 4 years ago

  • Priority changed from Should have to Must have
  • TYPO3 Version changed from 4.1 to 7
  • PHP Version changed from 4.3 to 5.6

This bug is present in 7.6.15 again.
I am rendering an menu with the array provided by my userfunction. If array entry with key _SUB_MENU is empty, Typo3 ignores this and renders subpages into the menu, that exist in the page tree. So in my case there are pages in the menu, that should not be there.

#9

Updated by Riccardo De Contardi almost 4 years ago

  • Status changed from Closed to New
#10

Updated by Sybille Peters over 2 years ago

Thank you for your report.

Even though it has been some time, would you consider checking if your patch idea is still up to date and upload it to our Gerrit review server?

Someone could do this for you, but I am thinking you might like the opportunity to contribute to TYPO3 yourself.

You can find a description of the TYPO3 contribution workflow here: https://docs.typo3.org/typo3cms/ContributionWorkflowGuide/

Hint: If you get stuck anywhere, ask on Slack in the #typo3-cms-coredev channel. You can register in the TYPO3 slack workspace here: https://forger.typo3.com/slack

Also, if your issue is no longer reproducable, please let us know in the slack channel, so that this issue can be closed.

Thank you in advance!

#11

Updated by Benni Mack over 1 year ago

  • Status changed from New to Needs Feedback

Hey everybody,

IMHO this is fixed in v9 (and probably before), can you please confirm this?

Looking at the code this is now taken into account.

#12

Updated by Riccardo De Contardi over 1 year ago

  • Status changed from Needs Feedback to Closed

No feedback since the last 90 days => closing this issue.

If you think that this is the wrong decision or experience the issue again and have more information about how to reproduce your problem, please reopen it or ping me.

Thank you and best regards

Also available in: Atom PDF