Open pyrello opened 1 year ago
This has cropped up again: https://psychology.prod.drupal.uiowa.edu/research/areas-focus (look for Eliot Hazeltine). His portrait appears in some places on the page but not others, despite having the same block settings (outside of filters).
Seeing this on sandbox.prod.drupal.uiowa.edu/node/41. What is interesting with this example is the first block has four articles displayed and the last two images are displaying. Most of the block below it only show the first two items where the images are missing.
Locally, once there are 21 blocks calling the same node, the images stop displaying. At 20 instances of the node, the images display in the first block. See the text find count in the images below:
Also recall this issue with media within WYSIWYG areas on a page: https://iowaweb.slack.com/archives/C8SM82ZFZ/p1667425762764869
no img tag in sight
drupal just throws in the towel
Just found this: https://www.drupal.org/project/drupal/issues/2940605
Can only intentionally re-render an entity with references 20 times
\Drupal\Core\Field\Plugin\Field\FieldFormatter\EntityReferenceFieldFormatter::viewElements() tracks how many times an "instance" of a reference has been rendered, to avoid ending up in a recursive loop, which is understandable.
This is related https://github.com/uiowa/uiowa/issues/5138
Here's another example of too many images on a page: https://sandbox.prod.drupal.uiowa.edu/small-and-medium-responsive-images
Problem/Steps to reproduce
The easiest way to see this is to visit https://sandbox.prod.drupal.uiowa.edu/people-directory and notice the Sean Adams-Hiett cards have an image, despite what the people list block settings show.
Here is the Xdebug output for the image field before it is rendered. Note that
#cache
is the only array key in thefield_image
render array. Our card build check currently filters this out because when allowed to render, this produces empty output.Proposed solution
My best idea is to find the points in the processing of building the view and node teaser render arrays and set breakpoints to see if the information above is more complete at some point earlier in the process. If so, try to find the mechanism that is stripping out the other information that would allow this to render.