I'm using config_installer to install. Almost at the end of the installation, I get the following fatal error. I previously applied patch 1356276-302, but I don't think this is related. It started happening after upgrading core to 8.3.0. The install does not finish correctly (the site has no admin user set). Any help or workaround is appreciated.

~/p/n/n/d/bin (master ⚡☡=) ./drush site-install config_installer config_installer_sync_configure_form.sync_directory=/var/www/drupal/config/sync --verbose --db-url=mysql://root:xxx@db/drupal --account-name=admin --account-pass=xxx -y
Executing: mysql --defaults-extra-file=/tmp/drush_IucryR --database=drupal --host=db --silent  < /tmp/drush_4Sag50 > /dev/null
You are about to DROP all tables in your 'drupal' database. Do you want to continue? (y/n): y
Sites directory /var/www/drupal/web/sites/default already exists -      [notice]
proceeding.
Executing: mysql --defaults-extra-file=/tmp/drush_mYQQIy --database=drupal --host=db --silent  < /tmp/drush_nu5C8H > /dev/null
Executing: mysql --defaults-extra-file=/tmp/drush_hGpyVf --database=drupal --host=db --silent  < /tmp/drush_vyJbkp
Executing: mysql --defaults-extra-file=/tmp/drush_YotAaX --database=drupal --host=db --silent  < /tmp/drush_S0z3x6
Starting Drupal installation. This takes a while. Consider using the        [ok]
--notify global option.
Error: Call to a member function getThirdPartySetting() on null in /var/www/drupal/web/core/modules/content_translation/src/ContentTranslationManager.php on line 98 #0 /var/www/drupal/web/core/modules/content_translation/content_translation.module(166): Drupal\content_translation\ContentTranslationManager->isEnabled('media', '')
#1 /var/www/drupal/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(501): content_translation_entity_bundle_info_alter(Array, NULL, NULL)
#2 /var/www/drupal/web/core/lib/Drupal/Core/Entity/EntityTypeBundleInfo.php(110): Drupal\Core\Extension\ModuleHandler->alter('entity_bundle_i...', Array)
#3 /var/www/drupal/web/core/lib/Drupal/Core/Entity/EntityTypeBundleInfo.php(80): Drupal\Core\Entity\EntityTypeBundleInfo->getAllBundleInfo()
#4 /var/www/drupal/web/core/lib/Drupal/Core/Entity/Plugin/DataType/Deriver/EntityDeriver.php(95): Drupal\Core\Entity\EntityTypeBundleInfo->getBundleInfo('block')
#5 /var/www/drupal/web/core/lib/Drupal/Component/Plugin/Discovery/DerivativeDiscoveryDecorator.php(101): Drupal\Core\Entity\Plugin\DataType\Deriver\EntityDeriver->getDerivativeDefinitions(Array)
#6 /var/www/drupal/web/core/lib/Drupal/Component/Plugin/Discovery/DerivativeDiscoveryDecorator.php(87): Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDerivatives(Array)
#7 /var/www/drupal/web/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php(283): Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDefinitions()
#8 /var/www/drupal/web/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php(174): Drupal\Core\Plugin\DefaultPluginManager->findDefinitions()
#9 /var/www/drupal/web/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryCachedTrait.php(22): Drupal\Core\Plugin\DefaultPluginManager->getDefinitions()
#10 /var/www/drupal/web/core/lib/Drupal/Core/TypedData/DataDefinition.php(193): Drupal\Core\Plugin\DefaultPluginManager->getDefinition('field_item:stri...')
#11 /var/www/drupal/web/core/lib/Drupal/Core/Field/BaseFieldDefinition.php(566): Drupal\Core\TypedData\DataDefinition->getClass()
#12 /var/www/drupal/web/core/lib/Drupal/Core/Field/BaseFieldDefinition.php(555): Drupal\Core\Field\BaseFieldDefinition->getFieldItemClass()
#13 /var/www/drupal/web/core/lib/Drupal/Core/Field/BaseFieldDefinition.php(485): Drupal\Core\Field\BaseFieldDefinition->getMainPropertyName()
#14 /var/www/drupal/web/modules/contrib/media_entity/src/Entity/Media.php(309): Drupal\Core\Field\BaseFieldDefinition->setDefaultValue('')
#15 /var/www/drupal/web/core/lib/Drupal/Core/Entity/EntityFieldManager.php(204): Drupal\media_entity\Entity\Media::baseFieldDefinitions(Object(Drupal\Core\Entity\ContentEntityType))
#16 /var/www/drupal/web/core/lib/Drupal/Core/Entity/EntityFieldManager.php(171): Drupal\Core\Entity\EntityFieldManager->buildBaseFieldDefinitions('media')
#17 /var/www/drupal/web/core/lib/Drupal/Core/Entity/EntityFieldManager.php(394): Drupal\Core\Entity\EntityFieldManager->getBaseFieldDefinitions('media')
#18 /var/www/drupal/web/core/lib/Drupal/Core/Entity/EntityManager.php(154): Drupal\Core\Entity\EntityFieldManager->getFieldStorageDefinitions('media')
#19 /var/www/drupal/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(282): Drupal\Core\Entity\EntityManager->getFieldStorageDefinitions('media')
#20 /var/www/drupal/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(1411): Drupal\Core\Entity\Sql\SqlContentEntityStorage->getTableMapping()
#21 /var/www/drupal/web/core/lib/Drupal/Core/Field/FieldStorageDefinitionListener.php(74): Drupal\Core\Entity\Sql\SqlContentEntityStorage->onFieldStorageDefinitionCreate(Object(Drupal\Core\Field\BaseFieldDefinition))
#22 /var/www/drupal/web/core/lib/Drupal/Core/Entity/EntityManager.php(411): Drupal\Core\Field\FieldStorageDefinitionListener->onFieldStorageDefinitionCreate(Object(Drupal\Core\Field\BaseFieldDefinition))
#23 /var/www/drupal/web/core/lib/Drupal/Core/Entity/EntityDefinitionUpdateManager.php(169): Drupal\Core\Entity\EntityManager->onFieldStorageDefinitionCreate(Object(Drupal\Core\Field\BaseFieldDefinition))
#24 /var/www/drupal/web/core/modules/content_translation/src/ContentTranslationUpdatesManager.php(63): Drupal\Core\Entity\EntityDefinitionUpdateManager->installFieldStorageDefinition('content_transla...', 'media', 'content_transla...', Object(Drupal\Core\Field\BaseFieldDefinition))
#25 /var/www/drupal/web/core/modules/content_translation/src/ContentTranslationUpdatesManager.php(77): Drupal\content_translation\ContentTranslationUpdatesManager->updateDefinitions(Array)
#26 /var/www/drupal/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): Drupal\content_translation\ContentTranslationUpdatesManager->onConfigImporterImport(Object(Drupal\Core\Config\ConfigImporterEvent), 'config.importer...', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#27 /var/www/drupal/web/core/lib/Drupal/Core/Config/ConfigImporter.php(644): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('config.importer...', Object(Drupal\Core\Config\ConfigImporterEvent))
#28 /var/www/drupal/web/core/lib/Drupal/Core/Config/ConfigImporter.php(488): Drupal\Core\Config\ConfigImporter->finish(Array)
#29 /var/www/drupal/web/profiles/contrib/config_installer/config_installer.profile(139): Drupal\Core\Config\ConfigImporter->doSyncStep('finish', Array)
#30 /var/www/drupal/web/core/includes/batch.inc(252): config_install_batch_process(Object(Drupal\Core\Config\ConfigImporter), 'finish', Array)
#31 /var/www/drupal/web/core/includes/form.inc(874): _batch_process()
#32 /var/www/drupal/web/core/includes/install.core.inc(625): batch_process(Object(Drupal\Core\Url), Object(Drupal\Core\Url))
#33 /var/www/drupal/web/core/includes/install.core.inc(546): install_run_task(Array, Array)
#34 /var/www/drupal/web/core/includes/install.core.inc(117): install_run_tasks(Array)
#35 /var/www/drupal/vendor/drush/drush/includes/drush.inc(726): install_drupal(Object(Composer\Autoload\ClassLoader), Array)
#36 /var/www/drupal/vendor/drush/drush/includes/drush.inc(711): drush_call_user_func_array('install_drupal', Array)
#37 /var/www/drupal/vendor/drush/drush/commands/core/drupal/site_install.inc(84): drush_op('install_drupal', Object(Composer\Autoload\ClassLoader), Array)
#38 /var/www/drupal/vendor/drush/drush/commands/core/site_install.drush.inc(254): drush_core_site_install_version('config_installe...', Array)
#39 /var/www/drupal/vendor/drush/drush/includes/command.inc(422): drush_core_site_install('config_installe...', 'config_installe...')
#40 /var/www/drupal/vendor/drush/drush/includes/command.inc(231): _drush_invoke_hooks(Array, Array)
#41 /var/www/drupal/vendor/drush/drush/includes/command.inc(199): drush_command('config_installe...', 'config_installe...')
#42 /var/www/drupal/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php(67): drush_dispatch(Array)
#43 /var/www/drupal/vendor/drush/drush/includes/preflight.inc(66): Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#44 /var/www/drupal/vendor/drush/drush/drush.php(12): drush_main()
#45 {main}
Drush command terminated abnormally due to an unrecoverable error.       [error]
Error: Call to a member function getThirdPartySetting() on null in Drupal\content_translation\ContentTranslationManager->isEnabled() (line 98 of /var/www/drupal/web/core/modules/content_translation/src/ContentTranslationManager.php).
CommentFileSizeAuthor
#96 interdiff_94-96.txt1.67 KBkriboogh
#96 2868294-96.patch8.77 KBkriboogh
#94 interdiff_84-94.txt6.34 KBkriboogh
#94 2868294-94.patch8.64 KBkriboogh
#87 2868294-87.patch5.33 KBshubham chandra
#84 interdiff_81-84.txt619 bytesravi.shankar
#84 2868294-84.patch8.42 KBravi.shankar
#81 interdiff-79-81.txt5.48 KBrassoni
#81 2868294-81.patch8.41 KBrassoni
#79 interdiff_78-79.txt5.84 KBpooja saraah
#79 2868294-79.patch5.34 KBpooja saraah
#78 Call-to-a-member-function-2868294-78.patch5.22 KBHarsh panchal
#78 reroll_diff_44-78.txt8.13 KBHarsh panchal
#64 2868294_64.patch5.15 KBmpp
#61 2868294-61.patch21.71 KBosman
#59 2868294-59-apply-after-2599228-do-not-test.patch5.14 KBtaran2l
#51 interdiff-2868294.txt979 bytesborisson_
#51 2868294-51.patch5.28 KBborisson_
#44 2868294-42-8.5.3.patch5.51 KBKittenDestroyer
#43 2868294-42.patch5.48 KBKittenDestroyer
#41 2868294-41.patch5.46 KBvijaycs85
#41 2868294-41-test-only.patch2.88 KBvijaycs85
#41 2868294-diff-36-41.txt979 bytesvijaycs85
#36 2868294-diff-35-36.txt631 bytesvijaycs85
#36 2868294-36-test-only.patch2.89 KBvijaycs85
#36 2868294-36.patch5.46 KBvijaycs85
#35 2868294-35.patch5.46 KBvijaycs85
#35 2868294-diff-31-35.txt1.22 KBvijaycs85
#35 2868294-35-test-only.patch2.88 KBvijaycs85
#31 2868294-31-test-only.patch2.89 KBvijaycs85
#31 2868294-31.patch5.46 KBvijaycs85
#28 2868294-25-8-4-x-backport.patch1.5 KBmanuel garcia
#25 2868294-25.patch2.58 KBvijaycs85
#24 interdiff-2868294-14-24.txt1.29 KBiainp999
#24 2868294-24.patch1.94 KBiainp999
#22 interdiff-2868294-14-22.txt745 bytesyogeshmpawar
#22 2868294-22.patch1.95 KByogeshmpawar
#14 2868294-13.patch1.95 KBmartijn de wit
#12 2868294-12.patch1.46 KBeiriksm
#2 content_translation_config-2868294-2.patch896 byteskjauslin

