? Success

User tests: Successful: Unsuccessful:

avatar chivitli
chivitli
5 Mar 2014

When LanguageFilter plugin is enabled, the data object containing the form data (specified at http://docs.joomla.org/Plugin/Events/Content#onContentPrepareForm) gets converted to an array containing the data for some components, which results in inability to manipulate it as it isn't passed by reference.

This PR removes conversion to array and restores passing the data as an object, which seems to be the correct way.

To test, just make sure that multilingual assotiations/content still works fine when you are editing Content/Categories/Contacts/Newsfeeds

Tracker: http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=33423&start=0

avatar chivitli chivitli - open - 5 Mar 2014
avatar wilsonge
wilsonge - comment - 5 Apr 2014

Now do you actually mean language filter or language code? Because language filter doesn't even seem to have an onContentPrepareForm event and language code doesn't ever touch the data attribute. I can see there's some inconsistency - but not quite clear how it makes a difference in either of these plugins

avatar chivitli
chivitli - comment - 5 Apr 2014

@wilsonge

No, I really mean language filter. The problem is in this (snipet from article model in com_content, I added comments inline):

// check whether language filter is enabled
$assoc = JLanguageAssociations::isEnabled();
if ($assoc)
{
    $languages = JLanguageHelper::getLanguages('lang_code');
    // this conversion wouldn't happen is $assoc was false, meaning if language filter wasn't enabled
    // force to array (perhaps move to $this->loadFormData())
    $data = (array) $data;
avatar chivitli chivitli - change - 5 Apr 2014
Title
Fixing onContentPrepareForm for multilang sites
[#33423] Fixing onContentPrepareForm for multilang sites
avatar chivitli chivitli - change - 5 Apr 2014
Title
Fixing onContentPrepareForm for multilang sites
[#33423] Fixing onContentPrepareForm for multilang sites
avatar chivitli
chivitli - comment - 16 Jul 2014

@wilsonge

Did you have some time to review this after? With JM's test, just one is missing (:

avatar roland-d
roland-d - comment - 9 Aug 2014

Moved tracker to RTC as we have 2 successful tests.

avatar brianteeman brianteeman - change - 9 Aug 2014
Labels Added: ?
avatar Bakual Bakual - change - 9 Aug 2014
Status New Closed
Closed_Date 0000-00-00 00:00:00 2014-08-09 17:52:50
avatar Bakual Bakual - close - 9 Aug 2014
avatar Bakual Bakual - close - 9 Aug 2014
avatar Sophist-UK Sophist-UK - reference | 77cb4d8 - 7 Oct 14

Add a Comment

Login with GitHub to post a comment