Updating Joomla 4.4.2 to 5.0.2

Muito importante: quem estava causando o problema em meu site ao atualizar era o T4. Bastou que instalasse outro, no caso o Gantry e tornasse o Ganry o template default que tudo funcionou, sem remover nenhuma extensão.

- I changed the template back to Cassiopeia
- I uninstalled all third-party extensions that I had installed (I will install them later)
- Removed cache
- I changed the default language of the site and admin to English
- System - Update - Joomla - Options - Update Channel - Joomla Next

Save & Close

Scroll down and check if you need to answer any questions (if any, answer them first) - Update

We then need to confirm that we have already made a complete backup of the website
I'm aware that a backup before any update is highly recommended. (click on the checkbox on the left)

He suggests we read the article:
https://docs.joomla.org/Portal:Upgrading_Versions 

Especially this one:
https://docs.joomla.org/Special:MyLanguage/Joomla_4.4.x_to_5.x_Planning_and_Upgrade_Step_by_Step

See the note that to update to 5 we need to be already on 4.4
This guide assumes you are starting with Joomla 4.4.x. If you are on an earlier version, make sure you migrate or update to Joomla 4.4.x prior to upgrading to Joomla 5.x.

Start Update

After clicking the button above we will receive:

Joomla Version Update Status
Notice Your site has been updated. Your Joomla version is now ‎5.0.2.

But if we access the website and are still using a third-party extension, we can see the error:

Joomla\CMS\Event\Module\ModuleListEvent::onSetModules(): Argument #1 ($value) must be of type array, null given, called in /home/familiafs.net.br/public_html/libraries/src/Event/ AbstractEvent.php on line 225

But, see that we are still accessing the administrator without a problem. We need to uninstall all third-party extensions and then, when everything looks good, we can install again, but now in 5.0.2.

Obs

If it still doesn't work, check if any removed extensions left any tables in the database. If you left it, remove it.
It is important to create a database backup before removing extensions.