Issue fork drupal-2868294

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

  • 11.x Comparechanges, plain diff MR !8986
  • 2868294-call-to-a Comparecompare
  • 1 hidden branch
  • drupal-2868294-10.3 Comparecompare

Comments

kjauslin created an issue. See original summary.

kjauslin’s picture

StatusFileSize
new896 bytes

Note, some debugging has shown the following cases where $config will be null in the function isEnabled. I don't know whether this is a configuration problem, but adding a !is_null($config) in the following statement will let me finish the installation.

I added a patch which should work in any case ($config must not be null anyway) and circumvents the problem.

$entity_type_id=media
$bundle=''
$entity_type_id=shortcut
$bundle=''
dawehner’s picture

Let's also document on \Drupal\content_translation\ContentTranslationManager::loadContentLanguageSettings that the method can actually return NULL;

Jeroen_005’s picture

I experienced the same issue and applied this patch. But it's introduced a new error:

exception 'RuntimeException' with message 'Unable to determine class for field type '' found in the 'field.storage.' configuration' in /web/core/modules/field/src/FieldStorageConfigStorage.php:157

So I think the provided patch isn't the right approach.

kienan’s picture

The patch in #2 worked for me.

idebr’s picture

Version: 8.3.0 » 8.4.x-dev
Status: Active » Needs review

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

