Problem/Motivation
When there is data in the image field, upload destination is changeable.
This may cause issues to site builder and editor when they accidentally change the upload destination.
Check following screenshot.
Steps to reproduce
- Add file and image field to article content type.
- Create one article content and upload image and files.
- Visit "admin/structure/types/article" and open the field settings form.
- Notice that "Upload destination" is disabled for the file field and it is not disabled for the image field.
Proposed resolution
- Upload destination should be disabled for image field when there is data in the field.
Remaining tasks
- Needs discussion with sub-system maintainer.
- Approval about the approach
User interface changes
N/A
Introduced terminology
N/A
API changes
N/A
Data model changes
N/A
Release notes snippet
N/A
Original report by @alan d.
I've just gone through and edited about 50 image fields, changing these from a shared URL (see foot note) back to public. After changing the schema, I ran a quick test on one of the image fields. While this worked fine, it was not what I would consider careful complete testing.
Then I was about to do the same on all of the file fields until I discovered that these have a $has_data lock.
So my questions are;
- Why does the file field have this and the image field doesn't?
- Could the same issue apply to the image field?
Since these fields share the same base functionality, I would consider that either there is a bug changing this after the field is populated (ie: the reason for the lock) or that this is simply an oversight from a cut 'n paste when creating the field. Love some feedback, I'm about to parse the repository logs to see if I can find the commit that introduced this.
Note:
- This was a custom file schema created to allow multiple sites to all shared the same file directory that was hosted on another domain / outside of each sites web root. We switched from a multisite like set-up to domain access when we found out that almost 98% content was going to be shared in some form due to the requirements of two of these sites.