Viewfield breaks when argument contains a comma
deviantintegral - February 1, 2008 - 20:28
| Project: | Viewfield |
| Version: | 5.x-1.4 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Darren Oh |
| Status: | closed |
Jump to:
Description
In my case, I'm using viewfield with an argument equal to the title of a node. As it explode()'s on commas, any titles with commas can't be selected. I've attached a small patch which changes the seperator to '\,', which I figure is far less likely to be used. It's not a real solution, but it should help for anyone with this problem.
It would probably be best to change the arguments field to be multiple text boxes instead, but that would be more work :).
--Andrew
| Attachment | Size |
|---|---|
| comma-arguments.patch | 1.29 KB |

#1
#2
What is actually needed is a way to recognize text within quotes as being a single argument.
#3
I'm working on this. Unfortunately, PHP lacks a simple function for parsing comma-separated values from a string.
#4
Fixed in CVS commit 114808.
#5
Automatically closed -- issue fixed for two weeks with no activity.