Try to install any module with commits 754536aae580854ca3bc8a00bde39fe68a3df5a3 (from earlier today) or 68ce258d630aa8715d8adce6ef1a624a4e3917de (latest ATM).
You will be greeted with
Additional uncaught exception thrown while handling exception.
Original
Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '))' at line 1: DELETE FROM {cache} WHERE (cid IN ()) ; Array ( ) in Drupal\Core\Database\Connection->query() (line 569 of /Users/wim.leers/Work/drupal-tres/core/lib/Drupal/Core/Database/Connection.php).
Additional
Exception: theme() may not be called until all modules are loaded. in theme() (line 522 of /Users/wim.leers/Work/drupal-tres/core/includes/theme.inc).
This happens when trying to enable the Actions, Language, Interface Translation or Testing modules. So I assume this happens for any module that you try to enable. Gábor Hojtsy tried this also, he was able to reproduce this. But after installing his site in a custom language right out of the box (e.g. Hungarian), he was able to install modules without problems.
Furthermore, it seems that the installation sometimes succeeds partially. I once got this after enabling Interface Translation:
InvalidArgumentException: Invalid translation language (en) specified. inDrupal\Core\Entity\ContentEntityBase->getTranslation() (line 656 of /Users/wim.leers/Work/drupal-tres/core/lib/Drupal/Core/Entity/ContentEntityBase.php).
and now after enabling Actions, I get this:
Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '))' at line 1: DELETE FROM {cache} WHERE (cid IN ()) ; Array ( ) in Drupal\Core\Cache\DatabaseBackend->deleteMultiple() (line 208 of /Users/wim.leers/Work/drupal-tres/core/lib/Drupal/Core/Cache/DatabaseBackend.php).
Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '))' at line 1: DELETE FROM {cache} WHERE (cid IN ()) ; Array ( ) in Drupal\Core\Database\Connection->query() (line 569 of core/lib/Drupal/Core/Database/Connection.php).
Symfony\Component\Routing\Exception\RouteNotFoundException: Route "action.admin" does not exist. in Drupal\Core\Routing\RouteProvider->getRouteByName() (line 127 of /Users/wim.leers/Work/drupal-tres/core/lib/Drupal/Core/Routing/RouteProvider.php).
Comment | File | Size | Author |
---|---|---|---|
#15 | drupal-small-language-touch-ups-2171015.patch | 1.64 KB | webchick |
#7 | 2171015.7.patch | 3.62 KB | alexpott |
#7 | 2171015.7.will-fail.patch | 2.52 KB | alexpott |
Comments
Comment #1
Wim LeersComment #2
Gábor HojtsySeems to be related to trying to enable Lnaguage first, which itself drop this error:
"right syntax to use near '))' at line 1: DELETE FROM {cache} WHERE (cid IN ()) ; Array ( ) in Drupal\Core\Database\Connection->query()"
THEN trying to enable modules like action will produce the same cache error and also
"Symfony\Component\Routing\Exception\RouteNotFoundException: Route "action.admin" does not exist. in Drupal\Core\Routing\RouteProvider->getRouteByName() "
Comment #3
Gábor HojtsyWhich makes the admin/modules page permanently hosed with the route error too :D
Comment #4
Wim LeersComment #5
Wim LeersI was able to confirm Gábor's hypothesis/test results. The title is updated accordingly.
Furthermore, Alex Pott has indicated that this only happens in the Standard install profile.
Comment #6
BerdirCan not reproduce, installing language works just fine here, with standard.
While not on standard, we have a crazy menu test that enables every.single.module. and then uninstalled them. If this would be a generic problem, I can't see how that could not fail when you have errors like this?
What's your environment? PHP version, ...
Also, in deleteMultiple(), check for an empty array and if so, print out the backtrace with debug_print_backtrace(DEBUG_BACKTRACE_NO_ARGS) to see where this is coming from.
Comment #7
alexpottThis being caused by language_list returning an empty array during module installation. Test only patch and fix attached.
Comment #8
amateescu CreditAttribution: amateescu commentedI wonder if this also fixes #2156945: Clean up installer entity defaults following bugfix..
Comment #9
Gábor HojtsyFix/test looks good. Only found English errors :)
"the returning an empty language" and
"do this be enabling ... using a the UI"
Otherwise would be easy to RTBC :)
Comment #10
Gábor Hojtsy#2156945: Clean up installer entity defaults following bugfix is the same problem indeed, the empty language list temporarily. The added test will also be great to ensure #1862202: Objectify the language system will not reintroduce this issue :)
Comment #11
webchickI'm comfortable fixing those English problems, as well as "If the language module is enable" on commit, so if that's all that's stopping you, go for the light green button. :D
Comment #13
Gábor HojtsyLooks good, works well :)
Comment #14
Dries CreditAttribution: Dries commentedCommitted to 8.x. Some minor language issues that need to be addressed so leaving as 'needs works'.
Comment #15
webchickOOOH OOOH OOOH. I get commit credit on something. :D
Comment #16
Gábor HojtsyGood stuff.
Comment #17
Dries CreditAttribution: Dries commentedCommitted the doc/language fixes.
Comment #18
webchickYAY! :D
Restoring old status.