User tests: Successful: Unsuccessful:
Pull Request for Issue #15929.
During installation of a component, all existing menuitems of that component are deleted and recreated afterwards.
This is done by fetching all menuitems of said component using a database query and then iterating over each of them and deleting it using JTableNested::delete().
That method takes a second option argument which defaults to true and makes sure that children are deleted as well.
Now that is nice but since we are iterating over all menuitems, it means that in the first iteration the parent is deleted and all successive deletes of the children fail and generate an error that _getNode can't find the item.
The difference between J3.7 and J4 is that in J3.7 the errors are pushed into $this->_errors but neither the return value (false
) nor that error array is ever checked afterwards.
In J4 a warning is raised and thus those errors suddenly become visible.
This changes the call so it doesn't delete the children.
In J3 there isn't much you can test beside that menuitems are deleted/recreated as expected after updating an extension with a submenu (eg SermonSpeaker https://www.sermonspeaker.net/download/sermonspeaker-component/sermonspeaker-component-5-6-2/com_sermonspeaker-zip.zip).
In J4 this will prevent the error messages mentioned in the above issue.
Component updates as expected
Component updates as expected
None
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
Yep, that zip only works in J3 due to the various B/C breaks J4 will bring.
For J4, you will have to install my development version:
com_sermonspeaker.zip
Be aware that this PR is for J3 and needs to be merged up into J4 afterwards. You can't apply it to J4 in the current form.
Installed and uninstalled Sermonspeaker in Joomla 3: All submenus in Table _menu are deleted. I'm not sure if this is an successfully test.
Expected behavior:
When installing a component, the menus are created.
When updating a component, the menus are deleted and recreated without any errors.
When uninstalling a component, the menus are deleted.
As said, there isn't much to test other than the behavior is the same as before, meaning the menus are there after installing/updating and gone after uninstalling.
The errors which happend upong deleting the menus don't show in J3.
I have tested this item
@Bakual so if its expected Behavior i can mark Test as successfully?
Yep, I think so.
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
RTC after two successful tests.
Status | Ready to Commit | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-10-26 14:24:14 |
Closed_By | ⇒ | Bakual | |
Labels |
Added:
?
|
Install com_sermonspeaker.zip in Joomla4 got
Internal Server Error
.System information
4 (latest nightly build)
macOS Sierra, 10.12.5
Firefox 53 (64-bit)
MAMP 4.1.1