Importing a feed exporter doesn't seem to work.
I create a feed importer, and get it working on a local environment; then I export the importer. The export has elements for name, description, fetcher, processor and parser
I copy the code, on then go to
./admin/structure/feeds/import
on another site instance, and paste in the export code.
An importer is created, but none of the attributes are set, not name, description, nothing.
Here is what I have for export:
$feeds_importer = new stdClass();
$feeds_importer->disabled = FALSE; /* Edit this to true to make a default feeds_importer disabled initially */
$feeds_importer->api_version = 1;
$feeds_importer->id = 'blog_importer';
$feeds_importer->config = array(
'name' => 'Blog Importer',
'description' => 'Blog Importer',
'fetcher' => array(
'plugin_key' => 'FeedsFileFetcher',
'config' => array(
'allowed_extensions' => 'txt csv tsv xml opml html htm',
'direct' => FALSE,
'directory' => 'public://feeds',
'allowed_schemes' => array(
0 => 'public',
),
),
),
'parser' => array(
'plugin_key' => 'FeedsXPathParserXML',
'config' => array(
'sources' => array(
'xpathparser:0' => 'Nid',
'xpathparser:1' => 'Title',
'xpathparser:2' => 'Body',
'xpathparser:3' => 'Path',
'xpathparser:4' => 'Post-date',
),
'rawXML' => array(
'xpathparser:0' => 0,
'xpathparser:1' => 0,
'xpathparser:2' => 0,
'xpathparser:3' => 0,
'xpathparser:4' => 0,
),
'context' => 'node_revision',
'exp' => array(
'errors' => 0,
'debug' => array(
'context' => 0,
'xpathparser:0' => 0,
'xpathparser:1' => 0,
'xpathparser:2' => 0,
'xpathparser:3' => 0,
'xpathparser:4' => 0,
),
),
'allow_override' => 0,
),
),
'processor' => array(
'plugin_key' => 'FeedsNodeProcessor',
'config' => array(
'expire' => '-1',
'author' => 0,
'authorize' => 0,
'mappings' => array(
0 => array(
'source' => 'xpathparser:0',
'target' => 'nid',
'unique' => 1,
),
1 => array(
'source' => 'xpathparser:1',
'target' => 'title',
'unique' => FALSE,
),
2 => array(
'source' => 'xpathparser:2',
'target' => 'body',
'unique' => FALSE,
),
3 => array(
'source' => 'xpathparser:3',
'target' => 'path_alias',
'unique' => FALSE,
),
4 => array(
'source' => 'xpathparser:4',
'target' => 'created',
'unique' => FALSE,
),
),
'update_existing' => '0',
'input_format' => 'full_html',
'skip_hash_check' => 0,
'bundle' => 'blog',
),
),
'content_type' => '',
'update' => 0,
'import_period' => '-1',
'expire_period' => 3600,
'import_on_create' => 1,
'process_in_background' => 0,
);
Am I missing something here?
thanks
Comments
Comment #1
August1914 commentedOK, I see that the export code is intended to be called from
hook_feeds_importer_default
is that right?
But then what's the context of the import importer admin form?
thanks
Comment #2
tmsimont commentedI've got the same exact problem.
Exported importer, then went to another site running the exact same codebase, clicked import... nothing.
I also got a bunch of "a feed already exists with this id" error feedback before i just said "overwrite existing" and it took, even though i have 0 existing feeds on the target site.
Comment #3
tmsimont commentedchanging component because the "Feeds Import" component is actually just "An example of a node importer and a user importer" and has nothing to do with the "Import Importer" task on the /admin/structure/feeds page.
Comment #4
tmsimont commented#777888: UI to import views-style exportable (a.k.a. How to import importers?) is related
Comment #5
tmsimont commentedclosing as duplicate of #777888: UI to import views-style exportable (a.k.a. How to import importers?)