Discussion:
[TYPO3-english] Bug in TMENU with HMENU special=directory?
Xavier Perseguers
2009-05-29 20:55:51 UTC
Permalink
Hi,

I have following tree:

root
|-- page1
| `-- page1.1
| `-- page1.1.1
|-- page2
| `-- page2.1
`-- sysfolder
|-- page3
| `-- page3.1
| `-- page3.1.1
`-- page4

I have create a menu with

lib.menu = HMENU
lib.menu.1 = TMENU
lib.menu.1 {
expAll = 0
# standard stuff for menu
}
lib.menu.2 < lib.menu.1
lib.menu.3 < lib.menu.2

It shows me

page1
page2

Then when I click on page1 it shows me next level:

page1
page1.1
page2

And finally when I click on page1.1 it shows me third level. Great.

Now I have a special menu for pages under my sysfolder (uid=12):

lib.otherMenu = HMENU
lib.otherMenu.special = directory
lib.otherMenu.special.value = 12

lib.otherMenu.1 = TMENU
lib.otherMenu.1 {
expAll = 0
# same stuff as for lib.menu.1
}
lib.otherMenu.2 < lib.otherMenu.1
lib.otherMenu.3 < lib.otherMenu.2

Using special=directory only shows me 1st level, 2nd level is never shown.

If I change lib.otherMenu.1.expAll = 1, then I see all levels but that's
not what I want...
--
Xavier Perseguers
http://xavier.perseguers.ch/en

One contribution a day keeps the fork away
StephenBungert
2009-05-29 22:01:47 UTC
Permalink
I believe special = directory works this way, I don't think it checks for
sub-menus.

-----
--
Stephen Bungert
--
View this message in context: http://www.nabble.com/-TYPO3-english---Bug-in-TMENU-with-HMENU-special%3Ddirectory--tp23786984p23787719.html
Sent from the TYPO3 English mailing list archive at Nabble.com.
Xavier Perseguers
2009-05-30 07:19:49 UTC
Permalink
Post by StephenBungert
I believe special = directory works this way, I don't think it checks for
sub-menus.
Well, my first menu is able to detect that there is subpages with
(ACTIFSUB and other related options). expAll = 1 shows other pages. I
don't understand why I could not use it as a standard menu that starts
with a given page.
--
Xavier Perseguers
http://xavier.perseguers.ch/en

One contribution a day keeps the fork away
Xavier Perseguers
2009-05-30 08:16:12 UTC
Permalink
Hi,
Post by Xavier Perseguers
Post by StephenBungert
I believe special = directory works this way, I don't think it checks for
sub-menus.
Well, my first menu is able to detect that there is subpages with
(ACTIFSUB and other related options). expAll = 1 shows other pages. I
don't understand why I could not use it as a standard menu that starts
with a given page.
Actually *there is* a bug when using mount points. I'm trying to track
it down. Again, if I have this tree (slightly modified from initial
post, I added a MP):

root
|-- [1] page1
| `-- [2] page1.1
| `-- [3] page1.1.1
|
|-- [4] page2
| `-- [5] page2.1
|
|-- [6] pageMP (--> 7)
|
`-- [7] sysfolder
|-- [8] page3
| `-- [9] page3.1
| `-- [10] page3.1.1
|
`-- [11] page4

If I generate a menu with

----------------------
lib.otherMenu = HMENU
lib.otherMenu.special = directory
lib.otherMenu.special.value = 1

lib.otherMenu.1 = TMENU
lib.otherMenu.1 {
expAll = 0
# standard menu stuff with ACT, NO, IFSUB, ...
}
lib.otherMenu.2 < lib.otherMenu.1
lib.otherMenu.3 < lib.otherMenu.2
----------------------

I get a menu with page1.1 (2). If I activate it, I see next nevel
(page1.1.1 uid 3).

If I change entry point and set

lib.otherMenu.special.value = 6

I get a menu with page3 (8) and page 4 (11) but when I activate page3
(8), I don't get page3.1 (9).
--
Xavier Perseguers
http://xavier.perseguers.ch/en

