Active
Project:
Avatar Kit
Version:
8.x-2.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Jul 2022 at 12:07 UTC
Updated:
5 May 2024 at 17:44 UTC
Jump to comment: Most recent, Most recent file

Comments
Comment #5
arunkumarkComment #6
dpiThe config should probably just be moved to optional.
Comment #7
joachim commented> The config should probably just be moved to optional.
Not sure that's the right fix.
The module should clean up after itself and delete the field -- because otherwise, going to admin/config/people/accounts/fields/user.user.avatars_avatar_generator crashes the site because the options provider is no longer available.
Comment #8
joachim commentedWe don't need to do this in an uninstall hook AFAIK -- should be able to do this by setting a config dependency on the fields created in hook_install().
And there is also the avatars_user_picture field to clean up similarly.
Comment #9
socialnicheguru commentedThis is needed as avatar persists in other config entities on the site after deletion.
Comment #10
socialnicheguru commentedWill the current patch delete these fields too:
field.field.user.user.avatars_user_picture.yml
field.storage.user.avatars_user_picture.yml
also references are added to a number of other configs.
When I uninstalled I thought that the references to avatars would be removed but it was not.
Comment #11
joachim commented> This is needed as avatar persists in other config entities on the site after deletion.
That is handled automatically by the config system if dependencies are correctly declared.
See ConfigEntityBase;:onDependencyRemoval().
Comment #12
socialnicheguru commentedit is not happening.
So how can I debug and trace dependencies to isolate the issue
Comment #13
socialnicheguru commentedrerolled and added user.avatars_user_picture which persists after uninstall with the previous patch.
Comment #14
coaston commentedPatch works fine.
However it works to uninstall module correctly. However who already uninstalled it first need to remove fields manually and then install module again:
-remove avatars_avatar_generator and avatars_user_picture manually
-refresh cache
-install module again
-uninstall module again - works.
Comment #15
coaston commentedAnother issue discovered > you cannot unisntall module if there is any role permission already assigned to submodules (i uninstalled Robot submodule and then tried to unisntall this one). However below config should be removed from robot submodule. :
Note: robot2 and robot were names of my generator.
Comment #16
shevgenyI can't delete the module, I can't disable the permission to upload avatars for the user role. Error:
The patches did not help. Drupal 10.2, module 8.x-2.x-dev, PHP 8.1.