I'm using config_installer with webform and it seems that when installing a site with a certain configuration the static cache for format_filters is empty and makes the install of new webform entities to fail with the following.

Error: Call to a member function id() on boolean in /var/www/html/web/core/modules/filter/filter.module on line 214 #0 /var/www/html/web/modules/contrib/webform/src/Plugin/WebformElement/ProcessedText.php(29): filter_default_format(Object(Drupal\Core\Session\AccountProxy))
#1 /var/www/html/web/modules/contrib/webform/src/WebformElementBase.php(253): Drupal\webform\Plugin\WebformElement\ProcessedText->getDefaultProperties()
#2 /var/www/html/web/modules/contrib/webform/src/WebformElementBase.php(351): Drupal\webform\WebformElementBase->hasProperty('multiple')
#3 /var/www/html/web/modules/contrib/webform/src/Entity/Webform.php(1162): Drupal\webform\WebformElementBase->hasMultipleValues(Array)
#4 /var/www/html/web/modules/contrib/webform/src/Entity/Webform.php(1044): Drupal\webform\Entity\Webform->initElementsRecursive(Array)
#5 /var/www/html/web/modules/contrib/webform/src/Entity/Webform.php(905): Drupal\webform\Entity\Webform->initElements()
#6 /var/www/html/web/modules/contrib/webform/src/Entity/Webform.php(1522): Drupal\webform\Entity\Webform->getElementsDecoded()
#7 /var/www/html/web/core/lib/Drupal/Core/Entity/EntityStorageBase.php(469): Drupal\webform\Entity\Webform->postSave(Object(Drupal\webform\WebformEntityStorage), false)
#8 /var/www/html/web/core/lib/Drupal/Core/Entity/EntityStorageBase.php(395): Drupal\Core\Entity\EntityStorageBase->doPostSave(Object(Drupal\webform\Entity\Webform), false)
#9 /var/www/html/web/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php(259): Drupal\Core\Entity\EntityStorageBase->save(Object(Drupal\webform\Entity\Webform))
#10 /var/www/html/web/core/lib/Drupal/Core/Entity/Entity.php(364): Drupal\Core\Config\Entity\ConfigEntityStorage->save(Object(Drupal\webform\Entity\Webform))
#11 /var/www/html/web/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php(637): Drupal\Core\Entity\Entity->save()
#12 /var/www/html/web/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php(386): Drupal\Core\Config\Entity\ConfigEntityBase->save()
#13 /var/www/html/web/core/lib/Drupal/Core/Config/ConfigImporter.php(971): Drupal\Core\Config\Entity\ConfigEntityStorage->importCreate('webform.webform...', Object(Drupal\Core\Config\Config), Object(Drupal\Core\Config\Config))
#14 /var/www/html/web/core/lib/Drupal/Core/Config/ConfigImporter.php(756): Drupal\Core\Config\ConfigImporter->importInvokeOwner('', 'create', 'webform.webform...')
#15 /var/www/html/web/core/lib/Drupal/Core/Config/ConfigImporter.php(584): Drupal\Core\Config\ConfigImporter->processConfiguration('', 'create', 'webform.webform...')
#16 /var/www/html/web/core/lib/Drupal/Core/Config/ConfigImporter.php(488): Drupal\Core\Config\ConfigImporter->processConfigurations(Array)
#17 /var/www/html/web/profiles/contrib/config_installer/config_installer.profile(139): Drupal\Core\Config\ConfigImporter->doSyncStep('processConfigur...', Array)
#18 /var/www/html/web/core/includes/batch.inc(252): config_install_batch_process(Object(Drupal\Core\Config\ConfigImporter), 'processConfigur...', Array)
#19 /var/www/html/web/core/includes/form.inc(874): _batch_process()
#20 /var/www/html/web/core/includes/install.core.inc(619): batch_process(Object(Drupal\Core\Url), Object(Drupal\Core\Url))
#21 /var/www/html/web/core/includes/install.core.inc(540): install_run_task(Array, Array)
#22 /var/www/html/web/core/includes/install.core.inc(117): install_run_tasks(Array)
#23 /var/www/html/vendor/drush/drush/includes/drush.inc(726): install_drupal(Object(Composer\Autoload\ClassLoader), Array)
#24 /var/www/html/vendor/drush/drush/includes/drush.inc(711): drush_call_user_func_array('install_drupal', Array)
#25 /var/www/html/vendor/drush/drush/commands/core/drupal/site_install.inc(84): drush_op('install_drupal', Object(Composer\Autoload\ClassLoader), Array)
#26 /var/www/html/vendor/drush/drush/commands/core/site_install.drush.inc(254): drush_core_site_install_version('config_installe...', Array)
#27 /var/www/html/vendor/drush/drush/includes/command.inc(422): drush_core_site_install('config_installe...', 'config_installe...')
#28 /var/www/html/vendor/drush/drush/includes/command.inc(231): _drush_invoke_hooks(Array, Array)
#29 /var/www/html/vendor/drush/drush/includes/command.inc(199): drush_command('config_installe...', 'config_installe...')
#30 /var/www/html/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php(67): drush_dispatch(Array)
#31 /var/www/html/vendor/drush/drush/includes/preflight.inc(66): Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#32 /var/www/html/vendor/drush/drush/drush.php(12): drush_main()
#33 {main}
Error: Call to a member function id() on boolean in filter_default_format() (line 214 of /var/www/html/web/core/modules/filter/filter.module).

Comments

rodrigoaguilera created an issue. See original summary.

rodrigoaguilera’s picture

Status: Active » Needs review
StatusFileSize
new800 bytes

Attached is a patch that follows the same logic as filter_default_format but with a fallback in case there is no format filters for this user

Status: Needs review » Needs work

The last submitted patch, 2: 2890035-format-default-filter-2.patch, failed testing. View results

rodrigoaguilera’s picture

Status: Needs work » Needs review
StatusFileSize
new907 bytes

Ok, now I get why the "function_existst".

Updated patch attached.

jrockowitz’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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

adubovskoy’s picture

Webform 5.0.0-beta19, the same error:
log:

[user@www]$ drush si landing
You are about to DROP all tables in your 'databasename' database. Do you want to continue? (y/n): y
Starting Drupal installation. This takes a while. Consider using the --notify global option.                                                                                                           [ok]
Error: Call to a member function id() on boolean in filter_default_format() (line 212 of /home/whcwbujn/public_html/core/modules/filter/filter.module).
Drush command terminated abnormally due to an unrecoverable error.