The OverviewTerms form responsible for displaying terms belonging to a vocabulary uses hardcoded link path in the empty message when there are no terms attached to the vocabulary linking to the 'add term' form. This should be route instead of hardcoded path.

CommentFileSizeAuthor
#5 overviewterms-route-3.patch717 bytesAnonymous (not verified)
#4 overviewterms-route-2.patch718 bytesAnonymous (not verified)
overviewterms-route.patch720 bytesAnonymous (not verified)
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Perfect!

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/core/modules/taxonomy/src/Form/OverviewTerms.php
@@ -193,7 +193,7 @@
+      '#prefix' => $this->t('No terms available. <a href="@link">Add term</a>.', array('@link' => \Drupal::url('taxonomy.term_add', array('taxonomy_vocabulary' => $taxonomy_vocabulary->id())))),

We should be using $this->url() and not \Drupal::url()

Anonymous’s picture

Yeah, sorry. I've totally overlooked that. I'll update the patch when I'll get to office.

Anonymous’s picture

Status: Needs work » Needs review
FileSize
718 bytes
Anonymous’s picture

FileSize
717 bytes

Im sorry, I dont know how #empty got changed to #prefix.

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Cool, thank you!

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 533ccbe and pushed to 8.x. Thanks!

  • alexpott committed 533ccbe on 8.0.x
    Issue #2313913 by ivanjaros: OverviewTerms form uses hardcoded path.
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.