Last week my site was working properly; I had a content type with an imagefield set to Unlimited and had multiple images attached to lots of different nodes.

This week, the nodes are only showing 1 image. When I go into the settings for this content type, the 'Number of values' is set to 1. Since it was previously set to Unlimited, I have now lost all other images associated with all my nodes.

Yes the images are still in my files directory, but unless I'm mistaken, I now have to go through each node and re-add the images it had before - a massive task considering the number of nodes I've created.

I'm in the process of locating a backup of the site, but regardless of whether I have a backup or not, I'd like for this not to happen again.
Anyone got any ideas how this may have happened and how to prevent it happening again?

Comments

drewish’s picture

that's the first time i've heard of that... are you sure you didn't change it?

Anonymous’s picture

Yes. There are others that have access to the site, but none have permission to edit content types, and the logs only show me logged on since it was working...

I did update the Date module on Friday last week, but I made a backup beforehand, which I tried reverting back to, with no change - the problem happened before that.

Anonymous’s picture

I just remembered that I also added a new content type on Friday which used an imagefield as well. Instead of adding a new field, I added an existing field: the imagefield from my other content type. When I changed the new content type's value to 1, it must have changed the value of the other content type's imagefield too.

Is this meant to happen? What's the point of being able to add existing fields if changing their values changes all other fields values?

yched’s picture

Status: Active » Closed (works as designed)

'Add an existing field' doesn't create a distinct copy of the field, it uses the *same* field on both content types.
In the field's settings form, the 'number of values' setting is in the 'Global settings' section : "These settings apply to the File field in every content type in which it appears".

Anonymous’s picture

Thanks yched, I'll remember that for next time!
(now to find a backup of the site...)