Problem/Motivation

Trying to add a new Schema.org content type shows:
Deprecated function: Using null as an array offset is deprecated, use an empty string instead in Drupal\schemadotorg\SchemaDotOrgEntityFieldManager->fieldTypeExists() (line 557 of modules/contrib/schemadotorg/src/SchemaDotOrgEntityFieldManager.php).

Backtrace:

Drupal\schemadotorg\SchemaDotOrgEntityFieldManager->fieldTypeExists() (Line: 437)
Drupal\schemadotorg\SchemaDotOrgEntityFieldManager->getSchemaPropertyFieldTypes() (Line: 175)
Drupal\schemadotorg\SchemaDotOrgEntityFieldManager->getPropertyFieldTypeOptions() (Line: 755)
Drupal\schemadotorg_ui\Form\SchemaDotOrgUiMappingForm->buildSchemaPropertyFieldForm() (Line: 630)
Drupal\schemadotorg_ui\Form\SchemaDotOrgUiMappingForm->buildSchemaPropertiesForm() (Line: 437)
Drupal\schemadotorg_ui\Form\SchemaDotOrgUiMappingForm->buildFieldTypeForm() (Line: 183)
Drupal\schemadotorg_ui\Form\SchemaDotOrgUiMappingForm->form() (Line: 108)
Drupal\Core\Entity\EntityForm->buildForm()
call_user_func_array() (Line: 554)
Drupal\Core\Form\FormBuilder->retrieveForm() (Line: 303)
Drupal\Core\Form\FormBuilder->buildForm() (Line: 73)
Drupal\Core\Controller\FormController->getContentResult()
call_user_func_array() (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->{closure:Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber::wrapControllerExecutionInRenderContext():121}() (Line: 634)
Drupal\Core\Render\Renderer::{closure:Drupal\Core\Render\Renderer::executeInRenderContext():634}()
Fiber->start() (Line: 635)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 121)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->{closure:Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber::onController():96}() (Line: 183)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 53)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->handle() (Line: 118)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 92)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 53)
Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 54)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 745)
Drupal\Core\DrupalKernel->handle() (Line: 19)

Steps to reproduce

  1. Go to /admin/config/schemadotorg/mappings
  2. Click the +Add Schema.org mapping button
  3. Click Create new Schema.org mapping > Content type
  4. Click any type, e.g. WebPage

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

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:

Comments

anybody created an issue. See original summary.

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

jrockowitz’s picture

Status: Active » Needs review

jrockowitz’s picture

I can't reproduce the issue, but the error is simple enough to address.

I suspect the error is coming from a newer version of PHP or a specific configuration (e.g., a missing field module or something).

anybody’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +PHP 8.5

Yes, I run into this also at simplytest.me - they are running PHP 8.5.5 guess that's the reason. Broken test with a slash now seems unrelated

  • jrockowitz committed 1f3a536a on 1.0.x
    feat: #3588414 Add Schema.org content type shows Deprecated function:...
jrockowitz’s picture

Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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