requests to create a list fails for projects with IRIs not in the form rdfh.ch/projects/shortcode
Closed this issue · 6 comments
Describe the bug
BEOL project and probably some other projects have IRIs that are not in rdfh.ch/projects/shortcode form.
BEOL has project IRI: http://rdfh.ch/projects/yTerZGyxjZVqFMNNKXCDPF
When attempting to create a new list, the request is however sent with an invalid project IRI: http://rdfh.ch/projects/0801. The same is true when attempting to edit list nodes.
The problem is in list-info-form.component.ts
, lines 80 and 92 where the project IRI is generated using shortcode, see
if (this._route.parent) {
this.mode = 'create';
this.beta = (this._route.parent.snapshot.url[0].path === 'beta');
if (this.beta) {
// get the shortcode of the current project
this._route.parent.paramMap.subscribe((params: Params) => {
this.projectCode = params.get('shortcode');
this.projectIri = `${this._ais.dspAppConfig.iriBase}/projects/${this.projectCode}`;
});
}
}
As you see the project IRI is constructed with the project shortcode, however, the project IRI of BEOL does not contain the shortcode. The list creation requests fail with an invalid syntax error. See the screenshot.
To solve the issue: get the user info, and extract the project IRI from the response rather than creating a project IRI using shortcode.
To Reproduce
Steps to reproduce the behavior:
- login as the system user
- try creating a new list in the BEOL project
- the request will fail with the error shown in the screenshot
Expected behavior
A new list should be created since the system admin has sufficient rights to do so.
Desktop (please complete the following information):
- OS: Mac M1
- Browser, Chrome, safari
- Version: current dev environment
@mdelez this bug should be fixed a.s.a.p since my master thesis student needs to use DSP-APP to add new lists to the BEOL project.
Thanks for the report :) I'll make a Jira issue and discuss with the team.
@SepidehAlassi for future issues, please open a ticket here or, if you are not registered on Jira, by sending an email to support@dasch.swiss
@mdelez thanks for the heads up, I will continue making bug reports in Jira. Please let me know when to expect a solution for this.
The fix on the app side is here #845 but the BEOL project will still require the fix on the API side.
@mdelez good thanks. The bug on the api side is also fixed.