Closed jaredgalanis closed 2 years ago
It seems like the preprocess_media
hook isn't being fired when the rendering is broken. This causes some of the variables needed in the template to be missing, so it renders as you see in the screenshot above
I also weirdly could not reproduce the issue when the Solr container was not running
@jabrah and I noticed that the media template was still rendering inside of the item template which causes some unexpected styling clashes. This was consistently happening before and was previously addressed in some bug fixes, but the present behavior is a bit more subtle and we only noticed it recently. This seems to happen immediately after the Drupal container boots up (i.e. right after running
make reset
or similar).During normal use, the item page may render correctly. You can force the issue by:
There are various checks for whether an item template is being rendered or a media and it appears that the checks currently in place are non-deterministic in ascertaining which template is being rendered.
We should look for a more reliable way of checking for whether an item template is being rendered.
These checks occur in the
idcui_preprocess_media
hook in theidcui.theme
file. They are then utilized in themedia.html.twig
template override in the theme.This is an example of how the issue looks when it is occurring. The title, margin with gray inset and white boxing around the image in this example are all unexpected here in the item template.