Skip to content
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

Language cannot be "default" #14816

Closed
brianteeman opened this issue Mar 20, 2017 · 9 comments
Closed

Language cannot be "default" #14816

brianteeman opened this issue Mar 20, 2017 · 9 comments

Comments

@brianteeman
Copy link
Contributor

brianteeman commented Mar 20, 2017

In some circumstances (currently shown in #14562) it is possible to save a content item with "default" in the language field which makes no sense as we dont have any meaning when it is saved as "default". As far as I can tell it should always be either "*" or a language code

The offending code is https://github.com/joomla/joomla-cms/blob/staging/layouts/joomla/content/language.php#L14

@infograf768
Copy link
Member

we also have 'undefined' which is used when a content language has been deleted and some items were tag ged to it.

so it is jus a matter of changing the lang string. will do pr

@joomla-cms-bot
Copy link

Set to "closed" on behalf of @infograf768 by The JTracker Application at issues.joomla.org/joomla-cms/14816

@infograf768
Copy link
Member

Closed as we have a PR #14834


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/14816.

@brianteeman
Copy link
Contributor Author

Reopening as the proposed PR simply changes the word Default to Undefined which also should never happen. The issue is not the WORD but that you can save an article without any language whatsoever

@brianteeman brianteeman reopened this Mar 21, 2017
@infograf768
Copy link
Member

@Bakual
You created this layout in #12051

I think we just do not need at all that part of the code. It should display "Undefined" when there was a problem saving an item and the language is empty, which is in fact done at the end of the layout code.

My patch changed it to undefined, but we may just need imho to Delete the first conditional.

@Bakual
Copy link
Contributor

Bakual commented Mar 22, 2017

I just put it into the JLayout because it was used in com_menus and com_modules before my PR:

  • administrator/components/com_menus/views/items/tmpl/default.php
  • administrator/components/com_modules/views/modules/tmpl/default.php
  • administrator/components/com_modules/views/modules/tmpl/modal.php
  • administrator/templates/hathor/html/com_menus/items/default.php
  • administrator/templates/hathor/html/com_modules/modules/default.php

I just assumed there was a reason for it without checking further.
"Undefined" works for me for sure, just remove the first conditional and it should do that.

@infograf768
Copy link
Member

OK, will make a specific PR.

@joomla-cms-bot
Copy link

Set to "closed" on behalf of @infograf768 by The JTracker Application at issues.joomla.org/joomla-cms/14816

@infograf768
Copy link
Member

Closed again as we have a specific patch. Thanks @Bakual for confirming.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/14816.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants