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.
I have searched the issue queue here and not found a similar issue, please trash if already a duplicate or what ever other filter it fails.
Under "Output this field as a link" we now have the option to "Replace spaces with dashes" I did back flips! But I am sorrily missing Transform Case upper / lower.
I don't know if this is small over site or something that was explicitly kicked to the curb.
Comment | File | Size | Author |
---|---|---|---|
#31 | 1180510-6.x-3.x.patch | 4.91 KB | Jorrit |
#26 | 1180510-Case-option-under-Output-this-field-as-a-link.patch | 5.59 KB | mstrelan |
#23 | 1180510-views-3.x-transform-case-8.patch | 5.08 KB | lathan |
#21 | 1180510-views-3.x-transform-case-7.patch | 4.49 KB | lathan |
#19 | 1180510-views-3.x-transform-case-6.patch | 4.51 KB | dawehner |
Comments
Comment #1
lathanHere is a patch that works.
Followed the logic and pattern thats behind the argument case transformation way of handling this.
Comment #2
lathanArrrg here is the correct patch file.
Comment #3
lathanclosed duplicate issue http://drupal.org/node/1180820
I need to rerole this patch as I was not getting
to work for me, so I changed that to
In any case we have two candidates.
Comment #4
dawehnerPowered by Dreditor.
Can you fix the code style of else {} and the whitespaces? This would be cool.
Powered by Dreditor.
Comment #5
lathanFixed white space and issue with switch and parameter passed along, as well as the else code style.
Here is the adjusted patch of latest dev branch.
Comment #6
lathanstatus change
Comment #7
dawehnerCan't we give case_transform $this->options['alter']['case']
This would be much more elegant/reusable/testable/orthogonal
Sorry but this seems to be for much better.
Powered by Dreditor.
Comment #8
lathanFollowed really what is happening else where as in views_handler_argument_string.inc we have.
and
It depends where we want "$this->options['alter']['case']" in the switch or on the parameter?
Comment #9
dawehnerFrom my perspective in the parameter.
Comment #10
lathanSuper here it is and removed some more white space i missed need "Dreditor" white space highlighter for textedit!
Comment #11
mstrelan CreditAttribution: mstrelan commented$this->case_transform()
needs to occur beforeif (!empty($alter['replace_spaces']))
otherwiseucwords()
won't work.Please also review my patch from #1180820: Option to transform link paths to lower case which seems to work for me
http://drupal.org/files/issues/views-rewrite-link-case-transform-path.patch
Comment #12
lathan@mstrelan nice catch I missed that here is the patch re-rolled.
Comment #13
mstrelan CreditAttribution: mstrelan commentedI would also suggest using the key "path_case" instead of "case" for 2 reasons - consistency with the string argument handler and disambiguation since it is only the path that is having its case transformed.
You also don't need the text "Do not use this unless with Postgres as it uses case sensitive comparisons." in the description as there is no database interaction here.
If you make these two changes your patch would be pretty much identical to mine, except for the the code cleanup dereine asked for which you didn't introduce.
Comment #14
lathanre-rolled, with mstrelan's suggestion.
Comment #15
lathanmissed description srry.
Comment #16
mstrelan CreditAttribution: mstrelan commentedPatch in #15 looks good and works well. +1 for commit.
Comment #17
dawehnerHere is a small improvement: Move case_transform to views_handler so other handlers like filters can use it as well.
Comment #18
lathanSmall update on the description "ucwords: Make the each word in the string uppercase."
Powered by Dreditor.
Comment #19
dawehnerYou are right, here is a new version.
Comment #20
lathan@dereine patch 1180510-views-3.x-transform-case-6.patch in #17 or #19 is not working its not transforming any case.
Comment #21
lathanHere is a working version with dereine's refactoring in-place.
Comment #22
lathanHmm further testing and the refactoring is affecting the arguments now incorrectly. In my case I tested the following.
I have argument in that is coming in from the path.
- Added a lowcase trasformation on the argument "Case Path" [seems to be working]
- Added a Upper Case word trasformation on the argument "Case" [failing]
- Added a lowcase trasformation on the field. [working]
I think its down to this line in views_handler_argument_string.inc thats causing my second step above to fail.
Comment #23
lathanSorry for the 'spam' figured it out and have tested this thoroughly.
Please just check my logic is sound on views_handler_argument_string.inc this was causing the issue in #22 'case' is now $this->options['case']
Comment #24
lathanbump
Comment #25
lathanBeen running the last patch for a while with no issues changing status
Comment #26
mstrelan CreditAttribution: mstrelan commentedPatch no longer applies. Here is a reroll against 7.x-3.x-dev for 2011-Jun-18
Comment #27
mstrelan CreditAttribution: mstrelan commentedActually, these are pretty much identical. Not sure why it didn't apply for me. Use #23 as mine has an extra whitespace.
Comment #28
lathananyone willing to review this?
Comment #29
merlinofchaos CreditAttribution: merlinofchaos commentedCommitted to 7.x-3.x with hash f86c759 -- perhaps this should be backported to 6.x-3-x? It doesn't cherry-pick cleanly, but I expected that.
Comment #30
lathanI'll get to it next gap here.
Comment #31
Jorrit CreditAttribution: Jorrit commentedI have ported the patch to 6.x-3.x. Most edits were the same, I only added
'#process' => array('views_process_dependency'),
to theoptions_form
part.Comment #32
Letharion CreditAttribution: Letharion commentedComment #33
chadsten CreditAttribution: chadsten commentedI think this is related:
Currently, Contextual Filters support transformation to lowercase, and replacing spaces with dashes. Using something like Title, this is a common filter to apply. It seems that there is no native way to apply the same transformation to Fields.
Is this for a specific reason, or has this been covered in a patch that hasn't been committed to the current repo? I use views_php for this currently, but I figure this would be super helpful to be in Views.
Thanks!
Comment #34
dawehnerPlease open a new issue, this issue is about the backport. Everything else makes the issue hard to get.
Comment #35
MustangGB CreditAttribution: MustangGB commented