Currently if taxonomy module enabled service provider fails

Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException:    [error]
The service "serializer.normalizer.entity_reference_revision_item"
has a dependency on a non-existent service "rest.link_manager". in
/var/www/html/vendor/symfony/dependency-injection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php:58
Stack trace:
#0
/var/www/html/vendor/symfony/dependency-injection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php(42):
Symfony\Component\DependencyInjection\Compiler\CheckExceptionOnInvalidReferenceBehaviorPass->processReferences(Array)
#1
/var/www/html/vendor/symfony/dependency-injection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php(36):
Symfony\Component\DependencyInjection\Compiler\CheckExceptionOnInvalidReferenceBehaviorPass->processDefinition(Object(Symfony\Component\DependencyInjection\Definition))
#2
/var/www/html/vendor/symfony/dependency-injection/Compiler/Compiler.php(104):
Symfony\Component\DependencyInjection\Compiler\CheckExceptionOnInvalidReferenceBehaviorPass->process(Object(Drupal\Core\DependencyInjection\ContainerBuilder))
#3
/var/www/html/vendor/symfony/dependency-injection/ContainerBuilder.php(590):
Symfony\Component\DependencyInjection\Compiler\Compiler->compile(Object(Drupal\Core\DependencyInjection\ContainerBuilder))
#4 /var/www/html/core/lib/Drupal/Core/DrupalKernel.php(1284):
Symfony\Component\DependencyInjection\ContainerBuilder->compile()
#5 /var/www/html/core/lib/Drupal/Core/DrupalKernel.php(873):
Drupal\Core\DrupalKernel->compileContainer()
#6 /var/www/html/core/lib/Drupal/Core/DrupalKernel.php(797):
Drupal\Core\DrupalKernel->initializeContainer()
#7
/var/www/html/core/lib/Drupal/Core/Extension/ModuleInstaller.php(540):
Drupal\Core\DrupalKernel->updateModules(Array, Array)
#8
/var/www/html/core/lib/Drupal/Core/Extension/ModuleInstaller.php(191):
Drupal\Core\Extension\ModuleInstaller->updateKernel(Array)
#9
/var/www/html/core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php(83):
Drupal\Core\Extension\ModuleInstaller->install(Array, true)
#10 phar:///usr/bin/drush/commands/core/drupal/environment.inc(131):
Drupal\Core\ProxyClass\Extension\ModuleInstaller->install(Array,
true)
#11 phar:///usr/bin/drush/commands/core/drupal/environment.inc(198):
drush_module_install(Array)
#12 phar:///usr/bin/drush/commands/pm/pm.drush.inc(1167):
drush_module_enable(Array)
#13 phar:///usr/bin/drush/includes/command.inc(422):
drush_pm_enable('abilways_defaul...')
#14 phar:///usr/bin/drush/includes/command.inc(231):
_drush_invoke_hooks(Array, Array)
#15 phar:///usr/bin/drush/includes/command.inc(199):
drush_command('abilways_defaul...')
#16 phar:///usr/bin/drush/lib/Drush/Boot/BaseBoot.php(67):
drush_dispatch(Array)
#17 phar:///usr/bin/drush/includes/preflight.inc(66):
Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#18 phar:///usr/bin/drush/includes/startup.inc(458): drush_main()
#19 phar:///usr/bin/drush/includes/startup.inc(365):
drush_run_main(false, '/', 'Phar detected. ...')
#20 phar:///usr/bin/drush/drush(114): drush_startup(Array)
#21 /usr/bin/drush(10): require('phar:///usr/bin...')
#22 {main}

CommentFileSizeAuthor
#27 2867579-core83-27.patch11.07 KBandypost
#27 interdiff.txt374 bytesandypost
#26 2867579-core83-26.patch11.08 KBandypost
#26 interdiff.txt2.8 KBandypost
#25 2867579-core83-25.patch8.98 KBandypost
#25 interdiff.txt866 bytesandypost
#24 2867579-core83-24.patch8.39 KBandypost
#24 interdiff.txt261 bytesandypost
#22 2867579-core83-22.patch8.39 KBandypost
#22 interdiff.txt2.32 KBandypost
#19 2867579-core83-19.patch8.98 KBandypost
#19 interdiff.txt522 bytesandypost
#16 2867579-core83-16.patch8.55 KBandypost
#16 interdiff.txt3.28 KBandypost
#14 2867579-core83-14.patch8.28 KBandypost
#11 2867579-core83-9.patch64.41 KBwengerk
#8 2867579-core83-8.patch8.47 KBandypost
#7 2867579-core83-7.patch7.34 KBandypost
#4 2867579-core83-4.patch4.98 KBandypost
#2 2867579-core83-2.patch3.24 KBandypost
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