mpp’s picture

@dawehner, good idea to document this.

The patch in #2 worked for me.

goz’s picture

#2 works for me to in 8.3.x

maxplus’s picture

Thanks,
using Drupal 8.4.2 and drush config-import stopped at the end with this content_translation error.

Patch from #2 solved this error for me, thanks!

pedrop’s picture

I had the same error message during cim with PHP 7.1 and it turned out that with PHP 7.0 it works without any errors, so in our case this workaround was the solution.

eiriksm’s picture

StatusFileSize
new1.46 KB

Patch works for me!

Updated patch based on #3. Would be nice with a test as well?

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

martijn de wit’s picture

StatusFileSize
new1.95 KB

Using patch 2868294-12.patch with the latest 8.5.RC1
Error: Call to a member function getThirdPartySetting() on null in Drupal\content_translation\ContentTranslationManager->getBundleTranslationSettings() (line 122 of [PROJECT]/web/core/modules/content_translation/src/ContentTranslationManager.php).

Applying the same trick !is_null($config) to the getBundleTranslationSettings did the trick.

martijn de wit’s picture

iainp999’s picture

Hi everyone.

Patch 2 works for us too. Is there any update on this please? Thanks in advance.

martijn de wit’s picture

@iainp999 Why are you using patch nr2 ? It's an incomplete patch. See comment #3.

