Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project-specific user preferences may be saved without a user #4602

Closed
reckart opened this issue Mar 7, 2024 · 0 comments
Closed

Project-specific user preferences may be saved without a user #4602

reckart opened this issue Mar 7, 2024 · 0 comments
Assignees
Labels
🐛Bug Something isn't working Module: Preferences
Milestone

Comments

@reckart
Copy link
Member

reckart commented Mar 7, 2024

Describe the bug
There is some bug where a project-specific user preference ends up in the database, but it does not actually have a user set.

To Reproduce
Yet unknown.

Expected behavior
A project-specific user preference should always have a user set.

Screenshots

Caused by: java.lang.NullPointerException: Cannot invoke "de.tudarmstadt.ukp.clarin.webanno.security.model.User.getUsername()" because the return value of "de.tudarmstadt.ukp.inception.preferences.model.UserProjectPreference.getUser()" is null
	at de.tudarmstadt.ukp.inception.preferences.exporter.UserProjectPreferencesExporter.exportData(UserProjectPreferencesExporter.java:83) ~[inception-preferences-32.0-SNAPSHOT.jar!/:?]
	at de.tudarmstadt.ukp.inception.project.export.ProjectExportServiceImpl.exportProjectToPath(ProjectExportServiceImpl.java:258) ~[inception-project-export-32.0-SNAPSHOT.jar!/:?]
	... 22 more

Please complete the following information:

  • Version and build ID: 32.0-SNAPSHOT
@reckart reckart added 🐛Bug Something isn't working Module: Preferences labels Mar 7, 2024
@reckart reckart added this to the 32.0 milestone Mar 7, 2024
@reckart reckart self-assigned this Mar 7, 2024
reckart added a commit that referenced this issue Mar 7, 2024
- Add non-null constraints to user and project columns in the preferences tables
- Add null-checks to the Preferences service to be able to catch nulls early
reckart added a commit that referenced this issue Mar 7, 2024
…pecific-user-preferences-may-be-saved-without-a-user

#4602 - Project-specific user preferences may be saved without a user
reckart added a commit that referenced this issue Mar 7, 2024
- Add null-checks to the Preferences service to be able to catch nulls early
reckart added a commit that referenced this issue Mar 11, 2024
* main: (39 commits)
  No issue: Try to get build work on Windows
  No issue: Added gitattributes file
  #4618 - Resizing a span does not update annotations on disk
  #4616 - Option to disable displaying suggestions in sidebar curation mode
  #4554 - Allow displaying comments from annotators on hover when curating using curation sidebar on the annotation page
  No issue: Try to get build work on Windows
  #4610 - Annotations are misaligned when PDF pages vary in dimensions
  #4611 - Run the three SPARQL queries in the concept linker in parallel
  No issue: Added gitattributes file
  No issue: Enable matrix build
  #4557 - Bulk process page should not show processes from other projects
  #4596 - Ability to temporarily suspend recommenders
  #4603 - Bulk actions in search sidebar should not be greyed-out when in sidebar curation mode
  #4602 - Project-specific user preferences may be saved without a user
  #4603 - Bulk actions in search sidebar should not be greyed-out when in sidebar curation mode
  #4602 - Project-specific user preferences may be saved without a user
  #4600 - Error when exporting project during preference phase
  No issue: Fix example CSS file for custom XML format which was actually an SCSS file
  #4583 - Ability to configure layer visibility via a sidebar
  Remove <Proxy> directive as it shouldn't be necessary
  ...

