Bug #17158
closedHMENU doesn't work with special=userfunction and expAll
0%
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
Updated by Alexander Opitz over 11 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)?
Updated by Bas van Beek about 11 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.
Updated by Alexander Opitz almost 11 years ago
- Category set to Frontend
- Status changed from Needs Feedback to New
Updated by Benni Mack over 9 years ago
- Is Regression set to No
hey, could you provide a patch for 6.2/master?
Updated by Benni Mack over 9 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.
Updated by Alexander Opitz about 9 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.
Updated by Morten Pless almost 9 years ago
- File pagetree.png pagetree.png added
- File template-setup.txt template-setup.txt added
- File genericfunctions.php genericfunctions.php added
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
Updated by Felix Richter over 7 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.
Updated by Riccardo De Contardi over 7 years ago
- Status changed from Closed to New
Updated by Sybille Peters over 6 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!
Updated by Benni Mack over 5 years 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.
Updated by Riccardo De Contardi about 5 years 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