Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#9 | interdiff-2908865-7-9.txt | 733 bytes | rakesh.gectcr |
#9 | 2908865-9.patch | 753 bytes | rakesh.gectcr |
#7 | interdiff-2908865-4-7.txt | 1 KB | rakesh.gectcr |
#7 | 2908865-7.patch | 747 bytes | rakesh.gectcr |
#3 | term-name-with-special-chars-2908865-8.x.patch | 710 bytes | Paladyn |
Comments
Comment #2
Paladyn CreditAttribution: Paladyn commentedProblem 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)) {
Comment #3
Paladyn CreditAttribution: Paladyn commentedI`ve made patch for above changes. Please test, if it`s working for you also.
Comment #4
Paladyn CreditAttribution: Paladyn commentedComment #5
rakesh.gectcrCan we add in dependency injection?
Comment #6
jnycz CreditAttribution: jnycz as a volunteer commentedDuplicate? https://www.drupal.org/project/drupal/issues/672606
Comment #7
rakesh.gectcrAdding into a variable, So that it will be under 80 characters on a single line.
Comment #8
rakesh.gectcrOops, Still its more than 80
Comment #9
rakesh.gectcrComment #10
rakesh.gectcrComment #12
rakesh.gectcr