inception-project / inception

INCEpTION provides a semantic annotation platform offering intelligent annotation assistance and knowledge management.
https://inception-project.github.io
Apache License 2.0
585 stars 149 forks source link

Cannot change layer of existing new annotation #1596

Closed jcklie closed 4 years ago

jcklie commented 4 years ago

Describe the bug

If I create an annotation and then want to change the layer, then it does not work.

To Reproduce Steps to reproduce the behavior: bug

I used the webanno demo de project

Expected behavior

It changes the layer from Chunk to Named Entity

Please complete the following information:

reckart commented 4 years ago

By default in INCEpTION, the "remember layer" mode is on. This means the layer of an annotation cannot be changed. The dropdown only says which layer a new annotation is created on.

You can disable "remember layer" in the settings dialog. If you change the dropdown then, a popup will appear asking if you really want to delete the current annotation and create an annotation of the selected type at this location.

The functionality is as intended, however, the label of the dropdown might need an adjustment.

jcklie commented 4 years ago

Did we change defaults? I remember it worked differently during the user study I conducted. When I untick "remember layer", then I get asked whether I really want to switch, when I have the box ticked and select a different layer while I have selected an annotation, then I get an ajax error:

``` INFO: Received ajax response (520 characters) INFO:
]]> INFO: Response processed successfully. INFO: refocus last focused component not needed/allowed INFO: Received ajax response (5184 characters) INFO:
]]> ]]> INFO: Response processed successfully. INFO: refocus last focused component not needed/allowed INFO: focus set on documents399 INFO: focus set on documents399 INFO: Received ajax response (1620 characters) INFO: ]]> ]]> INFO: returned focused element: [object HTMLSelectElement] INFO: returned focused element: [object HTMLSelectElement] INFO: Response processed successfully. INFO: refocus last focused component not needed/allowed INFO: Received ajax response (638 characters) INFO: ]]> INFO: returned focused element: [object HTMLSelectElement] INFO: focus removed from documents399 but ignored because of component replacement INFO: focus removed from documents399 but ignored because of component replacement INFO: returned focused element: null INFO: Response processed successfully. INFO: refocus last focused component not needed/allowed INFO: Received ajax response (31340 characters) INFO:
Technische Universität Darmstadt -- Computer Science Department -- INCEpTION -- 0.15.0-SNAPSHOT (2020-01-16 10:01:08, build 45b3a4e80449f5ef8c55f2bb7ea53cb0069f05bf)
]]>
]]>

admin: demo-anno-de/news1.tsv (3/13) Showing 1-5 of 30 sentences [document 2 of 2]

]]>

Annotation

No annotation selected
]]>
]]> ]]>
INFO: Response processed successfully. INFO: refocus last focused component not needed/allowed INFO: Channel '0' is busy - scheduling the callback to be executed when the previous request finish. INFO: Channel '0' is busy - scheduling the callback to be executed when the previous request finish. INFO: Channel '0' is busy - scheduling the callback to be executed when the previous request finish. INFO: Channel '0' is busy - scheduling the callback to be executed when the previous request finish. INFO: Received ajax response (520 characters) INFO: ]]> INFO: Response processed successfully. INFO: refocus last focused component not needed/allowed INFO: Calling postponed function... INFO: Received ajax response (520 characters) INFO: ]]> INFO: Response processed successfully. INFO: refocus last focused component not needed/allowed INFO: Calling postponed function... INFO: Received ajax response (520 characters) INFO: ]]> INFO: Response processed successfully. INFO: refocus last focused component not needed/allowed INFO: Calling postponed function... INFO: Received ajax response (928 characters) INFO: ]]> INFO: Response processed successfully. INFO: refocus last focused component not needed/allowed INFO: Calling postponed function... INFO: Received ajax response (5560 characters) INFO: ]]>]]> INFO: Response processed successfully. INFO: refocus last focused component not needed/allowed INFO: Received ajax response (13022 characters) INFO: ]]>
]]>
]]>
NamedEntity:6849 sofa: _InitialView begin: 540 end: 547 value: "PER" identifier: <null>

]]>
]]>
]]>Showing 1-5 of 30 sentences [document 2 of 2]]]>]]> ]]>value (NER_WebAnno)<\/div>\n\t\t
Named entity type<\/div>\n\t"; } });})();(function(){Wicket.Ajax.ajax({"u":"./annotation.html?25-1.0-rightSidebar-annotationDetailEditorPanel-annotationFeatureForm-featureEditorContainer-featureEditors-1-editor-value&p=3","m":"POST","c":"featureEditorHead76","pre":[function(attrs){return $('#editor3e2').length > 0;}],"e":"change","tr":{"id":"featureEditorHead76","d":250,"p":true}});})();(function(){jQuery('#featureEditorHead76').kendoComboBox({ "template": jQuery('#featureEditorHead76_template').html(), "dataTextField": "text", "autoBind": true, "dataValueField": "value", "dataSource": window.featureEditorHead76_datasource });})();(function(){Wicket.Ajax.ajax({"u":"./annotation.html?25-1.0-rightSidebar-annotationDetailEditorPanel-annotationFeatureForm-featureEditorContainer-focusResetHelper&p=3","c":"focusResetHelper3e3","pre":[function(attrs){if (Wicket.Event.keyCode(attrs.event) === 13) {attrs.event.preventDefault();} return false;}],"e":"keydown"});})();(function(){Wicket.Ajax.ajax({"u":"./annotation.html?25-1.1-rightSidebar-annotationDetailEditorPanel-annotationFeatureForm-featureEditorContainer-focusResetHelper&p=3","m":"POST","c":"focusResetHelper3e3","e":"focus"});})();(function(){Wicket.Ajax.ajax({"u":"./annotation.html?25-1.2-rightSidebar-annotationDetailEditorPanel-annotationFeatureForm-featureEditorContainer-focusResetHelper&p=3","m":"POST","c":"focusResetHelper3e3","f":"annotationFeatureForm","e":"submit"});})();(function(){try{if(window.UrlUtil){window.UrlUtil.editedFragment = false;}}catch(e){}})();(function(){setTimeout(function() { Wicket.$('vis3c0').dispatcher.post('renderDataPatch', [[{"op":"add","path":"/args/focus","value":[[["6849"]]]}]]); }, 0);})();(function(){try { var $w = jQuery('#featureEditorHead76').data('kendoComboBox'); if ($w) { $w.dataSource.read(); } } catch(error) { console.error(error); }})();(function(){Wicket.Focus.setFocusOnId('featureEditorHead76');})();]]> INFO: focus set on featureEditorHead76 from server side INFO: Response processed successfully. INFO: Calling focus on featureEditorHead76 INFO: focus set on featureEditorHead76 INFO: focus set on featureEditorHead76 INFO: focus removed from featureEditorHead76 INFO: Received ajax response (4441 characters) INFO: ]]>]]>

You are about to replace an annotation of type Named entity with a new annotation of type Chunk. This action will discard all feature values and delete 0 relation(s)/link(s) attached to current Named entity annotation. Are you sure?

]]>]]> ]]>
ERROR: Wicket.Ajax.Call.processComponent: Component with id [[forwardAnnotation3e8]] was not found while trying to perform markup update. Make sure you called component.setOutputMarkupId(true) on the component whose markup you are trying to update. INFO: Response processed successfully. INFO: refocus last focused component not needed/allowed INFO: focus set on cancel3eb INFO: focus set on cancel3eb INFO: Received ajax response (13183 characters) INFO:

Annotation

NamedEntity:6849 sofa: _InitialView begin: 540 end: 547 value: "PER" identifier: <null>

]]>
]]>value (NER_WebAnno)<\/div>\n\t\t
Named entity type<\/div>\n\t"; } });})();(function(){Wicket.Ajax.ajax({"u":"./annotation.html?25-1.0-rightSidebar-annotationDetailEditorPanel-annotationFeatureForm-featureEditorContainer-featureEditors-1-editor-value&p=3","m":"POST","c":"featureEditorHead76","pre":[function(attrs){return $('#editor3e2').length > 0;}],"e":"change","tr":{"id":"featureEditorHead76","d":250,"p":true}});})();(function(){jQuery('#featureEditorHead76').kendoComboBox({ "template": jQuery('#featureEditorHead76_template').html(), "dataTextField": "text", "autoBind": true, "dataValueField": "value", "dataSource": window.featureEditorHead76_datasource });})();(function(){Wicket.Ajax.ajax({"u":"./annotation.html?25-1.0-rightSidebar-annotationDetailEditorPanel-annotationFeatureForm-featureEditorContainer-focusResetHelper&p=3","c":"focusResetHelper3e3","pre":[function(attrs){if (Wicket.Event.keyCode(attrs.event) === 13) {attrs.event.preventDefault();} return false;}],"e":"keydown"});})();(function(){Wicket.Ajax.ajax({"u":"./annotation.html?25-1.1-rightSidebar-annotationDetailEditorPanel-annotationFeatureForm-featureEditorContainer-focusResetHelper&p=3","m":"POST","c":"focusResetHelper3e3","e":"focus"});})();(function(){Wicket.Ajax.ajax({"u":"./annotation.html?25-1.2-rightSidebar-annotationDetailEditorPanel-annotationFeatureForm-featureEditorContainer-focusResetHelper&p=3","m":"POST","c":"focusResetHelper3e3","f":"annotationFeatureForm","e":"submit"});})();(function(){Wicket.Ajax.ajax({"u":"./annotation.html?25-1.0-rightSidebar-annotationDetailEditorPanel-annotationFeatureForm-buttonContainer-delete&p=3","c":"delete3cc","e":"click"});})();(function(){Wicket.Ajax.ajax({"u":"./annotation.html?25-1.0-rightSidebar-annotationDetailEditorPanel-annotationFeatureForm-buttonContainer-clear&p=3","c":"clear3ce","e":"click"});})();(function(){var win; try { win = window.parent.Wicket.Window; } catch (ignore) { } if (typeof(win) == "undefined" || typeof(win.current) == "undefined") { try { win = window.Wicket.Window; } catch (ignore) { } } if (win && win.current) { var close = function(w) { w.setTimeout(function() { win.current.close(); }, 0); }; try { close(window.parent); } catch (ignore) { close(window); } }})();(function(){try { var $w = jQuery('#featureEditorHead76').data('kendoComboBox'); if ($w) { $w.dataSource.read(); } } catch(error) { console.error(error); }})();(function(){Wicket.Focus.setFocusOnId('featureEditorHead76');})();]]> INFO: returned focused element: [object HTMLInputElement] INFO: returned focused element: [object HTMLInputElement] INFO: focus set on featureEditorHead76 from server side INFO: Response processed successfully. INFO: Calling focus on featureEditorHead76 INFO: focus set on featureEditorHead76 INFO: focus set on featureEditorHead76 INFO: Received ajax response (69 characters) INFO: INFO: Response processed successfully. INFO: refocus last focused component not needed/allowed INFO: focus removed from featureEditorHead76 INFO: focus set on showPreferencesDialog3a9 INFO: focus set on showPreferencesDialog3a9 INFO: Received ajax response (16387 characters) INFO:
General Display Preferences
%
%
rows
Annotation Layer Preferences
Layer Show Palette
Chunk
Coreference
Dependency
Lemma
Named entity
POS
]]> ]]>
INFO: returned focused element: [object HTMLButtonElement] INFO: returned focused element: [object HTMLButtonElement] INFO: Response processed successfully. INFO: refocus last focused component not needed/allowed INFO: focus removed from showPreferencesDialog3a9 INFO: focus set on rememberLayer405 INFO: focus set on rememberLayer405 INFO: focus removed from rememberLayer405 INFO: focus set on save3fc INFO: focus set on save3fc INFO: Received ajax response (638 characters) INFO: ]]> INFO: returned focused element: [object HTMLInputElement] INFO: focus removed from save3fc but ignored because of component replacement INFO: focus removed from save3fc but ignored because of component replacement INFO: returned focused element: null INFO: Response processed successfully. INFO: refocus last focused component not needed/allowed INFO: Received ajax response (32044 characters) INFO:
Technische Universität Darmstadt -- Computer Science Department -- INCEpTION -- 0.15.0-SNAPSHOT (2020-01-16 10:01:08, build 45b3a4e80449f5ef8c55f2bb7ea53cb0069f05bf)
]]>
]]>

admin: demo-anno-de/news1.tsv (3/13) Showing 1-5 of 30 sentences [document 2 of 2]

]]>

Annotation

No annotation selected
]]>
]]> ]]>
INFO: Response processed successfully. INFO: refocus last focused component not needed/allowed INFO: Channel '0' is busy - scheduling the callback to be executed when the previous request finish. INFO: Received ajax response (928 characters) INFO: ]]> INFO: Response processed successfully. INFO: refocus last focused component not needed/allowed INFO: Calling postponed function... INFO: Received ajax response (5560 characters) INFO: ]]>]]> INFO: Response processed successfully. INFO: refocus last focused component not needed/allowed INFO: Received ajax response (13442 characters) INFO: ]]>
]]>
]]>
NamedEntity:6849 sofa: _InitialView begin: 540 end: 547 value: "PER" identifier: <null>
Named entity

]]>
]]>
]]>Showing 1-5 of 30 sentences [document 2 of 2]]]>]]> ]]>value (NER_WebAnno)<\/div>\n\t\t
Named entity type<\/div>\n\t"; } });})();(function(){Wicket.Ajax.ajax({"u":"./annotation.html?25-1.0-rightSidebar-annotationDetailEditorPanel-annotationFeatureForm-featureEditorContainer-featureEditors-1-editor-value&p=3","m":"POST","c":"featureEditorHead76","pre":[function(attrs){return $('#editor3e2').length > 0;}],"e":"change","tr":{"id":"featureEditorHead76","d":250,"p":true}});})();(function(){jQuery('#featureEditorHead76').kendoComboBox({ "template": jQuery('#featureEditorHead76_template').html(), "dataTextField": "text", "autoBind": true, "dataValueField": "value", "dataSource": window.featureEditorHead76_datasource });})();(function(){Wicket.Ajax.ajax({"u":"./annotation.html?25-1.0-rightSidebar-annotationDetailEditorPanel-annotationFeatureForm-featureEditorContainer-focusResetHelper&p=3","c":"focusResetHelper3e3","pre":[function(attrs){if (Wicket.Event.keyCode(attrs.event) === 13) {attrs.event.preventDefault();} return false;}],"e":"keydown"});})();(function(){Wicket.Ajax.ajax({"u":"./annotation.html?25-1.1-rightSidebar-annotationDetailEditorPanel-annotationFeatureForm-featureEditorContainer-focusResetHelper&p=3","m":"POST","c":"focusResetHelper3e3","e":"focus"});})();(function(){Wicket.Ajax.ajax({"u":"./annotation.html?25-1.2-rightSidebar-annotationDetailEditorPanel-annotationFeatureForm-featureEditorContainer-focusResetHelper&p=3","m":"POST","c":"focusResetHelper3e3","f":"annotationFeatureForm","e":"submit"});})();(function(){try{if(window.UrlUtil){window.UrlUtil.editedFragment = false;}}catch(e){}})();(function(){setTimeout(function() { Wicket.$('vis412').dispatcher.post('renderDataPatch', [[{"op":"add","path":"/args/focus","value":[[["6849"]]]}]]); }, 0);})();(function(){try { var $w = jQuery('#featureEditorHead76').data('kendoComboBox'); if ($w) { $w.dataSource.read(); } } catch(error) { console.error(error); }})();(function(){Wicket.Focus.setFocusOnId('featureEditorHead76');})();]]> INFO: focus set on featureEditorHead76 from server side INFO: Response processed successfully. INFO: Calling focus on featureEditorHead76 INFO: focus set on featureEditorHead76 INFO: focus set on featureEditorHead76 INFO: focus removed from featureEditorHead76 INFO: Received ajax response (536 characters) INFO: ]]>]]>
]]>
ERROR: Wicket.Ajax.Call.processComponent: Component with id [[forwardAnnotation3e8]] was not found while trying to perform markup update. Make sure you called component.setOutputMarkupId(true) on the component whose markup you are trying to update. INFO: Response processed successfully. INFO: refocus last focused component not needed/allowed INFO: focus set on wicketDebugLink INFO: focus set on wicketDebugLink INFO: focus removed from wicketDebugLink ```
reckart commented 4 years ago

We changed the defaults in comparison to WebAnno were "Remember layer" is off by default. However, in INCEpTION, it has been on by default for a long time.

reckart commented 4 years ago

What about the AJAX error? Is that reproducible?

jcklie commented 4 years ago

Yes

reckart commented 4 years ago

Shouldn't the issue remain open then - or are you opening a new one for the AJAX problem?

jcklie commented 4 years ago

I thought if it works like intended then it is not a bug, even if there is an ajax problem

reckart commented 4 years ago

The AJAX issue doesn't seem to be working as intended...?

reckart commented 4 years ago

This upstream PR fixes the error reported in the AJAX console: https://github.com/webanno/webanno/pull/1593