Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Focal Image Styles #521

Closed
kevincrafts opened this issue Oct 27, 2023 · 2 comments · Fixed by CuBoulder/tiamat-custom-entities#83
Closed

Focal Image Styles #521

kevincrafts opened this issue Oct 27, 2023 · 2 comments · Fixed by CuBoulder/tiamat-custom-entities#83
Assignees
Labels
bug Something isn't working

Comments

@kevincrafts
Copy link
Member

When inserting an image using the Focal Image Square, or Focal Image Wide image styles, two images and some text are inserted:

image
@patrickbrown-io patrickbrown-io self-assigned this Oct 30, 2023
@patrickbrown-io
Copy link
Contributor

Hi @kevincrafts - I'm not able to replicate this bug in my environment for either Focal Image style.

Focal Image Styles are working as expected on Basic Page and Articles pages with various alignments set for each image. I've inserted the images using Insert Media on the CK Toolbar, in both the WYSIWIG and Full HTML editors in body fields...is there any more information you can provide to trigger this behavior?

Screenshot 2023-10-30 at 11 21 13 AM Screenshot 2023-10-30 at 11 22 00 AM

@jcsparks jcsparks added the bug Something isn't working label Oct 30, 2023
@patrickbrown-io
Copy link
Contributor

patrickbrown-io commented Oct 31, 2023

@jcsparks
I think this is due to conflicting config between profile and custom-entities.

Local dev enviroments seem to favor one set of config while the sandbox sites favor another, resulting in some fields not being hidden on the sandbox while our local dev enviroments don't have this issue.

Both profile and custom-entities have the following file: core.entity_view_display.media.image.focal_image_wide.yml which would control the visibilty of those fields Kevin is seeing. They differ between locations as shown below:

Custom Entities Version

langcode: en
status: true
dependencies:
  config:
    - core.entity_view_mode.media.focal_image_wide
    - field.field.media.image.field_media_image
    - field.field.media.image.field_media_image_caption
    - image.style.media_library
    - media.type.image
  module:
    - image
    - layout_builder
    - user
third_party_settings:
  layout_builder:
    enabled: false
    allow_custom: false
id: media.image.focal_image_wide
targetEntityType: media
bundle: image
mode: focal_image_wide
content:
  created:
    type: timestamp
    label: hidden
    settings:
      date_format: medium
      custom_date_format: ''
      timezone: ''
    third_party_settings: {  }
    weight: 1
    region: content
  field_media_image:
    type: image
    label: hidden
    settings:
      image_link: ''
      image_style: focal_image_wide
      image_loading:
        attribute: lazy
    third_party_settings: {  }
    weight: 2
    region: content
  thumbnail:
    type: image
    label: hidden
    settings:
      image_link: ''
      image_style: media_library
      image_loading:
        attribute: lazy
    third_party_settings: {  }
    weight: 3
    region: content
  uid:
    type: author
    label: hidden
    settings: {  }
    third_party_settings: {  }
    weight: 0
    region: content
hidden:
  field_media_image_caption: true
  name: true

Profile Version

langcode: en
status: true
dependencies:
  config:
    - core.entity_view_mode.media.focal_image_wide
    - field.field.media.image.field_media_image
    - field.field.media.image.field_media_image_caption
    - image.style.focal_image_wide
    - media.type.image
  module:
    - image
    - layout_builder
third_party_settings:
  layout_builder:
    enabled: false
    allow_custom: false
id: media.image.focal_image_wide
targetEntityType: media
bundle: image
mode: focal_image_wide
content:
  field_media_image:
    type: image
    label: hidden
    settings:
      image_link: ''
      image_style: focal_image_wide
      image_loading:
        attribute: lazy
    third_party_settings: {  }
    weight: 0
    region: content
hidden:
  created: true
  field_media_image_caption: true
  name: true
  thumbnail: true
  uid: true

The hidden fields being different reflect what Kevin is seeing and what exists on the sandbox sites. Not sure what else could be affected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
3 participants