Problem/Motivation

Since updating to version 4, the Focal Point widget does not show the caption input field.

Steps to reproduce

  1. Select the Focal Point widget for an image field.
  2. Go to the entity creation form.
  3. Add an image to the field.
  4. Observe that the caption input field is not displayed.

Proposed resolution

Add a field-level setting to select which widgets the module integrates with, enabled by default only for the core widget.

Remaining tasks

  1. Implement feature
  2. Add test coverage

User interface changes

N/A

API changes

N/A

Data model changes

N/A

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

heavystonehead created an issue. See original summary.

foxy-vikvik’s picture

Title: not working with field formater from Focal Point » Focal Point field widget not working with Image Caption module

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

foxy-vikvik’s picture

Title: Focal Point field widget not working with Image Caption module » Caption field not displayed in Focal Point widget after update
Issue summary: View changes
foxy-vikvik’s picture

Issue summary: View changes

Hello,

This behavior is intentional. The forced integration of the caption field into all image field widgets was removed in version 4, as it could interfere with other widget implementations. Now, the module only integrates with the core image widget.

Therefore, this should be a Feature Request.

foxy-vikvik’s picture

Category: Bug report » Feature request
Status: Active » Needs work
foxy-vikvik’s picture

Issue summary: View changes
foxy-vikvik’s picture

Issue summary: View changes

kksandr changed the visibility of the branch 3541318-improve-widget to hidden.

kksandr’s picture

Version: 4.0.0-rc1 » 4.0.x-dev
Status: Needs work » Needs review
foxy-vikvik’s picture

Status: Needs review » Reviewed & tested by the community

  • kksandr committed 61a68713 on 4.0.x
    Issue #3541318 by kksandr: Added allowed widgets option
    
foxy-vikvik’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 4.0.x. Thanks!

kksandr’s picture

@heavystonehead you can now configure which widgets show the caption field in your image field settings. Look for the "Caption field allowed widgets" option and select the widgets where you want captions enabled.

heavystonehead’s picture

Status: Fixed » Needs work

Unfortunately, that doesn't quite work. I can enable the "Caption field allowed widgets" option under "field," but the field doesn't appear. I'm currently using 4.0.0-rc2.

kksandr’s picture

Status: Needs work » Postponed (maintainer needs more info)

Thanks for the report. To investigate this on 4.0.0-rc2 we need the exact configuration so we can reproduce.

Please attach or paste:

  • core.entity_form_display.* for the bundle where the field should appear
  • field.field.* for the affected field(s)
  • Drupal core version
  • Any errors in Recent log messages or the browser console

You can get the config with:

drush cget core.entity_form_display.<entity>.<bundle>.default
drush cget field.field.<entity>.<bundle>.<field_name>

Clearing caches may also help to check whether the issue is related to caching rather than configuration.

Also, please make sure that the user entering the content has permission to use the allowed text formats.

heavystonehead’s picture

- Clearing the cache didn't help
- Files are attached
- I didn't see anything in the log (related to the module).
- No errors in the browser console
- Field isn't displayed (admin)
- Drupal version 10.5.2

kksandr changed the visibility of the branch 3541318-allowed-widgets-option to hidden.

kksandr’s picture

Status: Postponed (maintainer needs more info) » Needs review

I have published a fix in this MR. Could you please test the patch and confirm if it resolves your issue?

heavystonehead’s picture

It works, after the patch the field is visible and usable. Thanks for fixing it :)

  • kksandr committed 7f26c105 on 4.0.x
    Issue #3541318 by kksandr: Fixed legacy hook
    
foxy-vikvik’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.