? Success
Referenced as Related to: # 3091

User tests: Successful: Unsuccessful:

avatar okonomiyaki3000
okonomiyaki3000
18 Apr 2014

Presented as an alternative to #3091, as suggested by @radiant-tech, we shall never include component params in menu item configs.

avatar okonomiyaki3000 okonomiyaki3000 - open - 18 Apr 2014
avatar okonomiyaki3000 okonomiyaki3000 - change - 18 Apr 2014
Labels
avatar okonomiyaki3000 okonomiyaki3000 - change - 18 Apr 2014
Labels Added: ?
avatar okonomiyaki3000 okonomiyaki3000 - change - 18 Apr 2014
Labels Added: ? ?
avatar okonomiyaki3000 okonomiyaki3000 - change - 11 Jul 2014
Description <p>Presented as an alternative to <a href="https://github.com/joomla/joomla-cms/pull/3091" class="issue-link" title="Load component params">#3091</a>, as suggested by <a href="https://github.com/radiant-tech" class="user-mention">@radiant-tech</a>, we shall never include component params in menu item configs. </p> <p>Presented as an alternative to <a href="https://github.com/joomla/joomla-cms/pull/3091" class="issue-link" title="[#33264] Load component params">#3091</a>, as suggested by <a href="https://github.com/radiant-tech" class="user-mention">@radiant-tech</a>, we shall never include component params in menu item configs. </p>
avatar okonomiyaki3000
okonomiyaki3000 - comment - 25 Jul 2014

There's not really anything to test here. I'm removing this non-functioning block of code:

// Now load the component params.
// TODO: Work out why 'fixing' this breaks JForm
 if ($isNew = false)
 {
    $path = JPath::clean(JPATH_ADMINISTRATOR . '/components/' . $option . '/config.xml');
 }
 else
 {
    $path = 'null';
 }

 if (is_file($path))
 {
    // Add the component params last of all to the existing form.
    if (!$form->load($path, true, '/config'))
    {
        throw new Exception(JText::_('JERROR_LOADFILE_FAILED'));
    }
 }

Obviously, this always sets $path to null and then doesn't try to load it because is_file(null) is definitely false. So this code does nothing and the thing it was supposed to do probably shouldn't be done anyway.

By the way, the reason $form->load($path, true, '/config') wasn't working is because that function takes xml data, not a path to an xml file. The function that should have been used was loadFile but we probably don't want the component params here anyway so just remove it all.

avatar nicksavov nicksavov - change - 21 Aug 2014
Labels
avatar brianteeman brianteeman - change - 21 Aug 2014
Status New Pending
avatar nicksavov nicksavov - change - 21 Aug 2014
Labels Removed: ?
avatar nicksavov nicksavov - change - 17 Oct 2014
Labels
avatar nicksavov nicksavov - change - 17 Oct 2014
Labels Added: ?
avatar okonomiyaki3000
okonomiyaki3000 - comment - 20 Nov 2014

I don't think I need a JoomlaCode Tracker Item for this.

avatar Bakual
Bakual - comment - 20 Nov 2014

No, you don't need that anymore.

avatar brianteeman brianteeman - change - 1 Jan 2015
Labels
avatar brianteeman brianteeman - change - 1 Jan 2015
Labels Removed: ?
avatar roland-d roland-d - test_item - 5 May 2015 - Tested successfully
avatar roland-d roland-d - change - 5 May 2015
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2015-05-05 13:55:37
Closed_By roland-d
avatar roland-d roland-d - close - 5 May 2015
avatar roland-d roland-d - close - 5 May 2015
avatar zero-24 zero-24 - close - 5 May 2015
avatar roland-d
roland-d - comment - 5 May 2015

Merged on code review and test.

avatar zero-24 zero-24 - change - 5 May 2015
Labels Added: ?
avatar zero-24 zero-24 - change - 5 May 2015
Labels Added: ?
avatar zero-24 zero-24 - change - 5 May 2015
avatar okonomiyaki3000 okonomiyaki3000 - head_ref_deleted - 1 Jun 2015
avatar johanjanssens johanjanssens - reference | a4c7cd9 - 19 Jun 15

Add a Comment

Login with GitHub to post a comment