andypost created an issue. See original summary.

andypost’s picture

Status: Active » Needs review
FileSize
3.24 KB

Status: Needs review » Needs work

The last submitted patch, 2: 2867579-core83-2.patch, failed testing.

andypost’s picture

Status: Needs work » Needs review
FileSize
4.98 KB

Fix tests

larowlan’s picture

Status: Needs review » Reviewed & tested by the community

looks good, thanks @andypost

andypost’s picture

btw Sometimes I receive `The database connection is not serializable

debug leads to

$this->cache->set('hal:links:relations', $data, Cache::PERMANENT, ['entity_field_info']);`
`build/core/modules/hal/src/LinkManager/RelationLinkManager.php:141
andypost’s picture

andypost’s picture

andypost’s picture

pmagunia’s picture

When I try to apply the patch from comment #8 and #4 to latest dev, I'm getting a message that says:

fatal: corrupt patch at line 173

The error still appears if the Taxonomy module is disabled.

wengerk’s picture

@pmagunia It's because you apply the patch using the 8.x-1.0-alpha5 version and the given patch 2867579-core83-8.patch is based on the last commits that is not in the tagged version :D.

I just create a patch for people from the 8.x-1.0-alpha5to the compatible version (21/04/2017 - commit 2c9aad8).

Patch from 8.x-1.0-alpha5 to patched version

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 11: 2867579-core83-9.patch, failed testing.

pmagunia’s picture

@wengerk, thanks for the hint although I'm almost sure I applied to the latest dev (not alpha5).

andypost’s picture

Reroll for current dev
I think better to keep tests compatible at least til 8.4 (may need new postponed issue)

Status: Needs review » Needs work

The last submitted patch, 14: 2867579-core83-14.patch, failed testing.

andypost’s picture

Status: Needs work » Needs review
FileSize
3.28 KB
8.55 KB

Fix tests

alexpott’s picture

I think you should add a dependency on core >= 8.3.0

alexpott’s picture

I.e. add the following dependency to the .info.yml

  - drupal:system (>= 8.3.x)
andypost’s picture

waspper’s picture

Status: Needs review » Reviewed & tested by the community
larowlan’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/tests/src/Kernel/ExporterIntegrationTest.php
@@ -204,4 +203,22 @@ class ExporterIntegrationTest extends KernelTestBase {
+   * Returns link manager service name.
+   *
+   * Core before 8.3 using rest module defined link manager.
+
+   * @see https://www.drupal.org/node/2830467
+   *
+   * @return \Drupal\hal\LinkManager\LinkManager
+   *   The link manager service.
+   */
+  protected function getLinkManager() {
+    $service = 'hal.link_manager';
+    if (!\Drupal::hasService($service)) {
+      $service = 'rest.link_manager';
+    }
+    return \Drupal::service($service);
+  }

Do we need this now that we're enforcing it via the .info file - I don't think we do?

andypost’s picture

Status: Needs work » Needs review
FileSize
2.32 KB
8.39 KB

Reverted

alexpott’s picture

+++ b/default_content.info.yml
@@ -6,3 +6,4 @@ core: 8.x
+  - system (>=8.3.1)

I'd be a bit more liberal here - like the composer.json... so
= 8.3.x)

andypost’s picture

FileSize
261 bytes
8.39 KB

that's it)

andypost’s picture

andypost’s picture

FileSize
2.8 KB
11.08 KB

And fix leftover codestyle issues
I think it's ready for commit and next alpha release should be out

andypost’s picture

FileSize
374 bytes
11.07 KB

And finally no reason for system module dependency

larowlan’s picture

Status: Needs review » Reviewed & tested by the community
larowlan’s picture

Status: Reviewed & tested by the community » Fixed

  • larowlan committed 499396e on 8.x-1.x authored by andypost
    Issue #2867579 by andypost, wengerk, alexpott, larowlan, pmagunia,...

Status: Fixed » Closed (fixed)

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