-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Duplicated title (item type) in Menus: Items (Administration) #12682
Comments
I have just tested this and can confirm the issue with phoca downloads and phoca gallery but I cannot confirm it with other extensions I tested with which were acymailing and jevents This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/12682. |
In the past, the view title (translated or not) wasn't used anywhere at all. However it was a required field. Which was obviously stupid. |
So is this is a bug in core that needs fixing or just something for @PhocaCz to fix in their own extension? This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/12682. |
It's an expected side effect of the referenced PR. It's the same what happend in core with the wrapper ("Wrapper » Wrapper » Iframe Wrapper"). The wrapper thing was fixed with #8108 |
So should it be closed?
|
I wanted to hear the opinion of @PhocaCz first. From my point of view it can be closed. But the referenced PRs were both mine, so I'm a bit biased here 😄 |
Hi, first of all, it is not about Phoca extensions, you can see on the screenshot, that e.g. JComments behaves the same. I would say it is about extensions they just follow the rules.
Yes, this is the problem, this will behave differently in different Joomla! 3.x versions. Just imagine, I have made over 100 views in different extensions. There was some rule in Joomla! and now it was changed easily with ignoring extensions developers who do their job properly (follow the rules which was set). So the feature has worked for some years properly and now with inconsiderate change you just say: "Yes, ok, you have followed the rules but we changed them, just do a small change". But it is not about small change. I lose so much time which I can use for developing new extensions. It is not only this change. In history there were so many similar changes, the bad is, you never know if such change will be not reversed back. Like happened more times. Nonsense change - I, as developer who wants to do all the features properly - I changed it to new rules- then in some of next version, the old feature was set back. I really don't understand :-(
This is something which I cannot do, this is against all the rules, against all the principles. The code must be so bad written, if the feature is based on translation (if found, do something, if not, do something else). :-( The problem is, I am trying always to meet the rules in Joomla!. The rule was to translate all the strings properly. Of course if somebody does not follow the rules, its extensions do not have any problems with such kind of changes. But, purposely do a mistakes (change string to some which will be not found in translation: FROM: COM_EXTENSION_WELCOME to COM_EXTENSION_WALCOME or Welcome), this is really something I really don't know :-( When Joomla! 1.6 was released, the advice, recommendation and wish from Joomla! core team was to translate all the strings. Now, it is: do not translate everything? |
In core, the view title wasn't translated except in the wrapper. So if you had the view title translated, you technically didn't follow core (but maybe the "rules").
I'm not sure if you were aware, but the view title was broken at least since Joomla 3.0, and I think it was even broken back since J1.6. The view title never was used anywhere and thus any translation made was a complete waste of time. At the same time the view title was a required element in the metadata.xml, which by itself was required as well. I was fully aware and pointed it out in the PR that when an extension developer translated the view title, it will show up in the menu manager. As it is only a visual thing, I thought that should be acceptable. On the other side extension developer are now more flexible in how the menu manager shows the menu item type.
Yes, I agree it's sort of a hack. But it's meant as a temporary solution until Joomla 4.0. And the code before was even worse: Requiring something which isn't used anywhere wasn't making any sense while the view title actually would be a useful information to show in some cases. If you see a better approach which allows to show the view title (optionally), then I'm all ears. The current solution may not be perfect, but it is the best I could come up with. |
Ok, thank your for the answer, so you can just mark it as closed. Thank you, Jan |
Steps to reproduce the issue
Joomla! 3.6.4 - Create a menu link to some extension, in my case e.g. Phoca Download. When menu item is created, then the item type is duplicated, see image:
Expected result
The item type is not duplicated - as it worked in past since Joomla! 2.5 (1.7)
Actual result
The item type is duplicated
System information (as much as possible)
Joomla! 3.6.4, PHP5, PHP7, MySQL
Additional comments
The item type is managed here:
administrator\components\com_menus\views\items\view.html.php
In case, there is set some string which is not translatable (no translation found), then menu item type is not duplicated, see example: com_content Article, see:
components\com_content\views\article\metadata.xml
In case the "title" attribute includes string which can be found in translation, then the item type will be duplicated.
The question is, is this a bug? Or is this some change?
In past, the translated string was not duplicated, so this XML:
which includes string found in translation was not duplicated.
The XML with translatable strings works since version 2.5 (1.7)
The text was updated successfully, but these errors were encountered: