Bug 22248

Summary: Error when incrementing Mana comment
Product: Koha Reporter: Owen Leonard <oleonard>
Component: Web servicesAssignee: Alex Arnaud <alex.arnaud>
Status: CLOSED INVALID QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: alex.arnaud, ian, magnus, martin.renvoize, victor
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 17047    
Bug Blocks:    
Attachments: Bug 22248: make svc/mana/increment print valid output

Description Owen Leonard 2019-01-31 13:39:28 UTC
When I select an existing Mana comment on a subscription the process completes successfully but in the console this error is returned:


Can't return outside a subroutine at /home/vagrant/kohaclone/svc/mana/increment line 48.

It looks like that script should return JSON.
Comment 1 Alex Arnaud 2019-06-07 10:34:40 UTC
Created attachment 90413 [details] [review]
Bug 22248: make svc/mana/increment print valid output

Test plan:
  - select an existing comment on a subscription
  - check the logs, note the error (Can't return outside a subroutine)
  - apply this patch
  - select an existing comment again
  - error should be gone
Comment 2 Ian Walls 2019-08-02 17:27:51 UTC
I cannot reproduce this error to test.... a POST to http://localhost:8081/cgi-bin/koha/svc/mana/increment returns 200 OK with no content body.  Browser console is happy and quiet.

Perhaps a change on Mana's end?
Comment 3 Martin Renvoize 2020-02-24 12:45:21 UTC
Any update here Alex?
Comment 4 Victor Grousset/tuxayo 2020-05-05 15:56:00 UTC
Same as Ian. 

> 200 OK with no content body.  Browser console is happy and quiet.
Comment 5 Magnus Enger 2020-11-11 09:19:24 UTC
Owen: Can you still reproduce the problem?
Comment 6 Owen Leonard 2020-11-12 13:27:25 UTC
(In reply to Magnus Enger from comment #5)
> Owen: Can you still reproduce the problem?

I don't remember how I triggered the problem in the first place! I don't remember what I meant by "When I select an existing Mana comment on a subscription ..."

I don't object to closing this bug if that's the consensus.
Comment 7 Victor Grousset/tuxayo 2020-11-12 13:47:29 UTC
+1 If someone else manages to reproduce it they will hopefully find this ticket.
Comment 8 Owen Leonard 2021-04-22 11:24:19 UTC
I've tried again to reproduce this bug and have failed. I don't see any errors showing up during the subscription add process, during Mana search, or during the process of adding comments to Mana.