apache / apache/grails-intellij-plugin

Grails g:render with contextPath attribute are always reported as an error

Open
#153 0 comments 0 reactions 0 assignees View on GitHub
bug imported-from-youtrack
Dominant language
Java
Stars
17
Forks
4
Avg merge
5d 15h
Merged PRs (30d)
4

Description

It seems like the inclusion of the "contextPath" attribute in the "g:render" tag in a Grails GSP file are always reported as an error. It's been like this for several IDEA versions.

If the contextPath attribute is removed and the two files are located in the same (default) directories, then there is no error reported.

Since it works in Grails, it should not be reported as an error.

Example:
Template file: `grails-app/views/user/_form.gsp `
Contents of the template file doesn't really matter for this example, it just needs to exist.

GSP file using template: `grails-app/views/customer/edit.gsp `
Contents of `edit.gsp` (simplified):
```



```
Just contact me if you need more details for the example.

---

*Imported from [IDEA-122722](https://youtrack.jetbrains.com/issue/IDEA-122722) · Type: Bug · Votes: 0*
*Comments, attachments, dates and reporter are not part of the export — follow the link above for the full history.*

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the inspection in grails-app/views/customer/edit.gsp using the template at grails-app/views/user/_form.gsp and the g:render tag with contextPath="/user". Confirm that the Grails-valid usage is no longer reported as an error while the template still resolves correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
groovy, java
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.