[MGNLGROOVY-102] When a compilation error occurs while saving a new script, trying to fix the error and save again throws NPE Created: 09/Dec/13  Updated: 24/Jan/14  Resolved: 09/Dec/13

Status: Closed
Project: Magnolia Groovy Module
Component/s: None
Affects Version/s: 2.2
Fix Version/s: 2.2.1

Type: Bug Priority: Major
Reporter: Federico Grilli Assignee: Federico Grilli
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
causality
caused by MGNLUI-2509 JcrNewNodeAdapter should be reusable ... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled

 Description   

To reprodudce

  • create a Groovy class in the scrips repo by entering some invalid characters.
  • you'll get an action failure with the message "info.magnolia.ui.api.action.ActionExecutionException: untitledGroovyScript should declare at least one class named untitledGroovyScript"
  • fix the script by creating a proper class, e.g. class Foo{}
  • submit form again and boom! NPE (see linked issue)

Generated at Mon Feb 12 05:55:36 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.