?
avatar brianteeman
brianteeman
20 Mar 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

avatar brianteeman brianteeman - open - 20 Mar 2017
avatar joomla-cms-bot joomla-cms-bot - change - 20 Mar 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 20 Mar 2017
avatar infograf768
infograf768 - comment - 21 Mar 2017

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

avatar joomla-cms-bot joomla-cms-bot - close - 21 Mar 2017
avatar joomla-cms-bot
joomla-cms-bot - comment - 21 Mar 2017
avatar infograf768 infograf768 - change - 21 Mar 2017
Status New Closed
Closed_Date 0000-00-00 00:00:00 2017-03-21 15:38:29
Closed_By infograf768
avatar infograf768
infograf768 - comment - 21 Mar 2017

Closed as we have a PR #14834


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

avatar brianteeman
brianteeman - comment - 21 Mar 2017

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

avatar brianteeman brianteeman - change - 21 Mar 2017
Status Closed New
Closed_Date 2017-03-21 15:38:29
Closed_By infograf768
avatar brianteeman brianteeman - reopen - 21 Mar 2017
avatar infograf768
infograf768 - comment - 22 Mar 2017

@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.

avatar Bakual
Bakual - comment - 22 Mar 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.

avatar infograf768
infograf768 - comment - 22 Mar 2017

OK, will make a specific PR.

avatar infograf768 infograf768 - change - 22 Mar 2017
Status New Closed
Closed_Date 0000-00-00 00:00:00 2017-03-22 08:21:53
Closed_By infograf768
avatar joomla-cms-bot joomla-cms-bot - close - 22 Mar 2017
avatar joomla-cms-bot
joomla-cms-bot - comment - 22 Mar 2017
avatar infograf768
infograf768 - comment - 22 Mar 2017

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.

Add a Comment

Login with GitHub to post a comment