Closed (fixed)
Project:
ISBN Field
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Jun 2026 at 09:13 UTC
Updated:
10 Jul 2026 at 08:20 UTC
Jump to comment: Most recent
we should probably return
$element['value'];
instead of
just
$element
in case of an validation error.
If you use Drupal core inline_form_errors module, you will note, that the link to the error element provided on top of the page will not scroll to the actual field. This is an indication of wrong error element returned. By using $element['value'] instead this gets fixed.
Screenshot with inline form errors:

| Comment | File | Size | Author |
|---|---|---|---|
| Screenshot from 2026-06-24 11-11-49.png | 6.39 KB | stefan.korn |
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 #3
stefan.kornComment #4
schillerm commentedHi hello, I just tested and reviewed MR! 17
old anchor element
<a href="#edit-field-isbn-0">ISBN</a>
new anchor element
<a href="#edit-field-isbn-0-value">ISBN</a>
New link works as expected. Simple code change, moving to RTBC.
Comment #5
megachrizThanks for the fix! I tested with and without inline_form_errors module. When inline_form_errors module is installed the link in the error message doesn't indeed let you jump to the field without the fix. And with the fix it does.
I scheduled the merge.