2

I have a simple Grails web application with a couple of controllers. All works fine with grails 3.2.6, but after upgrading to Grails 3.3.3 I notice a strange behavior on HTML form post action.

For example, for a domain object called Subscriber, after editing an instance I see on my browser navigation bar:

subscriber/show/16?_method=PUT&version=2&username=test[......]

The controller snippet (a standard scaffolding controller) is

@Transactional
def update(Subscriber subscriber) {
    if (subscriber == null) {
        transactionStatus.setRollbackOnly()
        notFound()
        return
    }

    if (subscriber.hasErrors()) {
        transactionStatus.setRollbackOnly()
        respond subscriber.errors, view:'edit'
        return
    }

    subscriber.save(flush:true)

    request.withFormat {
        form multipartForm {
            flash.message = message(code: 'default.updated.message', args: [message(code: 'subscriber.label', default: 'Subscriber'), subscriber.id])
            redirect subscriber
        }
        '*'{ respond subscriber, [status: OK] }
    }
}
Sarbyn
  • 340
  • 1
  • 13

1 Answers1

1

This is a bug which has been fixed and the fix should be included in Grails 3.3.4.

See https://github.com/grails/grails-core/issues/10965.

Jeff Scott Brown
  • 26,804
  • 2
  • 30
  • 47
  • FYI... I believe that 3.3.3 is the only release that has this behavior in it. – Jeff Scott Brown Apr 04 '18 at 15:19
  • With 3.3.2 the bug does not exists, but on 3.3.4 it seems that someone has again this issue: https://github.com/grails/grails-core/issues/10965#issuecomment-378697259 – Sarbyn Apr 04 '18 at 18:56
  • 1
    @Sarbyn Agreed. I don't think StackOverflow is the proper forum for discussing the status of the ticket. Please take the conversation to our issue tracker. – Jeff Scott Brown Apr 04 '18 at 19:54