- Issue created by @bramvandenbulcke
- π³π±Netherlands Dimiter
I also tried enabling the new experimental menu setting after updating Gin to 8.x-3.0-rc7 and Gin_Toolbar to 1.0.0-rc4 . However, the logs show a different error :
Error: Class "Drupal\block_content\Entity\BlockContentType" not found in Drupal\gin\GinNavigation->getNavigationCreateMenuItems() (line 88 of /var/www/html/web/themes/contrib/gin/src/GinNavigation.php).
I'm not sure if this is a Gin or Gin_Toolbar problem...
- π¨πSwitzerland saschaeggi Zurich
Moving this to the Gin issue queue as the code comes from Gin.
- @saschaeggi opened merge request.
- Status changed to Needs review
about 1 year ago 7:28pm 15 October 2023 - π¨πSwitzerland saschaeggi Zurich
@bramvandenbulcke @Dimiter can you verify that the MR solves your issues? TY!
- πΊπΈUnited States kevinfunk
Thank you saschaeggi for working on this. I found this issue today and the MR didn't solve the issue. I've attached a patch and diff of my changes that worked.
To test
- Install Drupal minimal profile
- Install Toolbar module
- Install Gin theme
- Set Gin as Administration theme
- Configure Gin to use "New Drupal Navigation, Test integration"
- π§πͺBelgium bramvandenbulcke
@saschaeggi the MR shows the same error but patch 3394085-09 is working fine. The icons in the experimental sidebar look a bit weird but the functionality is working fine with this patch.
- π©πͺGermany gnuschichten
Patch#9 is working for me (minimal profile). And yes, I can confirm that the Icons are missing - only the fallback "icon" applies:
.toolbar-link--has-icon { --icon: icon("fallback"); /* Default icon, aka --basic */ }
- π¨πSwitzerland saschaeggi Zurich
@bramvandenbulcke
Well then let's proceed with this patch then π
The icons in the experimental sidebar look a bit weird but the functionality is working fine with this patch.
Not sure what you mean with that? Are the icons broken?
- π¨πSwitzerland saschaeggi Zurich
@gnuschichten can you try to clear the cache - might be cache related.
- π©πͺGermany gnuschichten
@saschaeggi I cleared both the Drupal cache and the images cached in the browser. Result: Menu Icons
- are still missing, but now the svgs for the sidebar collapse and the chevrons in the after elements are visible.
- π©πͺGermany gnuschichten
Finding, maybe related: There is a css class, that is tranlsated into german, last class:
toolbar-link toolbar-link--has-icon toolbar-link--inhalt
I haven't checked the stylesheet yet because I just took a look at the project for the first time today, but it's probably the selector for the different menu icons?
- Status changed to Needs work
about 1 year ago 3:18pm 19 October 2023 - πΊπΈUnited States paul121 Spokane, WA
There are additional errors that leave a 500 error/white screen when node, block_content and media entity types are not installed. I tested with this MR. Output from drush ws:
124 19/Oct 15:14 php Error Drupal\Component\Plugin\Exception\PluginNotFoundException: The "node_type" entity type does not exist. in Drupal\Core\Entity\EntityTypeManager->getDefinition() (line 139 of /var/www/html/w
122 19/Oct 15:14 php Error Error: Class "Drupal\block_content\Entity\BlockContentType" not found in Drupal\gin\GinNavigation->getNavigationCreateMenuItems() (line 97 of /var/www/html/web/themes/gin/src/GinNavigation
127 19/Oct 15:15 php Error Drupal\Component\Plugin\Exception\PluginNotFoundException: The "media_type" entity type does not exist. in Drupal\Core\Entity\EntityTypeManager->getDefinition() (line 139 of /var/www/html/
A simple check to make sure these entity types exist before loading them should solve the problem. Marking as Needs work, but this could move to a separate issue.
- π©πͺGermany gnuschichten
@saschaeggi - I will test the icon bug with another language and create a new issue if necessary.
- π¨πSwitzerland saschaeggi Zurich
@paul121 have you tested patch #9?
- πΊπΈUnited States paul121 Spokane, WA
Ah thanks @sachaeggi I missed that. This is working great except for one last little dependency on
node
:Symfony\Component\Routing\Exception\RouteNotFoundException: Route "node.add_page" does not exist. in Drupal\Core\Routing\RouteProvider->getRouteByName() (line 206 of /var/www/html/web/core
The
node.add_page
route is used as the url for the very top level "+ Create" item. Maybe we can replace this with an empty string like the Taxonomy URL is using inGinNavigation::getNavigationCreateMenuItems()`? In my testing none of the "parent" menu items allow navigating to their URLs, clicking only expands the menu tree. --- Oh wait... I see, you can navigate to the top-level menu item when the sidebar is collapsed + hovered. Maybe each Entity Type parent/collapsible menu in the "Create" menu could navigate to their own <code>{entity_type}.add_page
route?
- π§πͺBelgium bramvandenbulcke
@saschaeggi see the attached screenshot for the icons in my install.
I only added the patch 3394085-09, I didn't add your commits 30d5cc78 and ac492711. So I have no updated CSS in my project.
- π«π·France nicolasgraph Strasbourg
I had the same issue concerning the disabled help module and the patch from #9 did the trick.
I also confirm the issue pointed in #10 about translated classes and missing icons; this probably needs a dedicated issue. -
saschaeggi β
committed 7af6eed9 on 8.x-3.x authored by
kevinfunk β
Issue #3394085 by saschaeggi, kevinfunk, bramvandenbulcke, paul121,...
-
saschaeggi β
committed 7af6eed9 on 8.x-3.x authored by
kevinfunk β
- Status changed to Fixed
about 1 year ago 9:01am 20 October 2023 - π¨πSwitzerland saschaeggi Zurich
I moved forward with patch from #9.
Thanks y'all π
I also wanted to test the new experimental sidebar navigation in one of my projects and I got an error and The website was unreachable. But in my case the error was different:
"PHP message: Uncaught PHP Exception Drupal\Component\Plugin\Exception\PluginNotFoundException: "The "media_type" entity type does not exist." at /home/workshop/drupal/d10/test/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php line 139"
At first, I tried it on a Drupal 9 site and I got the above error, then I tried it on a fresh Drupal 10 installation and I got the same error and I site was not reachable.
Automatically closed - issue fixed for 2 weeks with no activity.