First, I'm from Maradona's country, so my english is bad.

I noted if is set a maximum multi value in cck imagefield settings, and create nodes without upload any files, Imagefield save each multivalue as NULL in database. So I don't know if it is as expected.

I created a view for "Node images" showing cck node images with Node NID argument, and if node has no image, the view show empty items and "Views: Hide empty" doesn't work here.

Is it a CCK feature or a Imagefield feature?. Also I think will be great if we can have a filter for views "Image is NULL: True or false", and that can solve this.

My apologize for this not clear explanation. I would you can help me.

Comments

dag_helstad’s picture

I have the same problem, with the slight difference that my imagefield may contain a single, optional, image. When I create a node without an image, a row is still inserted in the images table, which causes the view to be non-empty.

quicksketch’s picture

The saving of NULL values is intentional and it's done by CCK. The reason for this is if an image field is single value and only on one node type, then the imagefield will be represented as columns in the content_node_type_* table. If a field is multiple value or shared, then it is moved to it's own table. Because the first scenario would return NULL, CCK automatically inserts a NULL row into the table even though it's not necessary, making it so that the data stays consistent between single-value fields and multiple-value fields.

Regarding a Views filter, see #480508: Create a "has file" filter/sort (then expose it to the user).

dariogcode’s picture

Status: Active » Closed (fixed)

Very clear!!, thanks! I create the views and relathionships and it work fine. Thanks