Unable to uninstall #865
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: joomla/Component-Builder#865
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Steps to reproduce the issue
I have a component with a custom user field and a custom field.
Try to uninstall it.
Expected result
The component uninstalls without errors
Actual result
When I try to uninstall it, it fails with error "Unable to setQuery of null".
System information (as much as possible)
Additional comments
In the file administrator/components/com_<component_name>/script.php, in the method unistall 2 lines are missing:
$db = JFactory::getDbo();
$app = JFactory::getApplication('administrator');
All lone numbers are from this file: https://git.vdm.dev/joomla/Component-Builder/src/branch/staging/admin/helpers/compiler/e_Interpretation.php (I used this link since gitHub can't show large files)
Okay on line 7975 and 8016 we add
$db = JFactory::getDbo()
to the install, unless you have custom install, since then its added on line 7876.For uninstall we add this on line 8119 and 8123 if the uninstall script builder has values, in your case it should. Since
$this->uninstallScriptBuilder
value is build with we have joomla_fields on line 23755So do me a favor and check the values in
$this->uninstallScriptBuilder
on line 8108 with the following code:Run the compiler and you should see the output in the browser... remove the code again.
Should you find that it is empty... then check the values of
$view['joomla_fields']
at line 23726 again in the following way:You should again run compile and get the dump values in the browser... you may want to target the view like this, to look at the right view at that moment:
Again once you have the values post them here, and remove the code. These code snippets is just to debug and see what caused JCB no to add the code, as it is there and should have been added.
Let the hunt begin.... 👍
@Polm90 are you still able to respond here?