? Failure

User tests: Successful: Unsuccessful:

avatar saharin88
saharin88
10 Jun 2016

If you field in config not valid on save, attribute message or label field lang constant not load.
This fix that.

avatar saharin88 saharin88 - open - 10 Jun 2016
avatar saharin88 saharin88 - change - 10 Jun 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 10 Jun 2016
Labels Added: ?
avatar saharin88 saharin88 - change - 10 Jun 2016
Title
Update save.php
Fix load language on seving component config
avatar saharin88 saharin88 - change - 10 Jun 2016
Title
Update save.php
Fix load language on seving component config
avatar saharin88
saharin88 - comment - 10 Jun 2016

else can
JFactory::getLanguage()->load($option, JPATH_ADMINISTRATOR)
generally problem exists, language is not loaded

avatar infograf768
infograf768 - comment - 10 Jun 2016

Can you give an example of field that would not be valid?
Basically, how to test this?

avatar saharin88
saharin88 - comment - 10 Jun 2016

I was faced with this problem in a my component, but you look at the example com_tags http://screencast.com/t/hphhfTXaNn

avatar wojsmol
wojsmol - comment - 11 Jun 2016

@saharin88 Plase see CS PR saharin88#2

avatar infograf768
infograf768 - comment - 11 Jun 2016

hmm...
If I understand well, your demonstration is to make an obvious mistake in a config.xml (here, /administrator/components/com_tags/config.xml) by entering a figure instead of an url with http://
i.e. instead of

<field
            name="tag_list_item_maximum_characters"
            type="text"
            filter="integer"
            label="COM_TAGS_LIST_MAX_CHARACTERS_LABEL"
            description="COM_TAGS_LIST_MAX_CHARACTERS_DESC"
            showon="tag_list_show_item_description:1"
        >
        </field>

modify to

<field
            name="tag_list_item_maximum_characters"
            type="text"
            validate="url"
            scheme="http"
            label="COM_TAGS_LIST_MAX_CHARACTERS_LABEL"
            description="COM_TAGS_LIST_MAX_CHARACTERS_DESC"
            showon="tag_list_show_item_description:1"
        >
        </field>

to demonstrate a failure to load a language file when the field does not contain an http:// url

avatar infograf768
infograf768 - comment - 11 Jun 2016

I suggest you to test on staging where I do get the correct translated message.
Please install staging https://github.com/joomla/joomla-cms/archive/staging.zip and test again.

avatar saharin88
saharin88 - comment - 11 Jun 2016

Yes, I see the loaded language
and what is the secret? since 3.5.1 not lang load...

avatar infograf768
infograf768 - comment - 11 Jun 2016

I guess a bug was solved :)

avatar infograf768
infograf768 - comment - 11 Jun 2016

Please close issue

avatar saharin88 saharin88 - change - 11 Jun 2016
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2016-06-11 10:33:38
Closed_By saharin88
avatar saharin88 saharin88 - close - 11 Jun 2016
avatar saharin88 saharin88 - close - 11 Jun 2016
avatar saharin88
saharin88 - comment - 11 Jun 2016

aha, see change method getForm in class ConfigModelComponent

avatar saharin88 saharin88 - change - 11 Jun 2016
Status Closed New
Closed_Date 2016-06-11 10:33:38
Closed_By saharin88
avatar saharin88 saharin88 - change - 11 Jun 2016
Status New Pending
avatar saharin88 saharin88 - reopen - 11 Jun 2016
avatar saharin88 saharin88 - reopen - 11 Jun 2016
avatar saharin88 saharin88 - change - 11 Jun 2016
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2016-06-11 10:46:52
Closed_By saharin88
avatar saharin88 saharin88 - close - 11 Jun 2016
avatar saharin88 saharin88 - close - 11 Jun 2016
avatar infograf768
infograf768 - comment - 12 Jun 2016

yep
see #8529

Add a Comment

Login with GitHub to post a comment