I have been trying to set DS view modes at the node type level rather than at the individual node level. This is supposedly supported by 7.x-1.2. However, everytime I try to save the configuration on "admin/structure/cvm" I get the following error:
FieldException: Attempt to create an instance of a field field_cvm_cvm that doesn't exist or is currently inactive. in field_create_instance() (line 457 of /home/china/apache/www/nabto/modules/field/field.crud.inc).
The first time this happened was when I tried to add the basic page by clicking the appropriate checkbox. The next time I tried loading "admin/structure/cvm" I can now see the basic page view mode settings as a fieldset below the checkboxes. However, when I try to set the global contextual view modes within this fieldset, I once again get the same error message.
When I reload the page "admin/structure/cvm" I discover that the changes I had made to the basic page view mode settings have not been preserved.
Comment | File | Size | Author |
---|---|---|---|
#6 | contextual_view_modes-error_setting_global_settings-1887908-6.patch | 551 bytes | victoriachan |
Comments
Comment #1
sherakama CreditAttribution: sherakama commentedBased on your error I would assume that the module was not able to install correctly. Try re-installing the module and see if the error persists.
Comment #2
dman CreditAttribution: dman commentedI'm not getting an error, but I am finding that the global settings for a node type are not being retained when saving this form.
Comment #3
dman CreditAttribution: dman commentedYeah, my settings weren't saved because the machine name of my content type had underscores and
didn't respect that.
Prob not the same issue as the OP.
I'd better come up with a fix for that.
Comment #4
sherakama CreditAttribution: sherakama commentedThat was a bad oversight by me. I have changed the fieldname convention to use triple underscores. A bit of a bandaid solution until I can put some further thought into it. Check the dev branch for that code.
Comment #5
steven.wichers CreditAttribution: steven.wichers commentedI updated to version = "7.x-1.2-alpha1+1-dev" and now none of the view mode selections save -- those with or without multiple words. $values is empty in the submit handler.
Comment #6
victoriachan CreditAttribution: victoriachan commentedHi,
I've noticed an error in the fix, on line 185:
if (substr($field_name, 0, 11) == "cvmglobal___") {
It should be
if (substr($field_name, 0, 12) == "cvmglobal___") {
I'll attach a patch.
Thanks,
Victoria
Comment #7
grota CreditAttribution: grota commentedThe patch above at #6 is a valid one, can we please get it merged upstream?
Comment #8
Frank Ralf CreditAttribution: Frank Ralf commentedI get the same error as in the OP. Uninstalling and re-installing the module throws the following error:
EDIT:
I'm not getting this error with my local development installation so it might be a different issue than the OP. Seems to be related to #2120467: Hard to uninstall as the field in question (field_cvm_cvm) is created programmatically in the .module file and not from the .install file.
EDIT 2:
I filed a separate issues for this:
#2159763: PDOException: Specified key was too long; max key length is 1000 bytes: CREATE TABLE {field_data_field_cvm_cvm}.
Comment #9
Frank Ralf CreditAttribution: Frank Ralf commentedComment #10
sherakama CreditAttribution: sherakama commentedI have added the change in original post/#6. Thanks everyone for this.
Please review and mark as "RBTC" and I will put out a new stable.
Comment #11
sherakama CreditAttribution: sherakama commentedComment #12
Frank Ralf CreditAttribution: Frank Ralf commentedI think the patch from #6 is not sufficient to solve this issue. There are certain edge cases where your Drupal installation ends up without the field_cvm_cvm field even when the module and its sub module are enabled (the following instructions are for the current dev version with the CVM Field sub module):
The fields only get re-created by disabling and re-installing also the sub module. That's the reason this issue is linked to #2120467: Hard to uninstall.
hth
Frank
Comment #13
webmestre CreditAttribution: webmestre commentedSame issue for me :
Any idea ?
Comment #15
sherakama CreditAttribution: sherakama commentedI am getting rid of the CVM field in the 2.x version and changing the global options to allow more entity types than just nodes. These issues will be addressed in that version.
Comment #16
sherakama CreditAttribution: sherakama as a volunteer commented