Problem/Motivation

ExtractedText __construct() tries to use variables before they are defined.

Error: Call to a member function get() on null in /var/www/html/web/modules/contrib/search_api_attachments/src/Plugin/Field/FieldFormatter/ExtractedText.php on line 101 #0 /var/www/html/web/modules/contrib/search_api_attachments/src/Plugin/Field/FieldFormatter/ExtractedText.php(118): Drupal\search_api_attachments\Plugin\Field\FieldFormatter\ExtractedText->__construct()

Steps to reproduce

Configure any field display to use the ExtractedText formatter.

Proposed resolution

Move __contruct() operations to create()

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
ExtractedText-field-formatter.patch2.35 KBcp_dev
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

cp_dev created an issue. See original summary.

izus’s picture

Thanks for this

izus’s picture

this is now merged

izus’s picture

Status: Active » Fixed

  • 2c55943d committed on 9.0.x
    Issue #3505240 by cp_dev, izus: ExtractedText field formatter broken
    
izus’s picture

pushed it to 9.0.x too

izus’s picture

Status: Fixed » Closed (fixed)