| Project: | Embedded Media Field |
| Version: | 6.x-1.x-dev |
| Component: | Embedded Video Field |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
Upgraded from Drupal 5, cck latest version (5.x-1.10), and all modules up to date. I ran update.php multiple times as I first added cck and then dependent modules, including emfield.
I noticed that my videos were not showing, so I went to manage fields in content/types. It gave me these messages:
Embedded Video (field_embedded_video) is an inactive Embedded Video field that uses a video_cck_textfields widget.
This content type has inactive fields. Inactive fields are not included in lists of available fields until their modules are enabled.
I tried running the update.php again on embedded video and it cleared cache and gave these messages:
* warning: include_once(./sites/all/modules/cck/content_admin.inc) [function.include-once]: failed to open stream: No such file or directory in /home/sihatgro/public_html/you4ia6/sites/all/modules/emfield/contrib/emvideo/emvideo.install on line 138.
* warning: include_once() [function.include]: Failed opening './sites/all/modules/cck/content_admin.inc' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/sihatgro/public_html/you4ia6/sites/all/modules/emfield/contrib/emvideo/emvideo.install on line 138.
I was able to add a new field to the content type and embed a video from youtube just fine, but all my existing data will be lost if I can't resolve this.
Any clues to where I went wrong?
Thank you for this really useful module
Comments
#1
Same here, although I did not get the warnings above when running update.php again. I have run through the cycle of disabling emfield modules, reenable, run update.php, a couple of times to no avail.
"This content type has inactive fields. Inactive fields are not included in lists of available fields until their modules are enabled."
#2
When this happens you simply need to edit your content types, and resave them. You may also have to do this for the effected fields, but probably not.
#3
Nope, doesn't help.
And anyway, you can't do anything to the affected fields because they are inaccessible from the 'Fields' tab. Clicking on Configure does nothing. Same with Remove.
#4
yes, re-editing and re-saving nodes did nothing for me either.
#5
Have the same problem, upgraded from Drupal 5.8, made all instructions, first upgraded to 5.15 and to latest versions of cck and contributed modules. After upgrade no more work image and video fields:
Flickr Photo (field_photo_flickr) is an inactive image_ncck field that uses a image_ncck_textfields widget.
Video (field_video_video) is an inactive emvideo field that uses a video_cck_textfields widget.
And I need some way to save a lot of content.
#6
There's another thread reporting the same problem with the Embedded Video field here:
http://drupal.org/node/337421
marco302008's fix on that thread clued me into what's going on here.
At some point the emvideo module moved from using "video_cck" to "emvideo." emvideo.install includes the _emvideo_upgrade_from_video_cck function that's supposed to take care of that transition. The function deals with the changes needed in the content_node_field table:
// Change any fields from 'video_cck' to 'emvideo' type.db_query("UPDATE {content_node_field} SET type='emvideo' WHERE type='video_cck'");
but it doesn't take care of the additional changes in the content_node_field_instance table, which is what marco302008 fixes manually in the thread above.
Adding this additional bit of code to emvideo.install should take care of that:
db_query("UPDATE {content_node_field_instance} SET widget_type='emvideo_textfields' WHERE widget_type='video_cck_textfields'");Note that when I manually made these changes to the necessary rows in content_node_field_instance AND also manually changed the widget_active value to "1" the fix worked for me. I haven't gotten to test the attached patch to make sure it works that way, too; I don't see why it won't but would appreciate some testing to verify that it works. Thanks!
#7
fwiw (not sure if this warrants a separate issue, or a more general title for this one), i was seeing the same problem with Embedded Image fields.
thanks to jackaponte and marco302008, the fix was simple, but involved separate db queries than supplied above:
mysql> update content_node_field set type='emimage' where type='image_ncck';
Query OK, 1 row affected (0.01 sec)
Rows matched: 1 Changed: 1 Warnings: 0
mysql> update content_node_field_instance set widget_type='emimage_textfields' where widget_type='image_ncck_textfields';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0
then uninstall the emfield modules (yikes!), then enable them. the old fields were recognized correctly.
and sorry, but i don't have experience rolling patches, or feel confident enough in my quick hackery to feel confident modifying jackaponte's patch for this. wanted to add the info to this thread, though!
thanks, emfield developers, for your work on this module, and folks above for helping to document this issue.
#8
@arh1, your fix simply adds the same missing query for emimage that @jackaponte provided for emvideo. I'm marking as RTBC, as this worked for my tests. If I don't hear back from aaron with any objections I'll add this later today or tomorrow.
Thanks for the patches!
#9
I'm committing jackaponte's changes and changing the title and status to reflect the fact that emimage is completely missing an upgrade path at the moment.
#10
Subscribing..
Any update on this?
Although my emvideos are being displayed correctly after using jackaponte's queries, my emimages are still not visible (even after using arh1's queries). Interestingly enough these images are visible in teaser view but not in full view.
#value of the field is NULL.
An upgrade path would be nice.
#11
I just committed this to 6.x-1.x-dev and will be rolling it with the new version later today.
#12
I'm marking this as fixed and committing. Please open a new issue if you have post upgrade issues.
#13
Automatically closed -- issue fixed for 2 weeks with no activity.
#14
thank you think you thank you :D