Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
when I select edit to change values of Title, Caption etc. one of the fields is "License settings for this image" with a widget with no possible values to assign.
As a result I get the error message "License settings for this image field is required." and cannot make any changes.
The field "field_license" is Locked
I can't remember if I added the field or not but I don't want it to be a required field.
Comments
Comment #1
davidsanger CreditAttribution: davidsanger commentedResolved:
If you do not activate the Media Gallery module then you get an "uneditable" state for Media
The Media Gallery modeul contains the definition for the function :
_media_gallery_get_field_license_values()
Comment #2
Dave ReidI don't actually see this being a bug in Media itself? There's noting about a license setting field in the code. Should this issue move to Media Gallery?
Comment #3
davidsanger CreditAttribution: davidsanger commentedI am very new to Drupal, but it sounds like Media Gallery added the license field and then when I disabled Media Gallery the nodes became unupdatable.
moved from Media to Media Gallery
Comment #4
davidsanger CreditAttribution: davidsanger commentedComment #5
dimitriseng CreditAttribution: dimitriseng commentedHi, I agree that it should be possible to make some fields optional, for example the license field. Why does this have to be a required field in media gallery? See also #1165804: How to remove certain fields from being displayed
Comment #6
lsolesen CreditAttribution: lsolesen commentedIs this issue still valid in beta7?
Comment #7
Moloc CreditAttribution: Moloc commentedThis is still an issue with beta7.
Here is a duplicate: #1345734: Selecte for "License settings for this audio" is empty and file can not be saved
This issue is older, the other has a better explanation. I think one of these could be closed as duplicate.
Comment #8
lsolesen CreditAttribution: lsolesen commentedThis is a rather big issue. A temporary workaround is to delete the field from the file types after disabling media gallery.
But I think the best temporary solution is probably to make it "not required".
Comment #9
lsolesen CreditAttribution: lsolesen commentedTagging.
Comment #10
lsolesen CreditAttribution: lsolesen commentedRetagging.
Comment #11
lsolesen CreditAttribution: lsolesen commentedRetagging.
Comment #12
leschekfm CreditAttribution: leschekfm commentedto #8: I couldn't delete the field even after disabling the module, because the field was set to be locked.
I had to manually unlock the field in the 'field_config' table, before I was able to remove it.
Comment #13
DrupalUser78 CreditAttribution: DrupalUser78 commentedI don't know how to write a proper fix for Drupal.
This workaround helps to save images with the entry "None (all rights reserved)":
a) Open your drupal database
b) Select the table "field_revision_field_license"
c) Modify the field "field_license_value": (Descriptions from phpMyAdmin)
1. Change 'Default' from the media gallery default value "NULL" to "None"
2. Deselect 'Null'
3. Save this modifications
Comment #14
shortspoken CreditAttribution: shortspoken commentedI vote for either not locking the license field
or leave it out completely.
Comment #15
el35 CreditAttribution: el35 commentedStill not working...
Is somebody have an issue?
Comment #16
glass.dimly CreditAttribution: glass.dimly commentedHow to unlock the field:
This can be entered at /devel/php if the devel module is enabled.
Credit: https://www.drupal.org/node/2223605#comment-10743018
Afterwards, this field can be deleted.
Comment #17
zzzaxxx CreditAttribution: zzzaxxx commentedSubscribe that this bug is still existing. I updated the Media Field to
7.x-2.11, but the latest Media Gallery Field version is incompatible with this version and thus I have to disable this module. However, then I cannot upload new images anymore as the License Settings for this image field is required. Very annoying bug.
When disabling the Media Gallery Field, the Media module should not require a license setting or there should be a proper way to remove this field.
Comment #18
zzzaxxx CreditAttribution: zzzaxxx commentedSubscribe that this bug is still existing. I updated the Media Field to
7.x-2.11, but the latest Media Gallery Field version is incompatible with this version and thus I have to disable this module. However, then I cannot upload new images anymore as the License Settings for this image field is required. Very annoying bug.
When disabling the Media Gallery Field, the Media module should not require a license setting or there should be a proper way to remove this field.
Comment #19
ivnish CreditAttribution: ivnish commented