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
Comment #2
devin carlson commentedUsing 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.
Comment #4
devin carlson commentedAlternatively, both include files could always be loaded.
Comment #6
geek-merlinIt looks like this may be fixed in 7.1.9 can you check this?
Comment #7
saltednutWe moved our testbed up to 7.2.4 and I haven't seen it since.
Comment #8
nils.destoop commentedComment #9
Eduardo Alvarez commentedHello,
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.
Comment #10
nils.destoop commentedI 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.