One contribution a day keeps the fork away
Xavier Perseguers
2009-05-30 08:21:08 UTC
Permalink
Hi,
Post by Xavier Perseguers
Post by Xavier Perseguers
Post by StephenBungert
I believe special = directory works this way, I don't think it checks for
sub-menus.
Well, my first menu is able to detect that there is subpages with
(ACTIFSUB and other related options). expAll = 1 shows other pages. I
don't understand why I could not use it as a standard menu that starts
with a given page.
Actually *there is* a bug when using mount points. I'm trying to track
it down. Again, if I have this tree (slightly modified from initial
line 330 of class.tslib_menu.php:

// Notice: The automatic expansion of a menu is designed to work only
when no "special" modes (except "directory") are used.

But actually it does work when no MP is involved...
--
Xavier Perseguers
http://xavier.perseguers.ch/en

One contribution a day keeps the fork away
Xavier Perseguers
2009-05-30 08:28:53 UTC
Permalink
Post by Xavier Perseguers
// Notice: The automatic expansion of a menu is designed to work only
when no "special" modes (except "directory") are used.
But actually it does work when no MP is involved...
I read it wrong. Actually it should work. Great! It won't be a feature
request but a bug request ;-)
--
Xavier Perseguers
http://xavier.perseguers.ch/en