Please test te latest patch and/or mention which version of Drupal + Module you are using. Please explain more than I used #X and it works... we need to know the circumstances of your environment. Thank you.

iainp999’s picture

We're on 8.4.6 - there's no alternative on this thread yet?

vijaycs85’s picture

Status: Needs review » Reviewed & tested by the community

Looks good and fixes the fatal error.

We're on 8.4.6 - there's no alternative on this thread yet?

Probably it could be back ported to 8.5.x, not sure about 8.4.x though.

tstoeckler’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/core/modules/content_translation/src/ContentTranslationManager.php
@@ -95,7 +95,7 @@ public function isEnabled($entity_type_id, $bundle = NULL) {
+        if (!is_null($config) && $config->getThirdPartySetting('content_translation', 'enabled', FALSE)) {

@@ -119,7 +119,9 @@ public function setBundleTranslationSettings($entity_type_id, $bundle, array $se
+    if (!is_null($config)) {

The !is_null() is not necessary. It's fine to just check if ($config)

yogeshmpawar’s picture

Assigned: Unassigned » yogeshmpawar
yogeshmpawar’s picture

Assigned: yogeshmpawar » Unassigned
Status: Needs work » Needs review
StatusFileSize
new1.95 KB
new745 bytes

Changes done as per comment #20 & also added an interdiff.

iainp999’s picture

@yogesh-pawar thank you. I think you still have a call to is_null() in your patch in 22 though.

if (!is_null($config) && $config->getThirdPartySetting('content_translation', 'enabled', FALSE)) {

thanks.

iainp999’s picture

StatusFileSize
new1.94 KB
new1.29 KB

How about the attached? Thank you.

vijaycs85’s picture

StatusFileSize
new2.58 KB

Thanks @iainp99. Just realised it'd be possible to get NULL all instances of loadContentLanguageSettings call. How about this?

tstoeckler’s picture

Thanks for the quick turnaround. Didn't test the issue, but re-marking RTBC per #19.

tstoeckler’s picture

Status: Needs review » Reviewed & tested by the community

Ahem.

manuel garcia’s picture

StatusFileSize
new1.5 KB

Here's a backport to 8.4.x for #25 in case someone needs it :)

iainp999’s picture

thanks @manuel-garcia!

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs tests

In order to commit a bug fix we need an automated to test to prove that we've fixed the bug and ensure that we don't break it again in the future. For more information about writing tests in Drupal 8 see the following links:

  1. https://www.drupal.org/docs/8/testing
  2. https://api.drupal.org/api/drupal/core%21core.api.php/group/testing/8.5.x

Also we need some understand of how we get to the point where this is null and why and whether the fix is correct.

vijaycs85’s picture

Status: Needs work » Needs review
StatusFileSize
new5.46 KB
new2.89 KB

Setting it to needs review to test.

Also we need some understand of how we get to the point where this is null

We might need a functional test for this.

The last submitted patch, 31: 2868294-31.patch, failed testing. View results

Status: Needs review » Needs work

The last submitted patch, 31: 2868294-31-test-only.patch, failed testing. View results

iainp999’s picture

@vijaycs85 I think you've got a typo in a method name:

public function tstSetBundleTranslationSettings() {

vijaycs85’s picture

Status: Needs work » Needs review
StatusFileSize
new2.88 KB
new1.22 KB
new5.46 KB

Thanks @iainp999. Here is an update.

vijaycs85’s picture

StatusFileSize
new5.46 KB
new2.89 KB
new631 bytes

Sorry, another silly mistake on #35

The last submitted patch, 35: 2868294-35-test-only.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

The last submitted patch, 35: 2868294-35.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

The last submitted patch, 36: 2868294-36.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

Status: Needs review » Needs work

The last submitted patch, 36: 2868294-36-test-only.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

vijaycs85’s picture

Status: Needs work » Needs review
StatusFileSize
new979 bytes
new2.88 KB
new5.46 KB

Fixing another unintended failure.

The last submitted patch, 41: 2868294-41-test-only.patch, failed testing. View results

KittenDestroyer’s picture

StatusFileSize
new5.48 KB

2868294-41.patch Updated to 8.5.x core.

KittenDestroyer’s picture

Version: 8.6.x-dev » 8.5.x-dev
StatusFileSize
new5.51 KB

Attaching for 8.5.3 specific patch.

manuel garcia’s picture

Version: 8.5.x-dev » 8.6.x-dev

Thanks @KittenDestroyer. I believe this needs to be addressed first on 8.6.x so switching the issue's version back to that :)

For clarity, the patch to continue work on/review is still #41.

douggreen’s picture

Is a missing config a real issue that this solution just hides?

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

eiriksm’s picture

Patch works and looks good. Since I have a patch in this issue, leaving to others to RTBC.

eiriksm’s picture

Reviewing the patch in #41, I noticed that the comments and naming of functions and dataproviders seems to be taken from somewhere else (probably copy-pasted). Small nit though.

borisson_’s picture

Status: Needs review » Needs work
Issue tags: -Needs tests

Removing the needs tests tag.

  1. +++ b/core/modules/content_translation/tests/src/Kernel/ContentTranslationManagerTest.php
    @@ -0,0 +1,96 @@
    +  protected $strictConfigSchema = FALSE;
    

    Why are we disabling strict config schema checking here? We probably shouldn't do that if we can help it.

  2. +++ b/core/modules/content_translation/tests/src/Kernel/ContentTranslationManagerTest.php
    @@ -0,0 +1,96 @@
    +   * Modules to enable.
    +   *
    +   * @var array
    

    Can be {@inheritdoc}

borisson_’s picture

Status: Needs work » Needs review
StatusFileSize
new5.28 KB
new979 bytes

This fixes my own remarks.

tikaszvince’s picture

borisson_’s picture

Since the other patch has also already been RTBC before, we should probably close this. Not sure though.

danepowell’s picture

I encountered this error on Drupal 8.6. I tried #74 in #2599228: Programmatically created translatable content type returns SQL error on content creation and it didn't help. But #51 in this issue worked great, so it seems like there's a gap between the two approaches. Not sure if that's specific to 8.6 or what.

jgalletta’s picture

I'm afraid the patch introduces another bug.
I have an install script that
- install a brand new Drupal site
- import the configuration
- run migrations to populate the database

I started to get the "Call to a member function getThirdPartySetting() on null in ContentTranslationManager" at the end of the import configuration step, so I tried the #51 patch. It removed the error message, but now I run into this problem: https://www.drupal.org/project/drupal/issues/2599228.

With the #51 patch, the column content_translation_source in table node_field_data is not created during the install / import config process. If I remove the patch, the column is created like it should be.

taran2l’s picture

I can confirm that patch from #51 creates an issue with missing content_translation_source column. Patch from #2599228-105: Programmatically created translatable content type returns SQL error on content creation does not fix this issue on it's own.

taran2l’s picture

Status: Needs review » Needs work

Seems like the in order to fix the issue both patches are required. One from here and one from #2599228-105: Programmatically created translatable content type returns SQL error on content creation. The problem is that they cannot be applied together. I think those two issues should be combined into a single one.

taran2l’s picture

He's a patch that can be applied after #2599228-105: Programmatically created translatable content type returns SQL error on content creation.

So, should those 2 issues be combined? Or just wait until the other one is committed.

Regarding questions in #30 and #46 that we are fixing not the real issue here, as config should not be null. The easiest way to reproduce this is to create a block content block and export it to configuration. As you might know custom blocks are not exported "correctly", see #2756331: Custom blocks cannot be properly exported and imported. Then try to install site using config_installer. Boom.

martijn de wit’s picture

Added test manually because off issue status :)

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

alexpott’s picture

[##2599228] has been committed so we can now concentrate on this issue without having to combine patches.

mpp’s picture

Status: Needs work » Needs review
StatusFileSize
new5.15 KB

I couldn't get the patch in #59 tested so here's a reroll of #59 against 8.8.

berdir’s picture

Would be great to have an updated issue summary update, when this happens exactly and what we are doing to fix it.

Status: Needs review » Needs work

The last submitted patch, 64: 2868294_64.patch, failed testing. View results

neelaj82’s picture

All upgraded to the 8.7.0 core just now and this patch failed https://www.drupal.org/files/issues/2018-09-26/2868294-51.patch What are you all using for 8.7.0?

zyla’s picture

Hello @neelaj82,
I have this same issue. Did you find how to fix it ? Thank you !

martijn de wit’s picture

patch 2868294_64.patch from nr 64 should work ?

zyla’s picture

Thanks ! For the current version of 8.7.x, I tested the patch #64 and it works. The fail triggered during test seems to be related to the new file ContentTranslationManagerTest.php and it doesn't impact the issue itself.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

tessa bakker’s picture

Had kind of the same issue after reusing a database where the system.menu.devel config wasn't correctly imported, but I missed that part so I went on with the idea that everything was fine. But when I uninstalled the module webprofiler, the message was the same as in the description of this issue.

After some debugging, I could trace the issue back to system.menu.devel in the config table. The stored configuration was missing an ID and some other data, only the dependencies array was available.

The problem in my case was, when https://git.drupalcode.org/project/drupal/-/blob/9.3.x/core/lib/Drupal/C... (\Drupal\Core\Config\Entity\ConfigEntityStorage::doLoadMultiple) is searching for the 'id' ($id = $config->get($this->idKey);) in the config record, it is missing. Because of the missing ID in the stored config, the key for processing configuration entity bundles array will be empty, and result in a empty key with a config entity object that isn't usable.

The patch just hides the invalid config in the database, I think it would be better to be aware of the problem and/or exclude the invalid config earlier on in the code at ConfigEntityStorage::doLoadMultiple().

After I removed the config entry and run config import with Drush, the issue was gone. I tried to recreate the situation, but wasn't able to.

Site setup: Drupal 8.9.19 with Configuration Split (1.7) for Devel & Webprofiler

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Harsh panchal’s picture

Status: Needs work » Needs review
StatusFileSize
new8.13 KB
new5.22 KB

Rerolled patch against drupal-9.5.x-dev

pooja saraah’s picture

StatusFileSize
new5.34 KB
new5.84 KB

Fixed failed commands on #78
Attached interdiff

Status: Needs review » Needs work

The last submitted patch, 79: 2868294-79.patch, failed testing. View results

rassoni’s picture

StatusFileSize
new8.41 KB
new5.48 KB
rassoni’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 81: 2868294-81.patch, failed testing. View results

ravi.shankar’s picture

Status: Needs work » Needs review
StatusFileSize
new8.42 KB
new619 bytes

Fixed failed tests of patch #81.

Status: Needs review » Needs work

The last submitted patch, 84: 2868294-84.patch, failed testing. View results

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

shubham chandra’s picture

StatusFileSize
new5.33 KB

Added patch against #84 in Drupal 10.1.x

jamesyao’s picture

Thanks @shubham-chandra for the patch #87.
It works well on Drupal Core 9.4.8 with PHP8.0 & Mysql 5.7.

bnjmnm’s picture

Patch #87 doesn't fix anything, it instead removes the tests that are failing, but those tests are there for a reason. The correct approach would be to get those tests passing, not removing them. Work should continue from an earlier patch that includes ContentManagerTranslationTest

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

kriboogh made their first commit to this issue’s fork.

kriboogh changed the visibility of the branch drupal-2868294-10.3 to hidden.

kriboogh’s picture

StatusFileSize
new8.64 KB
new6.34 KB

Patch of !MR8986 (works on 11.0 and 10.3, 10.2)

kriboogh’s picture

Tests are working now, but someone should have a look at what those test values should do...

kriboogh’s picture

StatusFileSize
new8.77 KB
new1.67 KB

patch for MR

kriboogh’s picture

I was looking a bit more into the test that is failing (data index 3). The test data uses a non existing bundle id. What happens then is loadContentLanguageSettings initially cannot find the config and then creates a new one for the non existing bundle.

So either a couple of things should happen:
- the test data is incorrect and tries to test a situation that can never happen, being a non existing bundle id and the hasexception flag set to false or
- loadContentLanguageSettings should not create a config for a non existing bundle, and should return null. So loadContentLanguageSettings should check if the entity_id and bundle actually exist?

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.