apache / apache/grails-core

GSP taglib syntax error (extra comma) fails silently

Open
#14,262 0 comments 0 reactions 1 assignee Claimed by @ilopmar View on GitHub
relates-to: grails-gsp
Dominant language
Groovy
Stars
2.9k
Forks
975
Avg merge
1d 22h
Merged PRs (30d)
92

Description

If an extra comma `,` is present in use of a taglib tag, it is flagged as a syntax error by IDEA, but seems to be ignored by gsp compiler, causing the remaining attributes of the tag to be silently dropped.

e.g. we had `` (note extra comma after code attribute) however the `by.you` message did not exist, but was still rendered as `by.you` instead of the default. The extraneous comma was the culprit.

### Steps to Reproduce

1. Use invalid syntax `` (see extra comma)

### Expected Behaviour

The gsp should not render due to invalid syntax (extra comma `,`)

### Actual Behaviour

The g:message tag works but ignores attributes after the comma. The text "missing.message" is displayed.

### Environment Information

- **Operating System**: macosX/linux
- **Grails Version:** 2.5.6/3.3.5
- **JDK Version:** 1.8

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.