Hello,

I am using Feeds Image Grabber in a drupal 6 installation and it works fine. However, I was trying to replicate it in a Drupal 7 installation and I followed all the steps as instructed but no success.
I would like to be able to grab images in a feed such as the following:
http://api.flickr.com/services/feeds/photos_public.gne?id=34827929@N06&lang=en-us&format=rss_200

I created two content types, CT_Photoblog_Feed and CT_Photoblog_Feed_Item. I have added an image field to the CT_Photoblog_Feed_Item. Please see the attached screenshots for both content type and the Feed Importer.

I do not think that I am missing any steps but I was not successful to pull the images into an image field in CT_Photoblog_Feed_Item.

I appreciate any help to resolve this issue.

P.S. I followed the same instruction for Youtube videos and used the Youtube Video Parser and it works smoothly. I think the problem is in the parser.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rooby’s picture

Are you creating feed nodes or using the importer at /import/[importer_machine_name]?

If you are using the non-node method of importing the module currently doesn't support it.

There is an issue for addressing this properly at #1618324: Remove dependency on feeds nodes which also has a link to a workaround in the first comment. The workaround allows your non-node importers to use the default settings set on the feeds imagegrabber admin configuration screen.

amins’s picture

@rooby, I am using feed nodes to import from a RSS feed but still not able to get images. I am following "Usage" section of the "READMe.txt" to configure the feed node. The procedure for D6 and D7 are the same, right?

rooby’s picture

I haven't actually used the drupal 6 version so I'm not sure.

Most of the problems I have had are fixed with patches in this queue (I am now running the dev version with 6 patches :)).

Other than that at one point I had my image selector set wrong so it wasn't picking up any image.

It's a good idea to check the drupal error log too to see if there are any messages relating to it that might point you in the right direction (admin/reports/dblog).

There is another set of settings you don't have in your screenshots.

There is a default settings page for the module at admin/config/feeds_imagegrabber and then for each node you create there is a fieldset on the node for feeds image grabber, where you can override the default settings.

This is where you tell it how to take the images from the target website.

If you don't see the fieldset, try these patches:
#1643764: Incorrect usage of hook_form_BASE_FORM_ID_alter().
#1298090: Undefined property: feeds_imagegrabber in feeds_imagegrabber_node_update() (line 100 of feeds_imagegrabber.module)

I also recommend:
#1618328: Notice: Undefined property: redirect_code in feeds_imagegrabber_webpage_scraper()
#1618360: Deprecated function: Function split() is deprecated in feeds_imagegrabber_feeds_set_target()
#1511010: Feeling lucky option doesn't work

If you are using feed nodes you shouldn't need:
#1618326: Default settings not used

amins’s picture

Thanks Rooby, The discussion is very constructive. I already enabled Image Field Grabber for each Feed Importer. The reason that I hesitate to use patches is that I really do not know how to run those patches. Is there any place that I can find some information on how to apply these patches. I know that there is some commands in mac but don't know what.

amins’s picture

