Closed (fixed)
Project:
Feeds
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
13 Aug 2014 at 17:28 UTC
Updated:
23 Apr 2017 at 08:55 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
megachrizI can confirm that when importing an importer using admin/structure/feeds/import, there is no alert about a non-existing content type and that on the mapping page some of the targets say "missing". In my case, the created importer is not completely "blank". All the "settings" (basic settings, fetcher settings, etc.) are still there. It's just the mapping that can be qualified as "blank". I agree a warning message would be nice here.
Comment #2
pravin ajaaz commentedComment #3
twistor commentedWe should do some validation.
Checking the content type would be a good start. I don't think we should validate that all of the fields exist, since the missing mapping is fine.
Comment #4
megachrizHere is a first step at this.
getConfigAllowedValues():This allows Feeds plugins to set the allowed values per config key. This is handy for the processor's bundle setting and - when #2529538: Generic entity language support. is done - for the processor's language setting.
validateConfig():This allows Feeds plugins to validate the config. Plugins implementing this method should return an array of error messages.
getConfigAllowedValues()to set allowed values for the bundle setting.validateConfig()to execute the same method on the fetcher, parser and processor that it contains.feeds_ui_edit_page()call, thus on every importer config page.Caveats, further improvements
validateConfig()andconfigFormValidate().validateConfig().Suggestions and feedback are welcome!
Comment #6
megachrizSome of the test failures were caused by a bug in the test "FeedsUIUserInterfaceTestCase". I've fixed that in #2574789: Wrong processor settings set in FeedsUIUserInterfaceTestCase::testImporterImport().
Another bug in the patch from #4 was that all importers you were trying to import became invalid, because
form_error()was called regardless if there were errors or not. This is fixed in the attached patch. Caveats noted in #4 still apply.Comment #7
megachrizThis patch does the following in addition of the previous patch:
FeedsConfigurable::getConfigAllowedValues()is removed because the error message for an invalid config option would refer to the untranslatable config key instead of config label.FeedsImporter::validateConfig().All caveats reported in #4 are handled with the patch except the following (minor) one:
Comment #9
megachrizOops, accidently showed an error message of an unavailable plugin when the plugin class was *not* an instance of FeedsMissingPlugin. Should be the opposite, of course!
Comment #10
megachrizComment #11
megachrizI hope that this will make it into the Feeds 7.x-2.0-beta4 release.
Comment #12
megachrizReroll.
Comment #13
megachrizNoticed an issue with validating the selected language on the importer: every language was reported as invalid, even
LANGUAGE_NONE! This issue is new though, it did not occur before the changes from #2788125: FeedsProcessor not respecting bundle i18n language settings.Changed language validation to use the new
languageOptions()method, introduced into that same issue.Other then that, I think this is ready.
Comment #14
megachrizOops, noted a small mistake in last patch. Should have been catched by the tests though.
Comment #16
megachrizReroll.
Comment #18
megachrizCommitted #16.