Closed (fixed)
Project:
Content Construction Kit (CCK)
Version:
6.x-1.x-dev
Component:
content.module
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
2 May 2006 at 06:31 UTC
Updated:
17 May 2006 at 00:02 UTC
Jump to comment: Most recent file
Comments
Comment #1
dopry commentedumm well I went to install that last patch on a site using the latest cvs-tar.gz.... and welp I'm not sure, but Im out of sync somewhere, so here is another patch.
Comment #2
karens commentedGlad to see someone is working on this, I was just going to make a feature request. I see you've given modules a way to add their own handler, which was another concern -- the date field in particular is going to need special handling. I'll give this a try later today.
Comment #3
yched commentedThanks a lot for this patch dopry. I was in fact needing that just this morning :-)
One remark though :
Do you really have to append the fields labels in the $arguments table keys :
- It makes the patch practically useless with views.module current limitation to 25 chars for arguments names
(I think I saw you posted an issue for views about that earlier today)
- The labels are plain text, they have spaces, commas, accents (I'm french), i'm not sure these "special" chars don't mess with the magic...
Comment #4
yched commentedPlus :
(same code line) isn't there a extraneous "field_" at the beginning of the key ?
$field['field_name'] already starts with "field_".
Comment #5
dopry commentedI was using the widget label to keep multiple instances of the same field seperate on the same content type seperate.... I'll figure a better way to do thie this evening. And maybe there is an extra field at the begining I can drop....
Comment #6
jonbob commentedI don't think multiple instances of the same field *should* be separate, as far as Views is concerned. That's pretty much the whole point of having them be the same field. If they are semantically distinct, they should be different fields.
Comment #7
yched commentedJonBob: you're talking about different instances of a field in different content types - they should definitely be semantically equivalent, and thus treated the same way.
I think dopry was wondering about multiple-value fields (different "instances" in the same content type, although "instances" is probably an improper term in this case).
I'm not using multiple fields right now, so I'm not sure how this is to be managed.
(I guess I'm doing my - somewhat arrogant ? - mediator/interpretor number)
Anyway, i'm currently using dopry's patch with the incriminated line changed to
and it works quite fine (once again, no multiple fields involved on my side, though...)
Comment #8
dopry commentedWhat happens if you create two node_reference fields on one content type? If what JobBob says is true I can drop the additional widget data. I would love it since it makes the code easier to follow. :). I justed wanted to know that I kept the proper field associated to the argument, and I was worried that value $field['field_name'] could be duplicated in a single content type, on different fields. Maybe I'm just overly paranoid, since I don't fully understand the work flow and data structures of content.module yet.
slowly grokking,
.darrel.
Comment #9
dopry commentedoh yeah, and multiple values of a single field aren't supported yet. I will implement them this evening when I have testing time. I need to see how data is stored, they may work automagically.
Comment #10
jonbob commented"What happens if you create two node_reference fields on one content type? [...] I was worried that value $field['field_name'] could be duplicated in a single content type, on different fields."
Nope, this can't happen. If there are two node reference fields on one content type, they will have different field names. You should be perfectly safe using just the field name.
If you end up having to distinguish items in a multiple-value field, then the "delta" attribute is what you want.
Comment #11
yched commentedI think things work better when the following line in your patch (in function content_views_argument_handler) :
is replaced by
But maybe this should be refined depending on the value type (%d or %f for number fields)
There's something similar in function content_field($op = 'insert')
Too late for me to propose a patch today, plus I don't want to steal dopry's credits :-)
Comment #12
jonbob commentedA modified version has been committed. I added full summary view support, and changed the criterion for not using the default argument handling to a parameter in the database info hook. I think this is more robust, because we need to handle having more than one field defined in the same module, and they may have different argument requirements.
Ysched's comments are also incorporated.
Comment #13
(not verified) commented