I figured out how to apply patches, (just for the reference of future beginners, visit http://drupal.org/patch/apply for information on how to apply patches).
However, I am still having problem applying with Feeds Image Grabber. I am currently using Feeds_Image_Grabber 7.x.1.x-dev. Are you using Feeds 7.x-2.x-dev as well?

amins’s picture

Also, I am getting this warning when I create or update a Feed:

Warning: Missing argument 3 for feeds_imagegrabber_form_validate(), called in /home/*******/public_html/includes/form.inc on line 1443 and defined in feeds_imagegrabber_form_validate() (line 63 of /home/*******/public_html/sites/all/modules/feeds_imagegrabber/feeds_imagegrabber.module

rooby’s picture

I'm using feeds 7.x-2.0-alpha4

Sorry, the messages you mention in #6 are my fault. See #1643764-2: Incorrect usage of hook_form_BASE_FORM_ID_alter()..

If you reverse the patch you already applied from that issue and apply the new one it will fix that.

If you are using command line for patching you can reverse a patch using:
patch -p1 -R < patch-file-name.patch

Or since it is a very small patch you could also reverse it manually if you prefer.

amins’s picture

I used feeds 7.x-2.0-alpha4 and feeds image grabber 7.x-1.x-dev and applied all your suggested patches but got this error

An AJAX HTTP error occurred. HTTP Result Code: 200 Debugging information follows. Path: /batch?id=203&op=do StatusText: OK ResponseText: Fatal error: Call to undefined function taxonomy_node_get_terms() in /home/********/public_html/sites/all/modules/feeds/mappers/taxonomy.inc on line 30

Then I had to reinstall Feeds 7.x-2.0-alpha5 to resolve this error. but still no success in grabbing images from a feed and assigning it to a field.

can you please check and see if you successfully can import images from this feed
http://api.flickr.com/services/feeds/photos_public.gne?id=34827929@N06&lang=en-us&format=rss_200

Thanks

hwasem’s picture

I'm also having no luck getting images to show up, either. Rooby, in #3 above, what do you mean by "at one point I had my image selector set wrong so it wasn't picking up any image"? Where can I check to make sure mine is correct?

I have installed Feeds 7.x-2.0-alpha5, with Feeds Image Grabber 7.x-1.x-dev.
I've applied the patches detailed in #3 and #7 above.

Ideally I'd like to use "Attached to Content Type" in the feeds importer of "Use standalone form", but I currently have it set to my dedicated content type. I believe this is what you are calling All fields are importing except FIG. I'm not getting any errors.

I've followed the steps in the tutorial. The only thing different for me than outlined in the tutorial is that I'm importing from CSV. But RSS didn't seem to be a requirement.

Did you get this working, James? Is there anything else I can try? This is a critical feature for us.

Thanks for any help you can give!

amins’s picture

@hwasem, I am still waiting for a solution.

rooby’s picture

@hwasem:

I'm also having no luck getting images to show up, either. Rooby, in #3 above, what do you mean by "at one point I had my image selector set wrong so it wasn't picking up any image"? Where can I check to make sure mine is correct?

It depends how you are using the module. It could be either on the feeds imagegrabber setting page in the config section of the admin area, or in your specific feed.

There is a part in the settings where you have to set an ID or classs CSS selector, which this module will use to pull in the image from the web page the RSS item links to.
If this css selctor doesn't exist on the target web page then no image will be imported.

That is what I was referring to.

hwasem’s picture

I believe I have the selector set up correctly. We want to create an import of new books we've added to our collection. We have a vendor that provides the images and we are importing the URL to the image via CSV. The only thing at the image URL is the image of the book jacket cover. I chose "None" in the "Search for the images between the tag which is identified by" and added nothing to ID or Class field.

Here is a URL sample of the image we are trying to import:

For troubleshooting, I added a link to the image and it is pulling the URL just fine into the link field. If I click on the link from the newly created feed item, it takes me to the image as I would expect.

Any other ideas on things to check?

rooby’s picture

I have committed all the patches now and will create a new release shortly.

@james.icast:
The taxonomy error sounds unrelated to this module. It could be some other feeds related issue.

I tested your feed http://api.flickr.com/services/feeds/photos_public.gne?id=34827929@N06&lang=en-us&format=rss_200 with latest dev version and it worked.

I have attached an export of my feed.

@hwasem:
I did a little checking into your issue too.

One possible issue might be that there are query parameters in the image url after the image file extension.
This has been reported as possibly being a problem. See #1354956: Some feeds not working

However the main thing I would say is that you are linking to an image, not a normal web page.
When it tries to look through the HTML to find the image, it instead gets binary image data, which contains no HTML, so it doesn't find any images.
The fact that no error is thrown might be something to sort out.
I did a test from a csv with a link to a web page and it worked. Didn't work with the link to an image though.

rooby’s picture

Status: Active » Fixed

Marking this as fixed as no one has reported further issues.

Feel free to reopen this if the same issues are still present, otherwise just open new issues if you find anything else.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

kadiiski’s picture

Issue summary: View changes

Here is a working module. I've just made it but it's perfectly working for me. https://www.drupal.org/node/2704941

rooby’s picture

@kadiiski:

Can you explain the differences between your new module and this one?

Is it something that would make this module redundant or is it different enough to warrant having 2 modules.

If it is very similar but more stable it would seem to be better to become a maintainer of this module and use it, otherwise it causes fragmentation of effort (it is evident that there are not currently sufficient development resources for this module) and makes it confusing for users to choose which module to use.

rooby’s picture

After a brief look over the code in your module it doesn't seem to be feature equivalent to this module in its current state.

The simplicity of your module is great though and there is probably room for both modules since they serve slightly different use cases.

Possibly they could be merged however then you lose the simplicity of your code base and inherit some complexities you probably don't want to deal with.

kadiiski’s picture

@rooby:
The main reason I made the module was because a time ago I needed a module to give me this functionality (by time ago I mean month). I didn't find any. Actually I did but nothing was working as supposed. There were lots of open discussions about this functionality and as it seems - no answers nor solutions. This is the reason I made this one. It's working perfectly at least for me. About the Image Grabber I've tried couple of times to use it but the special image field never appeared in the Feeds Importer mapping neither in my module fields. There were no bad intentions against Image Grabber.

rooby’s picture

No bad intentions taken :)

I just wanted to check if it was worth merging into one or keeping them as separate modules.

They look different enough to keep both I think.

kadiiski’s picture

Yes, seems like we're on the same page. As long as everything is working fine it won't be bad for the community to have a choice in certain situations. :)

amins’s picture

Issue summary: View changes
r0ber’s picture