Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I'm using latest drupal version ( 8.4.5) and latest context dev version.When you try to delete a context , the drupal site breaks until you rebuild the cache.This error appears in logs:
Drupal\Core\Database\InvalidQueryException: Query condition 'menu_link_content.uuid IN ()' cannot be empty. in Drupal\Core\Database\Query\Condition->condition() (line 103 of /var/www/html/web/core/lib/Drupal/Core/Database/Query/Condition.php).
Comment | File | Size | Author |
---|---|---|---|
#5 | Screen Shot 2018-03-20 at 09.15.10.png | 139.07 KB | nkoporec |
#2 | fix_menu_query_error.patch | 639 bytes | nkoporec |
Comments
Comment #2
nkoporecI wrote a patch to fix this problem, please review it.
Comment #3
icurk CreditAttribution: icurk at Agiledrop - Your Trusted Drupal Teammates commentedWhat are the steps to reproduce this error. I have drupal 8.5.0 installed and dev version of the module and I don't get any error.
Comment #4
nkoporecRetested the issue and the issue is gone in Drupal 8.5 but remains on Drupal 8.4
Steps to reproduce:
1.Create a new context
2.Delete context
An error
The website encountered an unexpected error. Please try again later.
occur.Comment #5
nkoporecAfter debugging the issue, even more, I found out that this error is related to module Admin toolbar which I have installed on both Drupal(same latest versions of admin_toolbar-1.23).Even though the site doesn't break on Drupal 8.5, another minor bug appears which is related to this issue(see screenshot) and my patch fixes both problems(site break and this minor bug) since it rebuilds the menu when a context is deleted.
Comment #6
maaty388 CreditAttribution: maaty388 commentedI can reproduce bug when you delete context, an item is still displayed in the menu...
This patch fixes this problem.
Comment #8
boshtian CreditAttribution: boshtian at Agiledrop - Your Trusted Drupal Teammates commented