The string argument has a couple of settings affecting the final URL path when used with a page display: Case in path and Transform spaces to dashes in URL. Views TPO does not take them into account and always uses the original term name.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | views_tpo-832320-1.patch | 1.17 KB | plach |
Comments
Comment #1
plachCommitted the attached patch to HEAD.
Comment #5
bohz commentedHI!
sorry to reopen...
I have the latest version installed and still got this problem:
my terms are composed of multiple words separated by spaces, like "my term"
views_tpo works only if I leave the argument transformation settings as default.
This results in urls like "/my%20Term" which is not desiderable.
if I try to change the case or convert spaces to dashes I get page not found.
I have checked and the above patch seems to be included in the module files...
Any suggestion?
TIA
Cheers
Comment #6
plachI suspect this might be a Views bug, please check the following: set up a Views summary for the same argument you are using to override the term paths. Then check that the links work and/or that they are identical to the term links produced by Views TPO. If they match and the summary links lead to a 404 page too, it's a Views bug.
Comment #7
bohz commentedThanks for the prompt reply!! :)
I have done as suggested but, AFAIK, in order to set up a views summary, the argument should NOT be present. therefore I cannot check if it's printed correctly or if the paths work...
What I did:
- deselected views_tpo checkbox
- set the view to display a summary if argument is not present.
- modified the argument transformation settings
in the page preview i see the list of terms unchanged with paths unchanged (working)
Thanks again!
Comment #8
plachOk, that's what I meant you to set up.
Do you mean that summary links do not respond to the transformation settings?
Comment #9
bohz commentedMy bad, I had changed settings for the default display.
Now I have more problems :)
- the summary view has indeed changed case/dashes in links and paths but the links lead to the same view!
that is: mysite/viewpath leads to mysite/viewpath/my-term but still displays the summary with all terms.
Moreover, although I have deselected views_tpo and cleared all caches, when I save the argument settings I get
shall I uninstall views_tpo and reinstall later?
Comment #10
plachThis probably means Views is not recognizing the argument.
This is probably related to #871822: Error when trying to select a block display. For your testing purposes uninstalling Views TPO and re-installing it later should work.
Comment #11
bohz commentedThanks plach.
so, it is a views bug: even with views_tpo uninstalled the summary view does not work with changed case/dashes.
do you have any suggestion on how to circumvent urls like this: "My%20Fantastic%20Term" with something more readable and search engine friendly?
As side note: may this be related with misconfigured pathauto?
Comment #12
plachIt's a possibility, but if I recall well I experienced similar problems while working on Views TPO without having Pathauto installed.
IMO the best thing to do is fixing Views (if possible) :)
Please open a bug report or try to find an existing one and link it here for future reference.
Comment #13
bohz commentedOK, I'll search if a similar issue has been already opened for views.
In the meantime, thanks a lot for your help.
Have a nice one!