You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Generally adding member relationships and members seems to generate breadcrumbs okay, but there's some edge cases where they're not showing due to the breadcrumb cache not becoming invalidated when one would expect it to.
STR:
Create a collection repository item; we'll call it B
Add a member to that collection - I created an image item; we'll call it A
Create another collection repository item; we'll call it C
Edit B to have a member relationship to C
Visit A, note the breadcrumbs display "B / A"
Clear the cache via drush cr
Visit A, note the change in breadcrumbs displaying "C / B / A"
Some fun investigation times
Looking at chunk of islandora_breadcrumbs that determines IslandoraBreadcrumbBuilder::applies() to a repository item, the Islandora-centric breadcrumbs don't apply if whatever configured referenceField is empty. So it falls back to the breadcrumb implementation upstream, which currently has broken cache invalidation.
Would seem that any time you're creating objects that don't have parents (yet), you're going to have an inconsistent experience with breadcrumbing.
Building up an applies() based on multiple parameters would help; checking the existence of field_model and checking the field_media_of relationship would let us build up more complete breadcrumbs. Can probably throw in a proof of concept for this if desired
Also I believe the build() implementation is supposed to implement $breadcrumb->addCacheTags()? To have better control over when they're invalidated as well as for that X-Drupal-Cache-Tags support.
The text was updated successfully, but these errors were encountered:
As for the applies, I think simply removing the && !$node->get($this->config->get('referenceField'))->isEmpty() will let accomplish what we need. Simply having the member_of field should be sufficient.
I should have a PR shortly, but I won't be able to test it until I'm done testing a different PR.
Generally adding member relationships and members seems to generate breadcrumbs okay, but there's some edge cases where they're not showing due to the breadcrumb cache not becoming invalidated when one would expect it to.
STR:
drush cr
Some fun investigation times
Looking at chunk of islandora_breadcrumbs that determines
IslandoraBreadcrumbBuilder::applies()
to a repository item, the Islandora-centric breadcrumbs don't apply if whatever configuredreferenceField
is empty. So it falls back to the breadcrumb implementation upstream, which currently has broken cache invalidation.Would seem that any time you're creating objects that don't have parents (yet), you're going to have an inconsistent experience with breadcrumbing.
Building up an
applies()
based on multiple parameters would help; checking the existence offield_model
and checking thefield_media_of
relationship would let us build up more complete breadcrumbs. Can probably throw in a proof of concept for this if desiredAlso I believe the
build()
implementation is supposed to implement$breadcrumb->addCacheTags()
? To have better control over when they're invalidated as well as for thatX-Drupal-Cache-Tags
support.The text was updated successfully, but these errors were encountered: