Error: Call to undefined method Drupal\Core\Field\BaseFieldDefinition::getThirdPartySetting() in Drupal\field_permissions\FieldPermissionsService->fieldGetPermissionType() (line 140 of /app/docroot/modules/contrib/field_permissions/src/FieldPermissionsSer

Created on 11 July 2024, about 2 months ago
Updated 7 August 2024, about 1 month ago

Problem/Motivation

When i am using filtering the orders using the jsonapi routings i am getting a crash:
Error: Call to undefined method Drupal\Core\Field\BaseFieldDefinition::getThirdPartySetting() in Drupal\field_permissions\FieldPermissionsService->fieldGetPermissionType() (line 140 of /app/docroot/modules/contrib/field_permissions/src/FieldPermissionsService.php)

Steps to reproduce

Context:
1. Drupal core 9.5.11
2. PHP version: 8.1.28
3. field_permissions: 1.3
4. Using the module JSONAPI:Extras and the routing with displaying orders /jsonapi/commerce_orders/default?filter[state]=draft

Proposed resolution

1. Write a patch that will handle both field definitions FieldStorageConfigInterface | BaseFieldDefinition
2. If the type is BaseFieldDefinition just return FieldPermissionTypeInterface::ACCESS_PUBLIC for this method: fieldGetPermissionType

Remaining tasks

Patch.

User interface changes

No.

API changes

No.

Data model changes

No.

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡²πŸ‡©Moldova andrei.vesterli Chisinau

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024