? Success

User tests: Successful: Unsuccessful:

avatar nikosdion
nikosdion
23 Dec 2014

As requested by @wilsonge by email

Executive summary

This patch for JInstallerAdapterComponent deals with issues manifesting themselves as "Can't build admin menus".

The following intertwined bug fixes are applied:

  • If building admin menus failed the #__menus table was left broken (inconsistent lft/rgt) because rebuild() never ran against it.
  • Failed installations without rollback (e.g. due to timeout) can leave behind rubbish #__extensions and #__menus entries leading to inability to reinstall the component
  • A failure in _removeAdminMenus –presumably because of the issue above– would make it impossible to install the component.
  • Just do not create the menu if $menuElement not exist (it was a TODO item for as long as I remember developing for Joomla!)
  • The extension ID was passed to _buildAdminMenus but completely ignored!
  • If a submenu already existed with the same parent item the installation would fail. Now we try removing it first, just like we do for the root menu item.

Backwards compatibility

The protected _removeAdminMenus method has a different signature. To the best of my knowledge nobody extends JInstallerAdapterComponent directly, therefore the impact is non-existent.

Translation impact

None

Testing instructions

As I explained to @wislonge the problems only manifest themselves on bad hosting and when several things go wrong. As a result there is no way to do positive tests which reproduce the bugs. These are "blind" fixes. That said, I've been tracking down these issues since 2007 and applying workarounds on my own extensions ever since. I am pretty darn sure that my code DOES fix these issues.

As a result the only possible testing you can do is regression testing. Try applying this patch and install as many different components as you can on your site (but don't try my extensions, especially the pre-release versions, some have experimental fixes which will not work properly and override this patch in any case!). The installation should succeed and the components should be perfectly usable.

avatar nikosdion nikosdion - open - 23 Dec 2014
avatar jissues-bot jissues-bot - change - 23 Dec 2014
Labels Added: ?
avatar zero-24 zero-24 - change - 23 Dec 2014
Category Libraries
avatar wilsonge
wilsonge - comment - 24 Dec 2014

<3

avatar wilsonge
wilsonge - comment - 24 Dec 2014

@test Installed a variety of 3rd party extensions (CB 2.0, widgetkit, chronoforms, nonumber extension manager and a custom one of mine) without any issues. 1 more tester needed (@roland-d ?)

avatar wilsonge wilsonge - test_item - 24 Dec 2014 - Tested successfully
avatar roland-d
roland-d - comment - 24 Dec 2014

@wilsonge Thanks for the ping. Going to test it now.

avatar roland-d roland-d - test_item - 24 Dec 2014 - Tested unsuccessfully
avatar roland-d roland-d - test_item - 24 Dec 2014 - Tested successfully
avatar roland-d
roland-d - comment - 24 Dec 2014

@test: Did a variety of testing with components, modules, plugins, and packages from 3rd parties and custom extensions. All installed and uninstalled as expected.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5499.
avatar nikosdion
nikosdion - comment - 24 Dec 2014

I guess we can set this RTC... or does it need a PLT discussion first?

avatar roland-d roland-d - change - 24 Dec 2014
Status Pending Ready to Commit
avatar roland-d
roland-d - comment - 24 Dec 2014

Moving to RTC, we have 2 successful tests.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5499.
avatar wilsonge wilsonge - close - 24 Dec 2014
avatar wilsonge wilsonge - change - 24 Dec 2014
Status Ready to Commit Closed
Closed_Date 0000-00-00 00:00:00 2014-12-24 17:28:32
avatar wilsonge
wilsonge - comment - 24 Dec 2014

Merged. Thanks so much for this Nic!

Add a Comment

Login with GitHub to post a comment