Hi,
I have a problem with this module and the terms that contain / and - inside the name, es. foo/bar or foo-bar.

In this case, views return Page not found.
I tried to change the IndexNameDepth->query() method but the display does not even enter this method.

Anyone can help me?
Thx
I.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Yoris00 created an issue. See original summary.

Paladyn’s picture

Problem is in pathauto part of IndexNameDepth.php (lines 130-144) query function.

if (\Drupal::service('pathauto.alias_cleaner')->cleanString($row->name) == $tids) {

This condition don`t match when special characters are there.

For example: Sports, Fun & Football
\Drupal::service('pathauto.alias_cleaner')->cleanString($row->name) returns "sports-fun-football"
$tids equels "Sports, Fun & Football"

My solution is to change condition to:
if (\Drupal::service('pathauto.alias_cleaner')->cleanString($row->name) == \Drupal::service('pathauto.alias_cleaner')->cleanString($tids)) {

Paladyn’s picture

I`ve made patch for above changes. Please test, if it`s working for you also.

Paladyn’s picture

Status: Active » Needs review
rakesh.gectcr’s picture

Status: Needs review » Needs work

Can we add in dependency injection?

jnycz’s picture

rakesh.gectcr’s picture

Status: Needs work » Needs review
FileSize
747 bytes
1 KB

Adding into a variable, So that it will be under 80 characters on a single line.

rakesh.gectcr’s picture

Status: Needs review » Needs work

Oops, Still its more than 80

rakesh.gectcr’s picture

Status: Needs work » Needs review
FileSize
753 bytes
733 bytes
rakesh.gectcr’s picture

  • rakesh.gectcr committed ab84587 on 8.x-1.x
    Issue #2908865 by rakesh.gectcr, Paladyn, Yoris00, jnycz: Term name with...
rakesh.gectcr’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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