Generated with the help of an LLM.

Problem/Motivation

A file is read only when it is added or replaced, so a site that installs the module, or opts a bundle in, gets suggestions for new uploads only. Content it already published stays unread. The README says so: existing content is not swept retroactively.

There is no way round it. The module has no button, command or action that queues files, and re-saving content does not help: on an update only file IDs the previous revision did not hold are queued, so a bulk save queues nothing. That rule is right for saves and stays.

From 2 December 2026 providers of generative AI systems placed on the market before 2 August 2026 must mark their output in a machine-readable way (EU AI Act, Article 50(2)), so more files will carry credentials, and a site may want its existing files read too.

Proposed resolution

  • A confirm form, linked from the settings form, for users with Administer content credentials, that queues one read per file referenced by every existing entity of the participating bundles: the same queue items a new entity's save creates. The default revision, in its default language.
  • Enumerated in steps with the Batch API. Nothing is read during the action; reading happens when the queue runs.
  • Refused, with a message, when nothing participates or no reading route is configured.
  • A suggestion an editor dismissed or accepted keeps its status when the unchanged file is read again.
  • README: the sentence about existing content replaced; CHANGELOG entry.

Remaining tasks

  • Failing tests, then the code.

Out of scope

  • Re-reading only the files read as untrusted before a trust-anchor change.
  • Reading automatically when a bundle is opted in, or on a schedule.
  • Reading a media file once instead of through both its source and thumbnail fields.
  • A Drush command.

Comments

maurice1969 created an issue. See original summary.

  • maurice1969 committed ee1c69c3 on 1.0.x
    Issue #3637382 by maurice1969: SPEC 045 — read the files of existing...

  • maurice1969 committed 1d9bd800 on 1.0.x
    Issue #3637382 by maurice1969: spell Queueing as drupal.org's cspell...
maurice1969’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

maurice1969’s picture

Committed to 1.0.x as ee1c69c, with a spelling fix in 1d9bd80; CI green on all nine jobs, phpunit on Drupal 11.4 and 11.3. A confirm form, linked from the settings form, queues one read per file of every existing entity of the participating bundles, in batch steps; it reads nothing itself, and is refused when nothing participates or no reading route is set up. Measured locally on Drupal 11.4.12 with AI Disclosure 1.0.0-beta2: the whole suite is green, a dismissed suggestion stays dismissed when its file is read again, and nine mutations each turn a test red. Ships in the next release.

  • maurice1969 committed 1d9bd800 on main
    Issue #3637382 by maurice1969: spell Queueing as drupal.org's cspell...

  • maurice1969 committed ee1c69c3 on main
    Issue #3637382 by maurice1969: SPEC 045 — read the files of existing...