Problem/Motivation

We can not use the defined Feeds template generation url for a custom parser not based upon FeedsCSVParser. The callback routine for url import/%/template enforces that the parser be an instanceof FeedsCSVParser.

This was discovered after installing feeds_xls which then broke our existing custom CSVParsers since the feeds_xls hijacked the standard url. I have filed an issue with feeds_xls regarding this.

Proposed resolution

Without changes to Feeds, every other type of parser will be required to define a unique url for it's purposes.

The existing url already has uniqueness built into it since the importer is part of the url. So the existing url callback is sufficient.

Maybe the check in routine feeds_importer_template can be altered to perform a more generic class check for something like an instance of FeedsParser? Or some other appropriate interface that all parsers capable of generating a template implement?

Comments

twistor’s picture

Version: 7.x-2.0-alpha8 » 7.x-2.x-dev

This is simple enough to accomplish.

We just need to add an interface that has the getTemplate() method on it, rather than check for FeedsCSVParser. There also needs to be some menu cache clearing logic fixed up in FeedsImporter::save().