- π³π¬Nigeria chike Nigeria
I installed Drupal 10.2.4 and started building the site, just regular site building stuff - enabling contrib modules and creating pages. Then I decided to uninstall the 'contact' module and clicking /admin/modules/uninstall threw this error,
Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'custom_theme.media' doesn't exist: SELECT "base_table"."vid" AS "vid", "base_table"."mid" AS "mid" FROM "media" "base_table" GROUP BY "base_table"."vid", "base_table"."mid" LIMIT 1 OFFSET 0; Array ( ) in Drupal\Core\Entity\Query\Sql\Query->result() (line 271 of C:\wamp64\www\custom-theme\public_html\core\lib\Drupal\Core\Entity\Query\Sql\Query.php).
The 'media' module was auto-installed as a dependency for 'bootstrap_layout_builder' module. I have not added a media item yet.
Anyways patch #57 got me back to the Uninstall page and I was able to uninstall the 'contact' module.
Thanks @_utsavsharma
- π³π¬Nigeria chike Nigeria
My issue wasn't solved. What happened in my case was somehow 'media' module did not install completely or something cos I found the media types were not available on the site and visiting 'admin/content/media' threw an error. So I rolled back the site till I uninstalled 'media' module. I removed patch #57 and re-installed the media module and it was now properly installed. I re-installed back all the other modules and site came back normal.
The thing is, without patch #57 I wouldn't have been able to access the Uninstall page to uninstall the media module and the other modules that required it.
- First commit to issue fork.
- πΊπΈUnited States nicxvan
I've converted this to an MR and reviewed it. It looks like #2 was taken care of in the latest patch.
I fixed some phpcs issues and updated the issue summary remaining tasks.
If someone can share some direction on #18 I'm happy to make an attempt. - πΊπΈUnited States nicxvan
I wonder if rather than just overriding the request and trying to narrow the scope, maybe in the catch we need to examine the exception and return false if it's due to a missing table, and throw the reason otherwise?
- Status changed to Needs review
6 months ago 6:27pm 21 June 2024 - πΊπΈUnited States Greg Boggs Portland Oregon
I don't see code in the current changes that assume a database. So, perhaps the comment in #18 is about surrounding code outside of these changes. I am going to mark this needs review again until it's more clear what work needs to be done on this MR.
- πΊπΈUnited States smustgrave
So believe #18 was referring to the original fix at that time around ContentEntityStorageBase so would say may not be relevant with new approach?
Will leave in review but believe proposed solution may need to be tweaked.
- Status changed to Needs work
5 months ago 11:46am 19 July 2024 The Needs Review Queue Bot β tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide β to find step-by-step guides for working with issues.