Error in erm module when editing an agreement, a license, a package or a title 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
Created attachment 170248 [details] [review] 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
I can't reproduce the error. Creating and editing an agreement works for me as expected, no errors. Running on latest main. Can you please revisit the test plan or verify how exactly to reproduce the error? Thanks.
(In reply to Pedro Amorim from comment #2) > I can't reproduce the error. Creating and editing an agreement works for me > as expected, no errors. Running on latest main. Can you please revisit the > test plan or verify how exactly to reproduce the error? Thanks. When I follow the previous steps, i can't edit a agreement and i got Something went wrong: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data as error And when i inspect the page before submitting the form i can see in the console the following error PUT http://master-intranet/api/v1/erm/agreements/api/v1/erm/agreements/2/2 HTTP/1.1 404 Not Found
Still can't reproduce on current main branch. Are you able to provide more information? What version is this happening on? Are you encountering this issue on a dev k-t-d environment or on a live environment?