% Conflicts:
%	inception/inception-diam/src/main/java/de/tudarmstadt/ukp/inception/diam/service/DiamWebsocketController.java
%	inception/inception-kb/src/test/java/de/tudarmstadt/ukp/inception/kb/FullTextIndexUpgradeTest.java
%	inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/config/RecommenderServiceAutoConfiguration.java
%	inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/footer/RecommendationEventFooterPanel.java
%	inception/inception-ui-scheduling/src/main/java/de/tudarmstadt/ukp/inception/ui/scheduling/TaskMonitorPanel.java
%	inception/inception-websocket/pom.xml
reckart added a commit that referenced this issue Mar 11, 2024
* main: (39 commits)
  No issue: Try to get build work on Windows
  No issue: Added gitattributes file
  #4618 - Resizing a span does not update annotations on disk
  #4616 - Option to disable displaying suggestions in sidebar curation mode
  #4554 - Allow displaying comments from annotators on hover when curating using curation sidebar on the annotation page
  No issue: Try to get build work on Windows
  #4610 - Annotations are misaligned when PDF pages vary in dimensions
  #4611 - Run the three SPARQL queries in the concept linker in parallel
  No issue: Added gitattributes file
  No issue: Enable matrix build
  #4557 - Bulk process page should not show processes from other projects
  #4596 - Ability to temporarily suspend recommenders
  #4603 - Bulk actions in search sidebar should not be greyed-out when in sidebar curation mode
  #4602 - Project-specific user preferences may be saved without a user
  #4603 - Bulk actions in search sidebar should not be greyed-out when in sidebar curation mode
  #4602 - Project-specific user preferences may be saved without a user
  #4600 - Error when exporting project during preference phase
  No issue: Fix example CSS file for custom XML format which was actually an SCSS file
  #4583 - Ability to configure layer visibility via a sidebar
  Remove <Proxy> directive as it shouldn't be necessary
  ...

% Conflicts:
%	inception/inception-diam/src/main/java/de/tudarmstadt/ukp/inception/diam/service/DiamWebsocketController.java
%	inception/inception-kb/src/test/java/de/tudarmstadt/ukp/inception/kb/FullTextIndexUpgradeTest.java
%	inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/config/RecommenderServiceAutoConfiguration.java
%	inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/footer/RecommendationEventFooterPanel.java
%	inception/inception-ui-scheduling/src/main/java/de/tudarmstadt/ukp/inception/ui/scheduling/TaskMonitorPanel.java
%	inception/inception-websocket/pom.xml
reckart added a commit that referenced this issue Mar 11, 2024
* main: (39 commits)
  No issue: Try to get build work on Windows
  No issue: Added gitattributes file
  #4618 - Resizing a span does not update annotations on disk
  #4616 - Option to disable displaying suggestions in sidebar curation mode
  #4554 - Allow displaying comments from annotators on hover when curating using curation sidebar on the annotation page
  No issue: Try to get build work on Windows
  #4610 - Annotations are misaligned when PDF pages vary in dimensions
  #4611 - Run the three SPARQL queries in the concept linker in parallel
  No issue: Added gitattributes file
  No issue: Enable matrix build
  #4557 - Bulk process page should not show processes from other projects
  #4596 - Ability to temporarily suspend recommenders
  #4603 - Bulk actions in search sidebar should not be greyed-out when in sidebar curation mode
  #4602 - Project-specific user preferences may be saved without a user
  #4603 - Bulk actions in search sidebar should not be greyed-out when in sidebar curation mode
  #4602 - Project-specific user preferences may be saved without a user
  #4600 - Error when exporting project during preference phase
  No issue: Fix example CSS file for custom XML format which was actually an SCSS file
  #4583 - Ability to configure layer visibility via a sidebar
  Remove <Proxy> directive as it shouldn't be necessary
  ...

% Conflicts:
%	inception/inception-diam/src/main/java/de/tudarmstadt/ukp/inception/diam/service/DiamWebsocketController.java
%	inception/inception-kb/src/test/java/de/tudarmstadt/ukp/inception/kb/FullTextIndexUpgradeTest.java
%	inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/config/RecommenderServiceAutoConfiguration.java
%	inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/footer/RecommendationEventFooterPanel.java
%	inception/inception-ui-scheduling/src/main/java/de/tudarmstadt/ukp/inception/ui/scheduling/TaskMonitorPanel.java
%	inception/inception-websocket/pom.xml
reckart added a commit that referenced this issue Mar 11, 2024
* main: (39 commits)
  No issue: Try to get build work on Windows
  No issue: Added gitattributes file
  #4618 - Resizing a span does not update annotations on disk
  #4616 - Option to disable displaying suggestions in sidebar curation mode
  #4554 - Allow displaying comments from annotators on hover when curating using curation sidebar on the annotation page
  No issue: Try to get build work on Windows
  #4610 - Annotations are misaligned when PDF pages vary in dimensions
  #4611 - Run the three SPARQL queries in the concept linker in parallel
  No issue: Added gitattributes file
  No issue: Enable matrix build
  #4557 - Bulk process page should not show processes from other projects
  #4596 - Ability to temporarily suspend recommenders
  #4603 - Bulk actions in search sidebar should not be greyed-out when in sidebar curation mode
  #4602 - Project-specific user preferences may be saved without a user
  #4603 - Bulk actions in search sidebar should not be greyed-out when in sidebar curation mode
  #4602 - Project-specific user preferences may be saved without a user
  #4600 - Error when exporting project during preference phase
  No issue: Fix example CSS file for custom XML format which was actually an SCSS file
  #4583 - Ability to configure layer visibility via a sidebar
  Remove <Proxy> directive as it shouldn't be necessary
  ...