One contribution a day keeps the fork away
Xavier Perseguers
2009-05-30 09:25:58 UTC
Permalink
Post by Xavier Perseguers
Actually *there is* a bug when using mount points. I'm trying to track
it down. Again, if I have this tree (slightly modified from initial
root
|-- [1] page1
| `-- [2] page1.1
| `-- [3] page1.1.1
|
|-- [4] page2
| `-- [5] page2.1
|
|-- [6] pageMP (--> 7)
|
`-- [7] sysfolder
|-- [8] page3
| `-- [9] page3.1
| `-- [10] page3.1.1
|
`-- [11] page4
If I generate a menu with
----------------------
lib.otherMenu = HMENU
lib.otherMenu.special = directory
lib.otherMenu.special.value = 1
lib.otherMenu.1 = TMENU
lib.otherMenu.1 {
expAll = 0
# standard menu stuff with ACT, NO, IFSUB, ...
}
lib.otherMenu.2 < lib.otherMenu.1
lib.otherMenu.3 < lib.otherMenu.2
----------------------
I get a menu with page1.1 (2). If I activate it, I see next nevel
(page1.1.1 uid 3).
If I change entry point and set
lib.otherMenu.special.value = 6
I get a menu with page3 (8) and page 4 (11) but when I activate page3
(8), I don't get page3.1 (9).
Seems to be something like that:

http://bugs.typo3.org/view.php?id=10439
--
Xavier Perseguers
http://xavier.perseguers.ch/en

One contribution a day keeps the fork away
Xavier Perseguers
2009-05-30 13:12:10 UTC
Permalink
FYI: Bug report created, patch available:
http://bugs.typo3.org/view.php?id=11224

Patch will be pending in core list in a few minutes.
--
Xavier Perseguers
http://xavier.perseguers.ch/en

One contribution a day keeps the fork away
Andreas Burg
2009-06-05 18:17:28 UTC
Permalink
Xavier
Post by Xavier Perseguers
root
|-- page1
| `-- page1.1
| `-- page1.1.1
|-- page2
| `-- page2.1
`-- sysfolder
|-- page3
| `-- page3.1
| `-- page3.1.1
`-- page4
change your sysfolder to a shortcut, then your menu behaves like you want.
--
Andreas

Mailing list rules & guidelines (Mailing list Regeln & Leitfaden):
http://typo3.org/community/mailing-lists/
http://typo3.org/community/mailing-lists/mailing-list-rules-guidelines/
Xavier Perseguers
2009-06-07 16:42:16 UTC
Permalink
Hi Andreas,
Post by Andreas Burg
Post by Xavier Perseguers
root
|-- page1
| `-- page1.1
| `-- page1.1.1
|-- page2
| `-- page2.1
`-- sysfolder
|-- page3
| `-- page3.1
| `-- page3.1.1
`-- page4
change your sysfolder to a shortcut, then your menu behaves like you want.
I thought this kind of trick would solve the problem. However, the patch
is easily done and it's a bug that should be fixed.

Thanks anyway.
--
Xavier Perseguers
http://xavier.perseguers.ch/en

One contribution a day keeps the fork away
Andreas Burg
2009-06-08 00:25:08 UTC
Permalink
Xavier
Post by Xavier Perseguers
I thought this kind of trick would solve the problem. However, the patch
is easily done and it's a bug that should be fixed.
I agree, that a bug has to be fixed in any case.
--
Andreas

Mailing list rules & guidelines (Mailing list Regeln & Leitfaden):
http://typo3.org/community/mailing-lists/
http://typo3.org/community/mailing-lists/mailing-list-rules-guidelines/
David Bruchmann
2009-06-07 17:06:44 UTC
Permalink
Hi Xavier,

I've never had the idea to create a pagetree under sysfolders.
I saw this in some foreign installations and was a bit astonished about
that.
It's nice beeing able to create compatible Menus after your patch but
the sense of this combination still is not clear for me.

Regards
David
Xavier Perseguers
2009-06-07 18:42:22 UTC
Permalink
Hi David,
Post by David Bruchmann
Hi Xavier,
I've never had the idea to create a pagetree under sysfolders.
I saw this in some foreign installations and was a bit astonished about
that.
It's nice beeing able to create compatible Menus after your patch but
the sense of this combination still is not clear for me.
A shortcut does not make any sense for me. I have a page tree with many
websites under the world root.

Now, I want some pages to be shared among websites (aka domains). For
instance login page, impressum, help, contact, and other "intranet"
pages with data only shown when logged in.

What I do for these later is to create an "Intranet" mount page in each
website whose target is the sysfolder containing my shared pages. Why
would I create a a shortcut? I mean, perhaps it works, OK, but a
sysfolder is a repository for some stuff and my stuff are pages in this
case. Why would I use a shortcut page or even a standard page? Logically
it does not make sense to me.
--
Xavier Perseguers
http://xavier.perseguers.ch/en

One contribution a day keeps the fork away
David Bruchmann
2009-06-07 19:39:25 UTC
Permalink
----- Urspr?ngliche Nachricht -----
Von: Xavier Perseguers <typo3 at perseguers.ch>
Gesendet: Sonntag, 7. Juni 2009 20:42:22
An: typo3-english at lists.netfielders.de
CC:
Betreff: Re: [TYPO3-english] Bug in TMENU with HMENU special=directory?
Post by Xavier Perseguers
Hi David,
Post by David Bruchmann
Hi Xavier,
I've never had the idea to create a pagetree under sysfolders.
I saw this in some foreign installations and was a bit astonished about
that.
It's nice beeing able to create compatible Menus after your patch but
the sense of this combination still is not clear for me.
A shortcut does not make any sense for me. I have a page tree with many
websites under the world root.
Now, I want some pages to be shared among websites (aka domains). For
instance login page, impressum, help, contact, and other "intranet"
pages with data only shown when logged in.
What I do for these later is to create an "Intranet" mount page in each
website whose target is the sysfolder containing my shared pages. Why
would I create a a shortcut? I mean, perhaps it works, OK, but a
sysfolder is a repository for some stuff and my stuff are pages in this
case. Why would I use a shortcut page or even a standard page? Logically
it does not make sense to me.
Hi Xavier,

I didn't propose the solution with the shortcut so don't fix me at this
point ;-) But you are free to use normal pages instead.

Normally I add Sysfolders as Storage for administrative elements. Even
if there are stored content-elements or users I have a special folder
where rights can be set either by elements or by directory.
Mixing up those folders with content-pages is an option and perhaps it
makes sense in some cases but this concept is new to me because I
strictly separated mentioned elements, in other words: sysfolders I use
for elements that are independent from pagetree, for content or viewable
pages that means it has to be included by other elements in active pagetree.

Best Regards
David
Andreas Burg
2009-06-08 00:35:34 UTC
Permalink
Xavier
Post by Xavier Perseguers
What I do for these later is to create an "Intranet" mount page in each
website whose target is the sysfolder containing my shared pages. Why
would I create a a shortcut? I mean, perhaps it works, OK, but a
sysfolder is a repository for some stuff and my stuff are pages in this
case. Why would I use a shortcut page or even a standard page? Logically
it does not make sense to me.
perhaps it's because every webpage needs a rootline, and if you create a pagetree within a
sysfolder, there is no rootline because the sysfolder cuts it of. By using a mountpoint later, you
complete this missing rootline.
--
Andreas

Mailing list rules & guidelines (Mailing list Regeln & Leitfaden):
http://typo3.org/community/mailing-lists/
http://typo3.org/community/mailing-lists/mailing-list-rules-guidelines/
JoH asenau
2009-06-08 13:45:23 UTC
Permalink
Post by Andreas Burg
perhaps it's because every webpage needs a rootline, and if you
create a pagetree within a sysfolder, there is no rootline because
the sysfolder cuts it of. By using a mountpoint later, you complete
this missing rootline.
AFAIK it's just vice versa: The mountpoint doesn't complete anything and the
rootline is missing due to the fact that the pages are not located within
the same page tree.
With no rootline available at all, the automatic expansion of sublevels
won't work, because it is using "entryLevel" internally.
This is necessary to change the default behaviour of "special" HMENU types,
that are usually not supporting automatic expansion at all, and it will work
for "directory" only.

HTH

Joey
--
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your gob sometimes!)
Dieter Nuhr, German comedian
Xing: http://contact.cybercraft.de
Twitter: http://twitter.com/bunnyfield
TYPO3 cookbook (2nd edition): http://www.typo3experts.com
TYPO3 workshops: http://workshops.eqony.com
Xavier Perseguers
2009-06-08 15:40:06 UTC
Permalink
Hi,
Post by JoH asenau
Post by Andreas Burg
perhaps it's because every webpage needs a rootline, and if you
create a pagetree within a sysfolder, there is no rootline because
the sysfolder cuts it of. By using a mountpoint later, you complete
this missing rootline.
AFAIK it's just vice versa: The mountpoint doesn't complete anything and the
rootline is missing due to the fact that the pages are not located within
the same page tree.
With no rootline available at all, the automatic expansion of sublevels
won't work, because it is using "entryLevel" internally.
This is necessary to change the default behaviour of "special" HMENU types,
that are usually not supporting automatic expansion at all, and it will work
for "directory" only.
special HMENU work really great with automatic expansion, I explained it
in my bug report. Only the combination of mount point and sysfolder make
it fail.
--
Xavier Perseguers
http://xavier.perseguers.ch/en

One contribution a day keeps the fork away
JoH asenau
2009-06-08 16:12:53 UTC
Permalink
Post by Xavier Perseguers
special HMENU work really great with automatic expansion, I explained
it in my bug report. Only the combination of mount point and
sysfolder make it fail.
According to the comments in core only special=directory does.
Maybe I have been missing something , but AFAIK this has not been changed
recently.

And to explain it more detailed:
If you are using a sysfolder that is not part of the page tree of a certain
domain/root, there is no way to activate automatic expansion regardless if
you are using a mount point or not.

Example:
Create a sysfolder and a rootpage on the same level.
Create trees for both, the sysfolder and the rootpage.
Now setup a TS menu that i using
special=directory
special.value = 123
with 123 being the uid of the sysfolder.

If you use this menu on one of the pages located in your rootpage-tree, it
simply can't expand automatically, because it is not part of the page tree
and thus can't "know"
a) about the domain used by this particular page tree
b) the root page used by this particular domain
c) the "level" (based on the original root page) of the page currently shown

You don't need to use a mount point to trigger this behaviour, since by
design it should be enough to just place the sysfolder outside of the
rootline.

But maybe I am still missing something.

Joey
--
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your gob sometimes!)
Dieter Nuhr, German comedian
Twitter: http://twitter.com/bunnyfield
Xing: http://contact.cybercraft.de
T3 cookbook (2nd edition): http://www.4any1.de
TYPO3 Schulung: http://workshops.eqony.com
Loading...