This issue is related to #1027458: Allow to use multiple arguments with spaces

If taxonomy terms can be grouped using + and , spaces in the url (that are equal to + for browsers) should be replaced by dashes.

Here is a similar issue #503316: "Transform spaces to dashes in URL" inverted?

Comments

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Works fine and looks fine.

merlinofchaos’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 3.x branches in 6.x and 7.x

Status: Fixed » Closed (fixed)

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

dagmar’s picture

Version: 6.x-3.x-dev » 7.x-3.x-dev
Status: Closed (fixed) » Needs review
StatusFileSize
new460 bytes
new519 bytes

Sorry for re-opening this. I have uploaded a new version of the patch for #1027458: Allow to use multiple arguments with spaces and I realized that there is a problem if the original link contains a dash. This simple patch fix this problem.

tim.plunkett’s picture

Triggering the testbot.

schildi’s picture

Coming from http://drupal.org/node/1446644 in the hope that the as duplicate marked issue will be solved by the patch offered here. Installed is 7.x-3.x-dev and the last patch by dagmar.
I made some checks and got the results described below:























































Transf. spaces Multi. values Contextual filter query results
off off
Rheinisch-Bergischer Kalender

biblio.biblio_secondary_title
= 'Rheinisch-Bergischer Kalender'
OK
on off
Rheinisch-Bergischer Kalender

biblio.biblio_secondary_title = 'Rheinisch Bergischer Kalender'
none
off on
Rheinisch-Bergischer Kalender

biblio.biblio_secondary_title = 'Rheinisch-Bergischer Kalender'
OK
off on
Rheinisch-Bergischer Kalender,Rheinisch-Bergischer Kalender

biblio.biblio_secondary_title = 'Rheinisch-Bergischer Kalender,Rheinisch-Bergischer Kalender'
none
on on
Rheinisch-Bergischer Kalender

biblio.biblio_secondary_title IN ('Rheinisch', 'Bergischer', 'Kalender')
none
On On
Rheinisch-Bergischer Kalender,Rheinisch-Bergischer Kalender

biblio.biblio_secondary_title IN ('Rheinisch Bergischer Kalender', 'Rheinisch Bergischer Kalender'
none

is this the expected result?

andersiversen’s picture

I don't think this issue is solved yet is it?
When I try to send multiple values to the view with one argument from for example Panels or Quicktabs it fails - the view is empty.
I've tried value0+value1 and also value0%2Bvalue1 to make it url-friendly - though I don't think it sees the argument as an url when sending the argument from panels or quicktabs.
I've also tried simply writing it in the url with a views page taking an argument from the url and setting the contextual filter to allow multiple values.
As a side note: under admin/config/search/path/settings -> punctuation one should set it to "no action" at the plus sign - I guess. I have.

dawehner’s picture

Status: Needs review » Needs work

This patch somehow depens on the other patch to work as expected, lets wait for #1671174: Add access check when using "Output this field as a link"

sokrplare’s picture

Issue summary: View changes

@dawehner - I'm wondering if you meant to link to #1027458: Allow to use multiple arguments with spaces instead? Aside from patching the same file, I don't see how the one you linked to would be related to this patch as it is a different feature and code section, but maybe I'm missing something?

dawehner’s picture

Status: Needs work » Needs review
StatusFileSize
new914 bytes

Yeah you are right, that is the other issue i wanted to link.
I guess/hope it is fine to accept the problem of two spaces being replace with "--" and so they will be treated as "-" at the end?

At least we should be honest and explain what we are doing, see patch.

chris matthews’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll

The 4 year old patch in #10 to views_handler_field.inc does not apply to the latest views 7.x-3.x-dev and if still relevant needs to be rerolled.

Checking patch handlers/views_handler_field.inc...
error: while searching for:
      $form['alter']['replace_spaces'] = array(
        '#type' => 'checkbox',
        '#title' => t('Replace spaces with dashes'),
        '#default_value' => $this->options['alter']['replace_spaces'],
        '#dependency' => array(
          'edit-options-alter-make-link' => array(1)

error: patch failed: handlers/views_handler_field.inc:701
error: handlers/views_handler_field.inc: patch does not apply
andrew answer’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll
StatusFileSize
new915 bytes

Patch rerolled.