Hi,

I have created the following XML from a Drupal instance and I am using XPath to map the fields. I run the import process which imports all of the nodes into a single node and gives it the title call array. I then get the error below.

This is the XML http://www.propertiesmazarron.es/rss-property-feed.xml

This is the debug from xpath http://pastebin.com/30cBybck

Notice: Array to string conversion in drupal_write_record() (line 7254 of /var/www/spn/includes/common.inc).
Notice: Array to string conversion in drupal_write_record() (line 7254 of /var/www/spn/includes/common.inc).
Warning: Illegal offset type in isset or empty in pathauto_cleanstring() (line 180 of /var/www/spn/sites/all/modules/pathauto/pathauto.inc).
Warning: html_entity_decode() expects parameter 1 to be string, array given in decode_entities() (line 463 of /var/www/spn/includes/unicode.inc).
Warning: Illegal offset type in pathauto_cleanstring() (line 223 of /var/www/spn/sites/all/modules/pathauto/pathauto.inc).
Notice: Array to string conversion in drupal_write_record() (line 7254 of /var/www/spn/includes/common.inc).

I have spent 3days trying to workout what the problem is cannot find the issue.

CommentFileSizeAuthor
#7 asdd.png80.52 KBjanebootydoe

Comments

janebootydoe’s picture

Did you find the solution to this? I'm having the same problem with rss.

mambotech’s picture

Unfortunately no .... I am waiting for a response from the dev. Really need to understand why it is happening with this XML. I have other XML which is working.

janebootydoe’s picture

When you check debug does it list all of the titles correctly? For me it does which is the most confusing part. The parser is doing its job, but the processor is failing somehow.

mambotech’s picture

Yeah in my work XML it works OK with know errors. You may want to check you context paths in the Xpath mapping.

janebootydoe’s picture

I get no errors too, when I check the debug box it makes a big list of all the titles though. But only creates 1 node titled array. I wonder if it's due to a drupal core update.

http://shaffir1.libsyn.com/rss is the feed I'm testing with, doing /rss for context and channel/item/title for the title.

mambotech’s picture

That link is not the raw XML ... I use Views Data Export module to create the XML http://www.propertiesmazarron.es/rss-property-feed.xml

janebootydoe’s picture

StatusFileSize
new80.52 KB

That's what I'm importing from, not exporting. Common syndication works for everything I need but /rss/channel/title (not /rss/channel/item/title), so I have to use xpath. Which it works for as you can see. It just refuses to make nodes correctly :(

Alex777’s picture

I am using the latest version of Feeds xPath Parcer to import the contents (job postings) from xhtml web page to Drupal 7.
Debug shows me that I imported 7 job postings into D7 and says that only 1 node has been created. Indeed I get 1 node instead of 7 nodes. No errors. I tried standalone as well as attached the importer to a node.
I cannot understand where I went wrong.
For RSS news import (with other importers) everything was ok - many nodes were created.

janebootydoe’s picture

Alex777, are you having success with rss and xpath parser? I'm going to switch to this module I think. https://www.drupal.org/project/feed_import It is more complicated to use than feeds though.

mambotech’s picture

Hi,

I have managed to get the importer working with Feeds Extensible Parsers and it imports all nodes separately but I am still having a problem with importing images.

janebootydoe’s picture

What settings are you using that got it to work?

mambotech’s picture

Hi Jane,

See importer below.

http://pastebin.com/XqnsSre4

janebootydoe’s picture

Hi Mambotech. Where did you put this file? Do you mind sharing a screenshot of your feeds admin config? Very lost with this...

lkrier’s picture

I was having a very similar issue, and I did finally figure out what my particular problem was. I was setting the context node in the XPath settings too high on the tree. Once I changed that to point to the XML node that needed to create the Drupal node, it worked fine.

twistor’s picture

Category: Bug report » Support request

@janebootydoe, that debug output is not correct.

If you are trying to parse RSS, then you want something like this:
context:/rss/channel/item
item_title:title
feed_title:/rss/channel/title

@mambotech, what values are you trying to parse out of the XML feed?