Hi,
On a fresh D8 install with admin_menu, I get this error on admin/modules/list/confirm after enabling:

Fatal error: Call to undefined method Drupal\Core\Cache\CacheFactory::registerBin() in

/var/projects/d8/contrib/admin_menu/lib/Drupal/admin_menu/AdminMenuBundle.php on line 23
Call Stack
#	Time	Memory	Function	Location
1	0.0001	263688	{main}( )	../index.php:0
2	0.0010	307928	drupal_handle_request( )	../index.php:12
3	0.0031	435776	Drupal\Core\DrupalKernel->boot( )	../bootstrap.inc:2207
4	0.0031	435920	Drupal\Core\DrupalKernel->initializeContainer( )	../DrupalKernel.php:153
5	0.0153	1052368	Drupal\Core\DrupalKernel->buildContainer( )	../DrupalKernel.php:338
6	0.2105	1896280	Drupal\admin_menu\AdminMenuBundle->build( )	../DrupalKernel.php:407

Any idea?
Maybe an API change in D8 ?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jibran’s picture

Category: bug » task
Status: Active » Needs review
FileSize
1.15 KB

yeah #1939660: Use YAML as the primary means for service registration went in and now services are registered through YAML.

jibran’s picture

Title: Call to undefined method Drupal\Core\Cache\CacheFactory::registerBin() » Convert service registration to YAML
jibran’s picture

Category: task » bug
Priority: Normal » Critical
klonos’s picture

My installation WSODs on me after trying to enable admin_menu. Applying the patch in #1 fixes things. Thanx.

Lets get this in!

egger’s picture

Status: Needs review » Needs work

After applying the patch I got this error:

Warning: openlog() has been disabled for security reasons in syslog_watchdog() (line 122 of core/modules/syslog/syslog.module).
Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'xxx.cache_admin_menu' doesn't exist: SELECT cid, data, created, expire, serialized, tags, checksum_invalidations, checksum_deletions FROM {cache_admin_menu} WHERE cid IN (:cids_0); Array ( [:cids_0] => admin_menu:1:Q6nX6vdlhMbkmZ8fvhjAvj9pLSr4bzUmCEcU3OnZnxA:pl ) w Drupal\Core\Cache\DatabaseBackend->getMultiple() (linia 72 z xxx/core/lib/Drupal/Core/Cache/DatabaseBackend.php).
jibran’s picture

Try to install admin_menu after applying this patch.

alexpott’s picture

klonos’s picture

#1167144: Make cache backends responsible for their own storage is in. Lets please fix this because admin_menu cannot be installed in D8.

alexpott’s picture

Status: Needs work » Needs review
FileSize
2.29 KB
1.09 KB

This works for me...

Status: Needs review » Needs work

The last submitted patch, 1965552.9.yaml-service.admin-menu.patch, failed testing.

alexpott’s picture

Those test failures are unrelated...

jibran’s picture

Status: Needs work » Needs review
vipTelnet’s picture

#1: YAML-service-registration.patch queued for re-testing.

Dave Reid’s picture

alexander_danilenko’s picture

Some additional changes to #9 patch

jibran’s picture

re-uploading #15 for testing.

Rob C’s picture

Status: Needs review » Needs work

When i manually test the patch in #15/#16 i get a:

patch unexpectedly ends in middle of line
patch: **** Only garbage was found in the patch input.

Patch in #9 still seems to apply clean.

dmouse’s picture

Status: Needs work » Needs review
FileSize
5.06 KB

The patch #15 and #16 not work when applying.

I manually apply the patch, and i solved others problems with the "Language::TYPE_INTERFACE" and "$user->uid"

// https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Language%...
// propertys
-language(Language::TYPE_INTERFACE)->langcode
+language(Language::TYPE_INTERFACE)->id

get the user id

-$user->uid // protected
+$user->id() //getter

=)

dmouse’s picture

re-upload i forget one "print_r" =P

undertext’s picture

Request parameter must be passed to drupal_page_get_cache function. language() function is now deprecated.
Patch above uses Symfony Request and Response objects, not Guzzle.
Note that patches in this thread are covering next issues:
https://drupal.org/node/2045415, https://drupal.org/node/2017677, https://drupal.org/node/2012178

dmouse’s picture

Change the global user to Drupal::currentUser(), the global variable is deprecate.

@undertext in line 419 of admin_menu.module, the exit function not it is necessary?

salvis’s picture

#21 has made admin_menu work again for me.

Without this patch, installing admin_menu crashes D8 to the point where it needs reinstalling.

klonos’s picture

Status: Needs review » Reviewed & tested by the community

Seconding this. Not an actual code review, but as @salvis says the patch makes admin_menu work in D8 again.

klonos’s picture

With latest D8 dev and #21 applied I now get this when trying to enable the module:

Fatal error: Cannot use object of type Drupal\Core\Entity\EntityType as array in /sites/default/modules/admin_menu/admin_menu.map.inc on line 40

jibran’s picture

I have created a fork of admin_menu 8.x-3.x on github. Please help me fix it for Drupal 8
PRs are welcome. https://github.com/jibran/admin_menu

joachim’s picture

The maintainers of this module are still active. Rather than forking, this patch needs rerolling so it can be committed here.

Dave Reid’s picture

Sorry I missed the RTBC window for this earlier. I'd be happy to commit anything that is up to date for fixing things on the 8.x-3.x branch that has been tested by several others.

jibran’s picture

Well it is not a simple task anymore now it is not working anymore because we have revamped all the menu system in D8 and it should be re-written above the new system. We fixed #1939660: Use YAML as the primary means for service registration 2yrs ago so you can think how obsolete is this code. I am happy that @Dave Reid is here now to commit patches. :)

DamienMcKenna’s picture

@klonos: If you do get to fix the problems, please upload patches here so that they can be reviewed, patches can be committed and a working version can be released.

joachim’s picture

> Well it is not a simple task anymore now it is not working anymore because we have revamped all the menu system in D8 and it should be re-written above the new system

Could someone update the issue summary to explain what needs to be done, rather than just a statement of how it currently crashes?

Also, would this issue benefit from being broken down into smaller chunks?

jibran’s picture

joachim’s picture

Cool! Maybe file a new issue for that here & post that diff as a patch?

jibran’s picture

thalles’s picture

This module has been deprecated for Drupal 8.
For Drupal 8: the Admin Toolbar provides an experience similar to admin_menu with the core toolbar.

thalles’s picture

Category: Bug report » Support request
Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.