Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

7.0.0-SNAPSHOT request/params binding stopped working on 2025-02-17T00:49:38Z #14027

Open
codeconsole opened this issue Feb 18, 2025 · 9 comments

Comments

@codeconsole
Copy link
Contributor

Expected Behavior

This has always worked, but stopped working after 2025-02-17T00:49:38Z

request and params are no longer bound when using Groovy .with {} on.a domain object inside a controller.

class OrderController {

    def process() {
        def order = new Order() 
        order.with {
            firstName           = request.currentUser.firstName
            lastName            = equest.currentUser.lastName

            billingPhone        = params.billing_phone
            billingAddress1     = params.billing_address1
            billingAddress2     = params.billing_address2
        }
    }
 }

Actual Behaviour

No response

Steps To Reproduce

No response

Environment Information

No response

Example Application

No response

Version

7.0.0-SNAPSHOT

@jeffscottbrown
Copy link
Member

7.0.0-SNAPSHOT request/params binding stopped working on 2025-02-17T00:49:38Z

How did you narrow down that specific point in time?

@jdaugherty
Copy link
Contributor

jdaugherty commented Feb 18, 2025

I know that when this PR (#13984) was merged, it broke several builds. We fixed the builds last week so it's possible you finally got the build in your environment?

We discussed this in weekly meeting and we don't want to merge these changes without a larger discussion going forward (due to the impact and mismatch with spring's bom).

@codeconsole
Copy link
Contributor Author

@jeffscottbrown that is my last known working release

@jeffscottbrown
Copy link
Member

@jeffscottbrown that is my last known working release

Do you know when the first broken release was built?

@codeconsole
Copy link
Contributor Author

We only discovered it through manual testing so in the last couple of hours. so it could have been anytime in the last 43 hours.

codeconsole added a commit to codeconsole/grails-autotimestamp-bug that referenced this issue Feb 19, 2025
@codeconsole
Copy link
Contributor Author

Replication Steps

git clone https://github.com/codeconsole/grails-autotimestamp-bug
cd demo7
sdk env
./gradle clean bootRun

http://localhost:8080/sample/failedBinding.json

@matrei
Copy link
Contributor

matrei commented Feb 19, 2025

I might be missing something, but I can't seem to replicate the problem:

http://localhost:8080/sample/failedBinding.json
http://localhost:8080/sample/failedBinding.json?name=Mattias

{"dateCreated":null,"name":null}
{"dateCreated":null,"name":"Mattias"}
Grails application running at http://localhost:8080 in environment: development
2025-02-19T09:03:31.394+01:00  INFO 415945 --- [nio-8080-exec-1] com.example.SampleController             : sample.name 'null' should not be null.
2025-02-19T09:03:48.760+01:00  INFO 415945 --- [nio-8080-exec-2] com.example.SampleController             : sample.name 'Mattias' should not be null.

@jeffscottbrown
Copy link
Member

I might be missing something, but I can't seem to replicate the problem

I am seeing the same thing. The name request param does appear to be properly bound when I run the app locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants