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

Comment #1

dimitriskr created an issue. See original summary.

Comment #2

dimitriskr’s picture

Comment #3

dimitriskr commented
Issue tags: +Needs tests
damienmckenna’s picture

Comment #4

damienmckenna
Location TN, USA
commented
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

Comment #5

dimitriskr commented

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

dimitriskr’s picture

Comment #6

dimitriskr commented
Component: Code » Integration with other module

Comment #7

Comment #8

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

Comment #9

dimitriskr’s picture

Comment #10

dimitriskr commented
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.

Comment #11

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

dimitriskr’s picture

Comment #12

dimitriskr commented

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

Comment #13

damienmckenna
Location TN, USA
commented

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

Comment #14

dimitriskr commented

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