Action null does not match an interceptor index action in Grails 3.2.x
- Dominant language
- Groovy
- Stars
- 2.9k
- Forks
- 975
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 92
Description
We are porting a pretty large web app from Grails 2.4.5 to Grails 3.2.7.
We had to convert all filters and `beforeInterceptor` in controllers to real interceptors.
We observed a strange behavior and consequently asked about it on
[] (https://stackoverflow.com/questions/46710640/how-to-match-action-null-for-a-controller-in-grails-3-2-x-interceptor)
There it was suggested to open a bug report.
### Steps to Reproduce
1. We have a controller with some actions, 'index|details|prizeBreakdown', (DrawController)
2. We created an interceptor with `match(controller: 'draws', action: 'index|details|prizeBreakdown')`
3. We attempt to intercept the `boolean before()` aspect.
4. We do a `GET` to URL `/draws`
### Expected Behaviour
`before()` should be executed like in Grails 2 filters.
### Actual Behaviour
`before()` is never executed because `action` is `null` and it does not match `index` action.
### Environment Information
- **Operating System**: Ubuntu 16.04.3 LTS, x86-64
- **Grails Version:** 3.2.7
- **JDK Version:** 1.8.0_144-b01, x86-64
- **Container Version (If Applicable):** N/A
Contributor guide
Research direction
Start with the DrawController actions and the interceptor's match(controller: 'draws', action: 'index|details|prizeBreakdown') configuration. Reproduce the GET request to /draws on Grails 3.2.7 and trace why action is null; done means before() executes for that URL as it did with the Grails 2 filters.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- groovy
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100