Problem/Motivation

Image fields include 'Alt' and 'Title' fields that cannot be searched

Steps to reproduce

Proposed resolution

Allow searching through image's alt and title values

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork scanner-3584902

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

dimitriskr created an issue. See original summary.

dimitriskr’s picture

Issue tags: +Needs tests
damienmckenna’s picture

Title: Search through node's image fields » Support image fields
Status: Active » Needs work

This is a great idea, thank you for your work on it so far.

The 2.0.x codebase has been refactored a lot recently so the MR will need to be redone.

dimitriskr’s picture

Yes indeed, I see new and amazing things here!
I'll open a new branch/MR

dimitriskr’s picture

Component: Code » Integration with other module

dimitriskr changed the visibility of the branch 3584902-search-through-nodes to hidden.

dimitriskr’s picture

Issue tags: +DevDaysAthens2026

With the new codebase, it's much better to extend field types! Amazing work

I've introduced getFieldColumns(), but I think we might not need it. It's still a WIP.

dimitriskr changed the visibility of the branch 2.0.x to hidden.

dimitriskr’s picture

I've seen some parts of the code that could be merged, and merged them ie in Entity::replace() and Entity::search(), the way we replace the value is common.

I think the Entity::getFieldStringColumns() should stay, but it blocks other driver compatibility (Project page reports only mysql compatibility). You have a better experience in Drupal's API so if there is another place we can get the table structure of the field being driver-agnostic, we can replace it.

Keeping it NW for the test

damienmckenna’s picture

This is great, thank you!

Should the "mysqlStringTypes" bit be abstracted out to make it easier for the module to support different database types? Right now it only works with MySQL, but I would like to expand it to other DBs later.

dimitriskr’s picture

I didn't find anything similar on other drivers like mysql's Schema::mysqlStringTypes property. There might be a query to retrieve the proper data types that represent strings so we can have something common there. We have to invent it

smustgrave’s picture

Could we expand the use case for wanting to replace alt + text?

dimitriskr’s picture

I am doing this already

smustgrave’s picture

That’s not a use case though lol. Going to tag for summary update