Hey there. I'm importing a lot of Nodes using Feeds. All can have a url in video embed field. Some of these have and some not. I noticed, that an import is creating an entry on video embed fields database-table also if according .csv section has no data.

as result i get "http://" displayed on my node. after editing this entry is does not longer exist. is suppose this way it should be.

I'm not sure if it't an issue of Feeds or from Video embed field. But I'm quite sure these "empty" field db-entry are created trough an empty string given and not handled correct.

at least i'm getting:

Warning: array_merge_recursive() expects at least 1 parameter, 0 given in video_embed_field_set_target() (Line 5 in ... /video_embed_field.feeds.inc

when importing empty data for Video embed field.

Checked also code of Dev Version. Seems to be the same.

Comments

Input’s picture

Okay. Played a little bit arround.

Adding on Line 47 in video_embed_field.feeds.inc

  $value = array_filter($value);
  if (empty($value)) {
    return;
  }

is removing empty stuff from $value and skiping everything if array is now empty. but still getting php warning. but only once instead of twice before.

plopesc’s picture

Hello

Thank you for your interest in this module.
I just made some tests importing a CSV with empty Video URL values without any problem.
Lines with empty video value creates nodes with video empty field and I have not any notice...

Could you give me more details about?

Input’s picture

Have to go to work but here some faste additional infos. Sorry for my lousy english.

Drupal: 7.26
Feeds Version: 7.x-2.0-alpha8+30-dev (to prevent issue of dup. tag creation)
Video Embed Field Version: 7.x-2.0-beta7
Also running Feeds Tamper: 7.x-1.0-beta5 but not processing video field

Video field is only used in this content type and I left everything on standard.

csv-file looks this way (shortened it because theres a lot more fields imported, but only on is videourl):
Nr;Name;Video;...;...
8;Aberlour single cask bourbon barrel;;...;....
9;Aberlour White Oak 2001;http://www.youtube.com/watch?v=gVruHHZNSn4;...;...

without my tweak in #1 for Nr.8 Nr.9 import in field_data_field_videofieldname an entry is created, on the node I get an "http://" which is wrong in my oppinion because Nr.8 has no data for Videofield.
Also getting the above php-warning in watchdog twice.

After editing the node and simply save it. in DB-Table entry for Nr.8 is deleted. What is clear. No Data -> no DB-Entry

with my tweak is only data create for Nr. 9 and warning showing up only once.

Btw. using " as text-wrapper made no difference.

Say if you need more. Think i can when i'm back from work.

Input’s picture

Damn it just saw that i cutted a linenumber in the phpwarning:

think it was
Warning: array_merge_recursive() expects at least 1 parameter, 0 given in video_embed_field_set_target() (Line 56 in ... /video_embed_field.feeds.inc

plopesc’s picture

I tested with a similar csv file. Against feeds 7.x-2.0-alpha8 and without feeds tamper without any problem or notice.
Are you changing the node language during the import?

Input’s picture

7.x-2.0-alpha8+30-dev is 7.x-2.x-dev
With 7.x-2.0-alpha8 is no problem. as i wrote i need to use dev at the moment. But never mind and thx for your effort.
I think i can live with the warnings at the moment as long as everything else is working.
I will keep an eye on this. over the next non-release of feeds.

maybe it's something else.
I don't know.

plopesc’s picture

Status: Active » Closed (works as designed)

Hello

Marking as works as designed, given that I'm giving support only for the last stable release for feeds or other modules integration. I'll take a look when Feeds maintainers release the next stable.

Thank you for your interest.

Input’s picture

Okay. The support-stuff i understand. so we will see ;)

@rakesh: the second link is more or the less exactly what i'm looking for on my next big self-written-stuff 2 drupal migration journey THX! :D

HarlsHicks’s picture

I'm having the same issue as this. However, we're not using Feeds, we're using DRealty (https://www.drupal.org/project/drealty). It seems that our listings are created with a blank video embed field, but on the listing page, the field shows up. When you click the button for the field, it's supposed to bring up a Colorbox with the video embed, but it brings up a Colorbox with just "http://" inside. It of course links nowhere.

Also, when we bring up the html, it displays the following (replaced site):

<a href="http://[site-url]/vef/load/225af16e3562f28480e0e3ddf34e6c9f?width&amp;height=5" class="colorbox-load init-colorbox-load-processed cboxElement"><div class="field-label">Virtual Tour</div></a>

When we visit that link, all we get is a completely white page with "http://" at the top.

I've searched through all of the issues, and this seems to be the only one that's very similar. I hope I'm not muddying the thread.