% Conflicts:
%	inception/inception-diam/src/main/java/de/tudarmstadt/ukp/inception/diam/service/DiamWebsocketController.java
%	inception/inception-kb/src/test/java/de/tudarmstadt/ukp/inception/kb/FullTextIndexUpgradeTest.java
%	inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/config/RecommenderServiceAutoConfiguration.java
%	inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/footer/RecommendationEventFooterPanel.java
%	inception/inception-ui-scheduling/src/main/java/de/tudarmstadt/ukp/inception/ui/scheduling/TaskMonitorPanel.java
%	inception/inception-websocket/pom.xml
reckart added a commit that referenced this issue Mar 11, 2024
* main: (39 commits)
  No issue: Try to get build work on Windows
  No issue: Added gitattributes file
  #4618 - Resizing a span does not update annotations on disk
  #4616 - Option to disable displaying suggestions in sidebar curation mode
  #4554 - Allow displaying comments from annotators on hover when curating using curation sidebar on the annotation page
  No issue: Try to get build work on Windows
  #4610 - Annotations are misaligned when PDF pages vary in dimensions
  #4611 - Run the three SPARQL queries in the concept linker in parallel
  No issue: Added gitattributes file
  No issue: Enable matrix build
  #4557 - Bulk process page should not show processes from other projects
  #4596 - Ability to temporarily suspend recommenders
  #4603 - Bulk actions in search sidebar should not be greyed-out when in sidebar curation mode
  #4602 - Project-specific user preferences may be saved without a user
  #4603 - Bulk actions in search sidebar should not be greyed-out when in sidebar curation mode
  #4602 - Project-specific user preferences may be saved without a user
  #4600 - Error when exporting project during preference phase
  No issue: Fix example CSS file for custom XML format which was actually an SCSS file
  #4583 - Ability to configure layer visibility via a sidebar
  Remove <Proxy> directive as it shouldn't be necessary
  ...

% Conflicts:
%	inception/inception-diam/src/main/java/de/tudarmstadt/ukp/inception/diam/service/DiamWebsocketController.java
%	inception/inception-kb/src/test/java/de/tudarmstadt/ukp/inception/kb/FullTextIndexUpgradeTest.java
%	inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/config/RecommenderServiceAutoConfiguration.java
%	inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/footer/RecommendationEventFooterPanel.java
%	inception/inception-ui-scheduling/src/main/java/de/tudarmstadt/ukp/inception/ui/scheduling/TaskMonitorPanel.java
%	inception/inception-websocket/pom.xml
reckart added a commit that referenced this issue Mar 21, 2024
- Use the session owner instead of the data owner when writing preferenes because the data owner can be the curation user and that user has no preferences (at least not when going through the DIAM controller that is used in the curation sidebar
@reckart reckart closed this as completed Mar 22, 2024
reckart added a commit that referenced this issue Mar 25, 2024
- Another case where the session owner needs to be used to load the preferences
reckart added a commit that referenced this issue Mar 25, 2024
…pecific-user-preferences-may-be-saved-without-a-user

#4602 - Project-specific user preferences may be saved without a user
@reckart reckart added this to Kanban Aug 7, 2024
@reckart reckart moved this to 🍹 Done in Kanban Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛Bug Something isn't working Module: Preferences
Projects
Archived in project
Development

No branches or pull requests

1 participant