With newer versions of PHP, such as 7.1.8, visiting the display or form display pages results in a WSOD and the following PHP error:

Narrowing occurred during type inference. Please file a bug report on bugs.php.net

The backtrace shows that it is coming from the inclusion of the field_ui.inc files via $form_state->loadInclude().

  │  #2 docroot/core/lib/Drupal/Core/Extension/ModuleHandler.php(275): require_once()
  │  #3 docroot/core/lib/Drupal/Core/Form/FormState.php(1254): Drupal\Core\Extension\ModuleHandler->loadInclude('field_group', 'inc', 'includes/field_...')
  │  #4 docroot/core/lib/Drupal/Core/Form/FormState.php(864): Drupal\Core\Form\FormState->moduleLoadInclude('field_group', 'inc', 'includes/field_...')
  │  #5 docroot/profiles/df/modules/contrib/field_group/field_group.module(134): Drupal\Core\Form\FormState->loadInclude('field_group', 'inc', 'includes/field_...')

Comments

Devin Carlson created an issue. See original summary.

devin carlson’s picture

Status: Active » Needs review
StatusFileSize
new1.1 KB

Using the moduleHandler service instead of trying to load the includes via $form_state fixes the problem. This leads me to believe that this could be a core issue.

Status: Needs review » Needs work

The last submitted patch, 2: use-modulehandler-to-load-include-files-2921878-2.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

devin carlson’s picture

Status: Needs work » Needs review
StatusFileSize
new1.32 KB

Alternatively, both include files could always be loaded.

Status: Needs review » Needs work

The last submitted patch, 4: always-load-includes-2921878-4.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

geek-merlin’s picture

Status: Needs work » Postponed (maintainer needs more info)

It looks like this may be fixed in 7.1.9 can you check this?

saltednut’s picture

We moved our testbed up to 7.2.4 and I haven't seen it since.

nils.destoop’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)
Eduardo Alvarez’s picture

Status: Closed (works as designed) » Active

Hello,

We are experimenting this issue and in our infrastructure we are blocked with php version 7.1.8 (the one supported on Centos 7 on the Software Collections repositories)

I don't think the patch resolved on 7.1.9 will be ever ported on the RedHat repositories, so we would still appreciate a solution for that.

Many thanks.

nils.destoop’s picture

Status: Active » Closed (won't fix)

I suggest you manually include a patch in your composer projects. The patch includes the file every request, while the include is only needed on the forms.