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
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

AttachmentSize
comma-arguments.patch1.29 KB

#1

Darren Oh - April 30, 2008 - 13:34
Status:active» patch (code needs review)

#2

Darren Oh - May 1, 2008 - 16:19
Status:patch (code needs review)» patch (code needs work)

What is actually needed is a way to recognize text within quotes as being a single argument.

#3

Darren Oh - May 2, 2008 - 14:00
Assigned to:Anonymous» Darren Oh

I'm working on this. Unfortunately, PHP lacks a simple function for parsing comma-separated values from a string.

#4

Darren Oh - May 5, 2008 - 21:13
Version:5.x-1.2» 5.x-1.4
Status:patch (code needs work)» fixed

Fixed in CVS commit 114808.

#5

Anonymous (not verified) - May 19, 2008 - 21:22
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.