Problem/Motivation
After #1947536: Convert drupal_get_breadcrumb() and drupal_set_breadcrumb() to a service to remove LegacyBreadcrumbBuilder.php
drupal_set_breadcrumb
which is used in ViewExecutable::getBreadcrumb()
should be converted to breadcrumb builder service.
Proposed resolution
Create class ViewsBreadcrumbBuilder
and register views.breadcrumb
service.
Remaining tasks
Review
User interface changes
None
API changes
See #1947536: Convert drupal_get_breadcrumb() and drupal_set_breadcrumb() to a service and Extensible breadcrumb system added.
Related Issues
- #1978958: Convert comment_reply() to a Controller
- #2026071: Convert drupal_set_breadcrumb to breadcrumb builder service in MenuLinkFormController::form()
- #2070651: Introduce a path-based breadcrumb builder, remove the one that's based on {menu_links}.
- #2074177: Allow breadcrumb builders to be chained or alter other results rather than forced to run singly
Part of #2026075: [meta] Remove drupal_set_breadcrumb and LegacyBreadcrumbBuilder.
Change Notice Extensible breadcrumb system added.
Comment | File | Size | Author |
---|---|---|---|
#32 | breadcrumb-2061913-31.patch | 2.78 KB | tim.plunkett |
Comments
Comment #1
AndreyMaximov CreditAttribution: AndreyMaximov commentedTag added
Comment #2
AndreyMaximov CreditAttribution: AndreyMaximov commentedComment #3
AndreyMaximov CreditAttribution: AndreyMaximov commentedComment #5
AndreyMaximov CreditAttribution: AndreyMaximov commentedComment #6
andymartha CreditAttribution: andymartha commented@AndreyMaximov, how to test? The patch applies cleanly and I would like to review and push this through. I have built several test views, where are the breadcrumbs?
Comment #7
AndreyMaximov CreditAttribution: AndreyMaximov commentedI found taxonomy term context argument implements breadcrumb so I had chosen taxonomy/term/% view for testing
@andymartha, the taxonomy example is the only place where this is used now.
You maybe need to apply some of these patches #1857256: Convert the taxonomy listing and feed at /taxonomy/term/%term to Views , cause of changes in taxonomy module API
Comment #8
andymartha CreditAttribution: andymartha commentedBeen watching that thread, trying to understand it. Maybe work with dawehner before coming back to this thread.
Comment #9
andymartha CreditAttribution: andymartha commentedBeen watching that thread, trying to understand it. Maybe work with dawehner before coming back to this thread.
Comment #10
jibranTagging. #2026073: Convert drupal_set_breadcrumb/ViewExecutable::getBreadcrumb() to breadcrumb builder service in ViewExecutable is marked as duplicate.
Comment #11
dawehnerA different possibility would be to remove the breadcrumb support out of views and create a special one for taxonomy.
On an architecture point of view this totally makes sense, as the breadcrumb system is then separate from views.
Comment #12
dawehnerAdding API Change tag do get feedback from one maintainer.
Comment #13
jibransomething like #2061911: Remove drupal_set_breadcrumb and LegacyBreadcrumbBuilder in taxonomy module?
Comment #14
jibranAlso related #1857256: Convert the taxonomy listing and feed at /taxonomy/term/%term to Views
Comment #15
xjmTagging as part of #1839338: [meta] Remove drupal_set_*() drupal_add_*() in favour of #attached/response for out-of-band stuff.
Comment #16
dawehner@xjm
Did you approved the issue or my idea in #2061913-11: Remove drupal_set_breadcrumb and LegacyBreadcrumbBuilder in Views module ?
Comment #17
catchComment #18
andypost@dawehner I think
\Drupal\views\Plugin\views\display\Page::execute()
just needs a bit refactoring,there's no other usage of
getBreadcrumb()
:The idea to inject views breadcrumb builder to breadcrumb service
Probably better to implement this in
\Drupal\views\Plugin\views\display\PathPluginBase
This should be a kind of
The priorities needs separate issue to revisit before release because services would be fired in the order:
So if no breadcrumbs would be returned by view then legacy (remove) or menu link should build something
Anyway the breadcrumbs service used only in
template_preprocess_page()
:And in
\Drupal\system\Plugin\Block\SystemBreadcrumbBlock
Comment #18.0
andypostUpdate
Comment #19
andypostAdded related to summary
#2070651: Introduce a path-based breadcrumb builder, remove the one that's based on {menu_links}.
#2074177: Allow breadcrumb builders to be chained or alter other results rather than forced to run singly
Comment #20
jibran#5: convert_breadcrumbs-2061913-5.patch queued for re-testing.
Comment #22
jibranHere is the start.
Comment #23
dawehnerYeah this is not enough yet, there are other references still, especially in the taxonomy part.
Comment #23.0
dawehnerupdated related
Comment #24
andypostThis only one left here so I closed meta as duplicate of this
@dawehner so we should back to #5 approach?
Comment #25
dawehnerYes, the patch from jibran in #22 is not enough though I still think that the patch in #5 is fundamentally wrong in the sense
that we no longer need a special breadcrumb system just for views. Core itself is more flexible. For example the taxonomy specialized breadcrumb builder now works in a way that it can support both the normal taxonomy page as well as the view page.
Comment #26
damiankloip CreditAttribution: damiankloip commentedok, let's go extreme.
Comment #27
damiankloip CreditAttribution: damiankloip commentedComment #28
dawehnerNothing is left anymore, nice!!
Comment #29
catchFavourite kind of patch.
Committed/pushed to 8.x, thanks!
Comment #30
tstoecklerSo this didn't actually remove LegacyBreadcrumbBuilder but the parent issue was marked as a dupe of this one?! :-) Was that forgotten here or are there other blockers?
Comment #31
damiankloip CreditAttribution: damiankloip commented@tstoeckler, #2145463: Remove LegacyBreadcrumbBuilder. I just saw 'in Views module' and excised everything from there.
Comment #32
tim.plunkettRight.
Comment #33
tim.plunkettNevermind, #2145463: Remove LegacyBreadcrumbBuilder has it
Comment #34
dawehnerLet's use the other issue and write the change request here.
Comment #35
damiankloip CreditAttribution: damiankloip commentedGood idea, I like things nicely separated. Then we get better commit log, and better change notice issue refs.
So, fixed? or do we want a views change notice for the UI stuff?
Comment #36
jibranHere is the original change notice for meta Extensible breadcrumb system added. So i don't think it needs new one.
Comment #37
dawehnerWell, we do remove the API from views, so we have to document that.
Comment #38
jibranok moving to the views queue then.
Comment #39
andypostWhat to do with issues like that... close or not?
Comment #40
MustangGB CreditAttribution: MustangGB commentedComment #41
Chris Matthews CreditAttribution: Chris Matthews as a volunteer and at City of Oaks Design commentedFor more information as to why this issue was moved to the Drupal core project, please see issue #3030347: Plan to clean process issue queue
Comment #42
andypostThis issue is about to create change record for already removed code
Comment #48
quietone CreditAttribution: quietone at PreviousNext commentedThe remaining task here is to add a change record for an API removed in Drupal 8.x, before Drupal 8.0 was released. Since Drupal 8 is now end of life there is no need to make a change record.
Even though part of this was not finished, marking this outdated isn't right because a patch was committed here. I am going to set the status to Fixed.
Comment #49
quietone CreditAttribution: quietone at PreviousNext commentedComment #51
quietone CreditAttribution: quietone at PreviousNext commentedRemove tag,