Skip to content

Conversation

@andybroomfield
Copy link
Contributor

@andybroomfield andybroomfield commented Feb 27, 2023

Fix #124

If the image style large_21_9 isn't present, use the full url of the image.

Fix #124

If the image style `large_21_9` insn't present, use the full url of the image.
@andybroomfield andybroomfield force-pushed the fix/2.x/124-call-out-box-when-image-style-missing branch from e883305 to d3bf971 Compare February 27, 2023 14:52
@ekes
Copy link
Member

ekes commented Mar 6, 2023

Couple of questions:

  • where is this paragraph style used?
  • why could the image derivative type not exist?
  • can it better be made configurable to a style that then does exist (and gets a dependency)?

@andybroomfield
Copy link
Contributor Author

andybroomfield commented Mar 6, 2023

The call out box is used by subsites.
example: https://www.brighton-hove.gov.uk/madeira-terrace-restoration
BHCC are in the process of rationlising our image and media styles, as there are quite a lot and these are mostly used in support of the theme, and our image styles are different.
Currently we are leaving the styles in place until we are sure we can delete them . When we did delete them this issue came up.

Ideally this should be configurable, and we don't seem to encounter other issues as the other image and media styles are in config and are only an issue on initial install. Given this renderes as a background image, either a background image field formatter or loading the set image style from the media display would be the better way forward.

This PR is just to solve the initial bug though, so I'd like to move forward with it (Impact should be none form those who keep the image style around). For now we can then use our own theme preproccess hook to put the correct style in.

@finnlewis finnlewis requested a review from ekes March 6, 2023 14:23
@finnlewis
Copy link
Member

@ekes will take a look at this with respect to config for image styles

@ekes
Copy link
Member

ekes commented Mar 13, 2023

localgovdrupal/localgov_core#162 (comment) oof

I say get this in to stop breaking stuff and start a wider discussion on localgov_core/localgov_media

Copy link
Member

@finnlewis finnlewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. Looks good to me too!

@andybroomfield
Copy link
Contributor Author

Thanks all, yes, lets look at image styles seperatly.

@andybroomfield andybroomfield merged commit f532cf3 into 2.x Mar 13, 2023
@stephen-cox stephen-cox deleted the fix/2.x/124-call-out-box-when-image-style-missing branch March 20, 2023 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Subsites paragraphs assume image styles exist in code

4 participants