I didn't get any replies on this, but I just wanted to see if anybody
else thought it was weird that we do not have a choice whether or not
the asset records are delete when our component is uninstalled in
Joomla 1.6?
So many times in Joomla 1.5 a user could uninstall their component and
keep the underlying data within the database, and I would think this
would be allowed in Joomla 1.6, however when your records are making
use of the new ACL system (and have an asset_id field in their table)
it really does not make any sense to delete all of their asset records
without also deleting the associated records (but again, this isn't
what most people want...they want to be able to uninstall their
component and keep the data...and asset records unless they specify
for the system to remove them explicitly).
From what I saw in JInstallerComponent the asset records removal
process is hardcoded in...it would be really nice if some options were
provided to developers as to how they wanted their records deleted
from the assets table.
Just as an example, in the component I'm working on, uninstalling the
component causes all of the records from two different tables to
become orphaned from the assets table. Upon reinstalling the component
I am able to see the records listed in the two list views I have for
each table, but the frontend wouldn't work correctly (because of the
missing asset_id's) as well as deleting the records (I can trash them,
but not delete them, due to the missing asset_id's). The only fix is
to open up and re-save each record which would recreate the asset IDs,
so I created a little automatic method that could do this for the
entire list for one of the views, but I don't see this as a true fix
because it would still require any permissions that had been assigned
to those records to be recreated manually (since all of the old
permissions are completely gone).
I could try and create a copy of all of the asset records before the
uninstallation and then restoring them post installation, but that
seems like a workaround for something that feels very much like a bug.
Is there anybody else developing Joomla 1.6 components at the moment
using the ACL that have run into similar experiences upon uninstalling
their extensions? I can see this being an issue for com_content/
com_categories is they were uninstallable, but since they're core
extensions you can't really test that (and I don't know if the
uninstallation side of things was thought of much while we were bug
squashing the 1.6 betas, I know I never thought about it).
-Omar
> >
joomla-dev-gene...@googlegroups.com<
joomla-dev-general%2Bunsu...@googlegroups.com>
> > .