Support

Admin Tools

#39218 Error executing task to clean up users

Posted in ‘Admin Tools for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
4.3.3
PHP version
8.0.27
Admin Tools version
7.3.4

Latest post by nicholas on Monday, 17 July 2023 08:15 CDT

robertvdh

I have added a task to cleanup users that have registered but never activated.
When I run this (as test) from the backend then I get the error message:

An error has occurred while fetching the JSON data: HTTP 200 status code.

I have seleted the options: Only if they have not activitated their account, # of days 2

Β 

What could be causing this?

Β 

Robert

nicholas
Akeeba Staff
Manager

Um, HTTP 200 is success (OK). This sounds like some weird issue in Joomla! about testing the scheduled tasks.

If you run this task for real does it report success or an error when it runs?

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

robertvdh

Nick,

I checked the log file and I see several error messages like these:

Β 

2023-07-17 08:06:57 ERROR Routine threw exception: User id failed to load: 6041

Β 

Robert

nicholas
Akeeba Staff
Manager

This is not a problem in Admin Tools. It is a problem with a third party plugin (most likely a plugin either in the user or the system group). I can tell because the message you get appears neither in Joomla's core code, nor in our code.

Admin Tools' task to remove obsolete users creates a list of user IDs to delete, then tells Joomla's core code (\Joomla\CMS\User) to delete each one of them. Joomla loads each user and then deletes it.

Joomla calls several events in this process. onTableBeforeBind and onTableAfterBind before and after applying the loaded user data to the user object, onTableObjectCreate when the user object is created,Β onUserBeforeDelete and onUserAfterDelete before and after the user is deleted.

These events are handled by core and third party plugins. These events do make sense. It's what allows, for example, the User - User Profile plugin that comes with Joomla to delete the additional user profile data instead of leaving them behind. Third party extensions also use these events for similar reasons.

It appears that some third party plugin is experiencing an error while handling one of these events and throws an exception (stop error). Since this happens in third party code called by core Joomla itself we cannot do anything about it. If you try to delete that user by hand you will have the same error. If you do that manual deletion with Debug Site set to Yes in Global Configuration you might receive a more detailed error message which could point you to the extension where this error comes from.

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!