0
Grails Version: 3.2.7
Groovy Version: 2.4.7
JVM Version: 1.8.0_111

I created 2 controllers and 2 domains

First domain:

package beermembers

class First {
String first
    static constraints = {
    }
}

Seconf domain:

package beermembers

class Second {
String second
    static constraints = {
    }
}

First controller:

package beermembers

class FirstController {
    static scaffold = First
    def index() {
    }
}

Second controller

package beermembers

class SecondController {
    static scaffold = Second
    def index() {
    }
}

I'm starting application and thought that will be

http://localhost:8080/first/index with CRUD for First domain

http://localhost:8080/second/index with CRUD for Second domain

but it shows CRUD for First on both urls.

how it looks

Could you explain please why SecondController shows First domain information?

tim_yates
  • 167,322
  • 27
  • 342
  • 338
Avenir
  • 75
  • 6
  • Looks like a bug in grails 3.2.7 version, I've tried same with grails 2.4.7 and its working fine but 3.2.7 giving me same problem as you're facing. Try renaming SecondController (e.g. MyController) and it'll work. – mehmood Mar 09 '17 at 09:06
  • Renaming doesn't help. I also found that if I will reboot application and will got to Second, it will show New Second. But if I will go to First then it will show New Second. So it shows the first page that I reached for all. Wanted to report bug, but http://jira.grails.org/ link from official site doesn't work. The same with "grails bug-report" – Avenir Mar 09 '17 at 17:28
  • Bugs should be reported to https://github.com/grails/grails-core/issues – James Kleeh Mar 09 '17 at 18:47

1 Answers1

2

A newer version of the scaffolding plugin was released that is compatible with Grails 3.2.7+

Use version 3.3.1 of scaffolding.

Here is the relevant issue https://github.com/grails/grails-core/issues/10520

James Kleeh
  • 12,094
  • 5
  • 34
  • 61
  • Thanks a lot. Changed build.gradle string from 'compile "org.grails.plugins:scaffolding' to 'compile "org.grails.plugins:scaffolding:3.3.1'. Works – Avenir Mar 09 '17 at 22:53