Score:0

Getting InvalidArgumentException for UpgradeStatusForm after installing the upgrade_status module on a Drupal 8 site

cn flag

I have a very old install that began with 6 and is now at 8. I'm trying to get it updated to 9 but have gotten stuck with getting the upgrade_status module to work. After it was installed via composer, I get this error when navigating to the report:

The website encountered an unexpected error. Please try again later.

InvalidArgumentException: Class "\Drupal\upgrade_status\Form\UpgradeStatusForm" does not exist. in Drupal\Core\DependencyInjection\ClassResolver->getInstanceFromDefinition() (line 24 of core/lib/Drupal/Core/DependencyInjection/ClassResolver.php).

I then tried to manually install it (very hacky) in the /modules directory to no effect.

I'm not sure if my install of Drupal is hopelessly broken and stuck at 8. I appreciate any suggestions or additional info that will help me troubleshoot it.

Thx,

cn flag
_I then tried to manually install it_ Does that mean `composer require` didn't work?
cn flag
I initially used `composer require drupal/upgrade_status` and after that it appeared in the reports page, but clicking on the link navigated to the above exception.
cn flag
Did you install it and clear cache?
cn flag
I just tried `composer clear-cache` (and also restarted Apache) but get the same error. However, the folders that are listed when clearing are in `~/.cache/composer/`. I also have a clean Drupal 9 site in a sibling directory to the Drupal 8 site. Could having these two on the same machine be an issue? Or could a mis-configuration cause them to stomp on each other in some way?
misterdidi avatar
de flag
Hi, I guess Clive's question was: After you required `upgrade_status` with composer, did you install the module (from the admin interface or `drush en upgrade_status`) and did you clear the Drupal cache (from the admin interface or `drush cr`)? I don't think clearing composer cache will solve your issue.
cn flag
@Clive && @misterdidi: The `drush cr` call did it! Having worked primarily with very old versions of Drupal I'm just getting comfortable with managing using `composer` and `drush`. I gave up a little too soon on this issue, so thanks so much for the patience.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.