Problem/Motivation

Database::convert() outputs a variety of log errors when it has a problem with a value, e.g.

> $this->getLogger()->warning('An overlong value (more than 255 characters) was encountered while indexing: %value.
Database search servers currently cannot index such values correctly – the value was therefore trimmed to the allowed length.', ['%value' => $value]);

However, this doesn't tell you the item or the field where the value came from, which makes it hard to fix!

Steps to reproduce

Proposed resolution

Add these to all the log errors.

This needs either:

- A. passing the item and the field to convert() so it has them to add to the message
- B. change convert() to throw an exception instead, so that the caller which has the item and the field can take care of the logging

I'd be inclined more towards A.

Remaining tasks

Issue fork search_api-3611628

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

joachim created an issue.

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