If I want to create a mapping, without adding (manage) a field previously I get the following error message:
Notice: Undefined index: field in knowledge_graph_form_submit() (line 273 of /var/www/development.local/htdocs/sites/all/modules/knowledge_graph/includes/Controller/KnowledgeGraphEntityUIController.php).
Warning: Invalid argument supplied for foreach() in knowledge_graph_form_submit() (line 295 of /var/www/development.local/htdocs/sites/all/modules/knowledge_graph/includes/Controller/KnowledgeGraphEntityUIController.php).
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | notice_while_mapping_without_fields-2445189-2.patch | 1.32 KB | steffenr |
Comments
Comment #1
steffenrI'll have a look - looks like a missing check for expected data that is missing while submitting the form w/o mapping fields.
Comment #2
steffenrAttached a patch solving the issue..
I also updated the validation function to check for at least one field mapping.
Comment #3
steffenrComment #4
medienverbinder commentedI have added the patch from #2. If I want to create a mapping without adding (manage) a field previously, now I get a system message:
=> "You can not save a mapping without adding somefield mappings."
Everything works as intended.
Comment #5
steffenrThx @medienverbinder. As you might have noticed we are also fixing some other issues we found playing around with the module on our testing sites.
We'll update the latest DEV release with the latest patches if everything works as expected..
SteffenR
Comment #6
cyberschorschThis still need some work. I think we should tell the user right from the start that there are no maps to be mapped. We should also include a direct link to the "manage fields" page of the type if the field_ui module is enabled. If not, it should be simplified to a message that the user has to create fields and field_ui should be enabled for that.
Comment #7
cyberschorsch