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

How to load templates from plugin in multi-project build? #308

Open
davidkron opened this issue May 9, 2020 · 3 comments
Open

How to load templates from plugin in multi-project build? #308

davidkron opened this issue May 9, 2020 · 3 comments

Comments

@davidkron
Copy link
Contributor

We have some application that we are trying to migrate from Grails 3 to Grails 4. The project is organized as a multi-project build, one application and some plugins. We have some "core" plugin that provides the basic templates for the fields plugin, e.g. /grails-app/views/templates/_fields/_table.gsp.

In Grails 3.x this has worked great, but since Grails 4.x something must have changed. The templates from our core-plugin aren't loaded anymore and it always falls back to the default templates from the fields plugin.

Is there a solution or workaround to this?

@sbglasius
Copy link
Member

If you can provide a small project with an example, I'll see if I have time to debug and hopefully fix the problem. Thank you.

@davidkron
Copy link
Contributor Author

I created two separate example projects, one using Grails 3.3.11 and one using Grails 4.0.3:
https://github.com/davidkron/grails3-fields-issue-308
https://github.com/davidkron/grails4-fields-issue-308

I created a small scaffolded UserController and did override the template /grails-app/views/templates/_fields/_table.gsp. The content of the template can be seen in the Grails 3 application when creating a new User and then going back to the index view. In the Grails 4 example the content from my template is not displayed.

@charlieamat
Copy link

Bump. I'm having this exact issue in a Grails 5 application.

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

No branches or pull requests

3 participants