Bugzilla – Attachment 186395 Details for
Bug 37622
"location" header is set for non-POST routes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37622: Error in erm module when editing an agreement, a license, a package or a titles
Bug-37622-Error-in-erm-module-when-editing-an-agre.patch (text/plain), 3.88 KB, created by
Jonathan Druart
on 2025-09-15 08:42:31 UTC
(
hide
)
Description:
Bug 37622: Error in erm module when editing an agreement, a license, a package or a titles
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2025-09-15 08:42:31 UTC
Size:
3.88 KB
patch
obsolete
>From c9b45f270776ec3b64d8393abac487a95fdefeea Mon Sep 17 00:00:00 2001 >From: Hammat Wele <hammat.wele@inlibro.com> >Date: Mon, 12 Aug 2024 21:40:43 +0000 >Subject: [PATCH] Bug 37622: Error in erm module when editing an agreement, a > license, a package or a titles > >To reproduce > >1- Enable the ERMModule system preference > 1- Go to Administration > System Preferences > 2- Search for ERMModule > 3- Change the value to "Enable" > 4- Click on "Save all e-resource management preferences" > 5- Return to the main screen >1- Create an agreement > 1- Go to e-resource management > 2- Click on "Agreements" > 3- Click on "New agreement" > 4- Fill out the form (mandatory fields) > - Agreement name: Natural Medicines > - Status: Active > 5- Click on "Submit" >2- Edit the agreement > 1- Click on "Agreements" > 2- Click on "Edit" to the right of the Natural Medicines agreement > 3- Click on "Submit" > --> Something went wrong: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data >We got the same error when editing a license, a package or a title > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > Koha/REST/V1/ERM/Agreements.pm | 1 - > Koha/REST/V1/ERM/EHoldings/Packages/Local.pm | 1 - > Koha/REST/V1/ERM/EHoldings/Titles/Local.pm | 1 - > Koha/REST/V1/ERM/Licenses.pm | 1 - > 4 files changed, 4 deletions(-) > >diff --git a/Koha/REST/V1/ERM/Agreements.pm b/Koha/REST/V1/ERM/Agreements.pm >index 76c199b6324..2b6a169c944 100644 >--- a/Koha/REST/V1/ERM/Agreements.pm >+++ b/Koha/REST/V1/ERM/Agreements.pm >@@ -185,7 +185,6 @@ sub update { > map { { 'id' => $_->{field_id}, 'value' => $_->{value} } } @{$extended_attributes}; > $agreement->extended_attributes( \@extended_attributes ); > >- $c->res->headers->location( $c->req->url->to_string . '/' . $agreement->agreement_id ); > return $c->render( > status => 200, > openapi => $c->objects->to_api($agreement), >diff --git a/Koha/REST/V1/ERM/EHoldings/Packages/Local.pm b/Koha/REST/V1/ERM/EHoldings/Packages/Local.pm >index 4ebc5116c4d..d6e922abb61 100644 >--- a/Koha/REST/V1/ERM/EHoldings/Packages/Local.pm >+++ b/Koha/REST/V1/ERM/EHoldings/Packages/Local.pm >@@ -164,7 +164,6 @@ sub update { > map { { 'id' => $_->{field_id}, 'value' => $_->{value} } } @{$extended_attributes}; > $package->extended_attributes( \@extended_attributes ); > >- $c->res->headers->location( $c->req->url->to_string . '/' . $package->package_id ); > return $c->render( > status => 200, > openapi => $c->objects->to_api($package), >diff --git a/Koha/REST/V1/ERM/EHoldings/Titles/Local.pm b/Koha/REST/V1/ERM/EHoldings/Titles/Local.pm >index ac25ba0fae8..b94a1339d23 100644 >--- a/Koha/REST/V1/ERM/EHoldings/Titles/Local.pm >+++ b/Koha/REST/V1/ERM/EHoldings/Titles/Local.pm >@@ -157,7 +157,6 @@ sub update { > > $title->resources($resources); > >- $c->res->headers->location( $c->req->url->to_string . '/' . $title->title_id ); > return $c->render( > status => 200, > openapi => $c->objects->to_api($title), >diff --git a/Koha/REST/V1/ERM/Licenses.pm b/Koha/REST/V1/ERM/Licenses.pm >index 0c0b6fbed96..71ce18fbae6 100644 >--- a/Koha/REST/V1/ERM/Licenses.pm >+++ b/Koha/REST/V1/ERM/Licenses.pm >@@ -166,7 +166,6 @@ sub update { > map { { 'id' => $_->{field_id}, 'value' => $_->{value} } } @{$extended_attributes}; > $license->extended_attributes( \@extended_attributes ); > >- $c->res->headers->location( $c->req->url->to_string . '/' . $license->license_id ); > return $c->render( > status => 200, > openapi => $c->objects->to_api($license), >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 37622
:
170248
|
176567
|
180743
|
186395
|
186396
|
186397
|
186398
|
186879
|
186880
|
186881
|
186882