-
Notifications
You must be signed in to change notification settings - Fork 118
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
Issue 1367: Loosen Islandora Breadcrumbs applies #795
Conversation
I was able to come back and verify that, yes, with this PR the scenario @qadan mentioned in the ticket (copied below for reference) is resolved with this PR. 🎉
Note: this scenario assume that the breadcrumbs include the current page (which is not enabled by default with this module). After the PR is applied visiting 'A' will display the appropriate breadcrumbs without needing the cached cleared. |
Unrelated to this PR but there is an edge case here where a hanging entity reference will cause a WSOD, in 7 it appears we just killed the recursion and added a placeholder To reproduce chain together A->B->C, delete A and visit B and you'll WSOD as follows:
We could throw a check on https://github.com/Islandora/islandora/pull/795/files#diff-cf1229cc1e397e9c51c68ebcc74162b4L112 to ensure there is actually a resolvable parent before recursing again but we'd need to decide on what behavior we'd want rendered in the breadcrumbs when this scenario arises. Am fine potentially splitting this into another issue @seth-shaw-unlv and moving this one along. |
Might as well look at it now. |
@jordandukart, I'm not able to reproduce the WSOD and error message. I would think that the existing check for empty and the target empty being an instance of EntityInterface (which should have catched Null) would cover this case: !$entity->get($this->config->get('referenceField'))->isEmpty() &&
$entity->get($this->config->get('referenceField'))->entity instanceof EntityInterface) { 🤷♂️ |
On a fresh box I can't reproduce what I had mentioned in #795 (comment), leaving this open as per @seth-shaw-unlv's Slack message about wanting to roll a test. |
@jordandukart, I updated the test and it seems happy with the change too. Assuming Travis doesn't timeout again we should be 👍. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, test passed locally as well just Travis timing out.
@jordandukart, I updated the travis script to see if it reveals what is stalling the build. 🤞 If any other @Islandora/8-x-committers want to help debug Travis, I'd be happy for the support. |
Whelp, Travis decided it was happy when I added the process listing command and nothing looks wrong... Let's see what happens when I take it back out. |
Hey, @jordandukart! Green means go! 😀 I'm glad Travis is feeling better today. |
GitHub Ticket: Islandora/documentation#1367
What does this Pull Request do?
Loosens the
applies
on islandora breadcrumbs so that it no longer requires a value in the configured reference field (member_of by default). This allows Islandora Objects with the Collection model (that won't have a value in member_of unless they are sub-collections) to use this breadcrumb builder instead of defaulting to the system provided breadcrumbs.What's new?
Simply removed the
!empty
condition from applies.How should this be tested?
dsm
to the breadcrumb builder'sbuild
function. It won't fire when the system one does.)dsm
function it should fire now.)Additional Notes:
If you want to be extra sure it is working, you can edit the islandora.breadcrumbs config file's 'includeSelf' setting to 'TRUE' and clear caches again. You should now see the current node's title in the breadcrumbs. (Sorry, we don't have a form for this yet, so you need to use one of the system-supplied config editing methods. We should probably make an issue for that... or maybe I should just do that now...)
This PR is untested since my VM is still tied up testing other stuff...Finally tested and ready for review.Also, I haven't put it through @qadan's test from the ticket.... but my wife is kicking me off the computer right now.
Interested parties
@qadan and @jordandukart