Hi, i'm having some troubles at importing a node.
I'm using "PorccessHTMLPage". and i'm importing Title, Body, File, Imagefile, List option.

First of all, when should i use "Pre-Filters" and "Filters"??? and what about the "re-order fields"???

I tried the example (i used other url), and manage to save the files within the directoy. but node it's not created....i'm not seeing my error, Xpath is correct and the file is saved, but node is not created.

Second: is it possible to save the file within same path of the imported item?? example: public://files/node_title/imagenes/
I would like to extract that path and use it to save the file, or, use the node title to make the path......but it should be transliterated (hope it's well spelled). I also found that the module can't create a folder.

thanks for your time!

CommentFileSizeAuthor
#3 feed-import-example-code.txt2.37 KBSorin Sarca

Comments

Sorin Sarca’s picture

Hi,
use pre-filters when you want to use alternative xpaths. Pre-filters won't affect final data only filters will.
Use filters when you want to alter data before saving it.
Order of fields is very important if you want to skip some items from being imported (will reduce number of operations in some cases and import will be faster).

Please tell me what example you tried with which url. Also check watchdog for errors at import.

I don't understand what would you like to do with that path. Why should a path be transliterated?
Of course module won't create a folder, for special cases you may need to write your own function (which will create a folder for example) and use it in filters.

FAAREIA’s picture

well, i just tried the example with http://demo.commerceguys.com/dc/

This is the code i used:

YTo4OntzOjQ6Im5hbWUiO3M6NzoiVGVzdGluZyI7czoxMjoibWFjaGluZV9uYW1lIjtzOjc6InRlc3RpbmciO3M6MzoidXJsIjtzOjMyOiJodHRwOi8vZGVtby5jb21tZXJjZWd1eXMuY29tL2RjLyI7czo0OiJ0aW1lIjtzOjE6IjAiO3M6MTE6ImVudGl0eV9pbmZvIjthOjI6e3M6NzoiI2VudGl0eSI7czo0OiJub2RlIjtzOjk6IiN0YWJsZV9wayI7czozOiJuaWQiO31zOjU6InhwYXRoIjthOjU6e3M6NToiI3Jvb3QiO3M6Mzg6Ii8vZGl2W0BpZD0nY29udGVudCddLy9hcnRpY2xlW0BpZF0vZGl2IjtzOjU6IiN1bmlxIjtzOjA6IiI7czoxNzoiI3Byb2Nlc3NfZnVuY3Rpb24iO3M6MTU6InByb2Nlc3NIVE1MUGFnZSI7czo2OiIjaXRlbXMiO2E6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M6NDY6ImRpdltAY2xhc3M9J2FydGljbGUtY29udGVudCddL2RpdlsxXS8vaW1nL0BzcmMiO31zOjE0OiIjZGVmYXVsdF92YWx1ZSI7czowOiIiO3M6MTU6IiNkZWZhdWx0X2FjdGlvbiI7czoxMzoiZGVmYXVsdF92YWx1ZSI7czo3OiIjZmlsdGVyIjthOjM6e3M6NDoiYWxnbyI7YToyOntzOjk6IiNmdW5jdGlvbiI7czoxMzoiOjpnZXRQcm9wZXJ0eSI7czo3OiIjcGFyYW1zIjthOjI6e2k6MDtzOjc6IltmaWVsZF0iO2k6MTtzOjM6InNyYyI7fX1zOjk6InJlbXBsYXppbyI7YToyOntzOjk6IiNmdW5jdGlvbiI7czo5OiI6OnJlcGxhY2UiO3M6NzoiI3BhcmFtcyI7YTozOntpOjA7czo3OiJbZmllbGRdIjtpOjE7czoxMToiL3RodW1ibmFpbC8iO2k6MjtzOjc6Ii9sYXJnZS8iO319czo0OiJob2xhIjthOjI6e3M6OToiI2Z1bmN0aW9uIjtzOjExOiI6OnNhdmVJbWFnZSI7czo3OiIjcGFyYW1zIjthOjI6e2k6MDtzOjc6IltmaWVsZF0iO2k6MTtzOjE2OiJwdWJsaWM6Ly9oaWpvZGQvIjt9fX1zOjExOiIjcHJlX2ZpbHRlciI7YTowOnt9fX1zOjk6IiNzZXR0aW5ncyI7YToxOntzOjE4OiJyZXBvcnRfaHRtbF9lcnJvcnMiO3M6MToiMSI7fX1zOjI6ImlkIjtzOjE6IjQiO3M6NzoiZW5hYmxlZCI7czoxOiIwIjt9

These are the field of the feed import: Type, Title, Body, Image.

Nodes are not created, and i think the image field is the problem.
Watchdog -> Exception: Uncaught Feed Import Exception en FeedImport::errorHandler() (línea 209 de E:\Proyectos\La Puna Digital\Web\sites\all\modules\feed_import\feed_import.inc.php).
Errors image.

btw, images are saved within the path i specify but node it's not created.

sry for this long post XD
thanks for this module and for your time!

Sorin Sarca’s picture

StatusFileSize
new2.37 KB

Hi,
I've check your configuration and looks like you missed some info from example:
Action when filtered result is empty must be Ignore this field for imge field or Skip importing this item for title/body.
I've updated HTML example and also released 2.6 where saveImage now creates directory if not exists.

Import attached code to see changes! Come back if there are any problems.

FAAREIA’s picture

Hi Sorin, i tested the code you gave (with v2.6) but it still not working. I also tested on a drupal base installation with very basic extra modules.

Watchdog (3 equal errors) -> Exception: Uncaught Feed Import Exception in FeedImport::errorHandler() (line 209 of E:\Proyectos\kbza\Web\sites\all\modules\feed_import\feed_import.inc.php).
and a warning (it's different from the last one)

I'm really lost, what is it that the image can't be saved within the field_image??

thanks again for your time,
very nice on creating folders and replace =)

Sorin Sarca’s picture

As you see in the image, errors are coming from filefield_paths module not from feed_import.
First error (with DomDocument) is from Feed Import but is ignored even if HTML isn't valid (you can hide that error in Process function settings).

You must to fix that module (or wait for a stable release since is beta).

FAAREIA’s picture

Status: Active » Closed (works as designed)

OMG, i love that module =(
i'll post this issue on the file field path module, i think it's very important to have the files structure organized.

also, thinking about this issue, i really don't know is the 2 files directory are crashing toghether (FFPaths and F Import). but what about the possibility to not create a directory and save the file on temp folder while FFP do his work?? I just write my thinking, i know nothing about making a module.

again, thanks for your time, and sry for so many posts.
keep up the good work with this module.

airstarh’s picture

Hi, I do have the similar problem but with file field.
When Module meets file, it uploads it, but skips node creation at all.
http://drupal.org/node/1814214