-
Notifications
You must be signed in to change notification settings - Fork 127
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
URLs with parent "menu seperator" are not decoded when logged in into Backend #54
Comments
Wrong: https://github.com/dmitryd/typo3-realurl/blob/development/Classes/Decoder/UrlDecoder.php#L445 The line you found is executed just once: when processing the root page. Just tested, decoding deep in the tree works fine. |
It turned out the failing decoding was caused by the parent of some pages being a doktype "menu seperator". The URLs to those pages are not decoded when I am logged into the backend. So I was indeed wrong with my initial issue. But thanks for your investigation anyways. Maybe you can check the behavior with the "menu seperator" doktype as well? |
Menu separators are not supposed to have subpages. They are just visual separators that can have rendering in menu as a non-linkable separator, that's all. If you need subpages, you should use folders instead. |
Whether or not you want subpages of a menu seperator is rather a matter of taste. I've seen it in some projects. I am not a huge fan of it but I do think URL decoding should work here. Don't you? |
Well, it is not a matter of taste. It is a matter of doing it right or wrong. If people do it wrong, it is not a good idea to endorse it. Change to folder. |
For example, you can say that |
I dont know how your examples are helping. Thing is: Subpages of the separator doktype are not decoded if there is no cache in realurl v2. The core has no problem with URLs to those pages. Same goes for realurl v1 and even for v2 with present caches. I just stumpled over this in a project where I cannot just change the page types. I am personally not using the separator for structuring my page tree but I know some projects that do. I thought this breaking behavior of your extension might be of interest for you. If you don't care you may close this ticket. |
Hm, funny discussion. I think it is not well enough described, “Menu separator“ can be used for both, to separate a menu in different groups like Dmitry meant and to separate a tree into submenus. I also used it e.g. for a topnavigation because it separates a menu and it just looks better and you can better differ it from other folders for records storage. So maybe bad behavoir is not exactly correct ;-) |
If one is logged in to the backend, realurl will use the NullCache and thus not find anything in any cache. This leads the decoding process of any URL to
decodePath()
where the currentPid is set to the rootPid. See: https://github.com/dmitryd/typo3-realurl/blob/development/Classes/Decoder/UrlDecoder.php#L435Then the
searchPages()
method is called (https://github.com/dmitryd/typo3-realurl/blob/development/Classes/Decoder/UrlDecoder.php#L445) where essentially the URL path is checked against the page titles of pages that have the rootPid as parent (https://github.com/dmitryd/typo3-realurl/blob/development/Classes/Decoder/UrlDecoder.php#L1216-L1218). Pages further down in the page tree are not checked and therefor not found.So a link to a page on the third level in the page tree can never be decoded if you are logged in the backend.
The text was updated successfully, but these errors were encountered: