{"record":{"id":"c0e52fb8aea126eb","repo":"quarkusio/quarkus","slug":"invalid-composite-parameter-found","errorCode":null,"errorMessage":"Invalid composite parameter found: ","messagePattern":"Invalid composite parameter found: ","errorType":"exception","errorClass":"TemplateException","httpStatus":null,"severity":"error","filePath":"independent-projects/qute/core/src/main/java/io/quarkus/qute/IfSectionHelper.java","lineNumber":716,"sourceCode":"    }\n\n    private static int getHighestPrecedence(List<Object> params) {\n        int highestPrecedence = 0;\n        for (Object param : params) {\n            if (param instanceof Operator) {\n                Operator op = (Operator) param;\n                if (op.precedence > highestPrecedence) {\n                    highestPrecedence = op.precedence;\n                }\n            }\n        }\n        return highestPrecedence;\n    }\n\n    static <B extends ErrorInitializer & WithOrigin> List<Object> processCompositeParam(String stringParam, B block) {\n        // Composite params\n        if (!stringParam.endsWith(\"\" + Parser.END_COMPOSITE_PARAM)) {\n            throw new TemplateException(\"Invalid composite parameter found: \" + stringParam);\n        }\n        List<Object> split = new ArrayList<>();\n        Parser.splitSectionParams(stringParam.substring(1, stringParam.length() - 1),\n                block)\n                .forEachRemaining(split::add);\n        return parseParams(split, block);\n    }\n\n    @SuppressWarnings(\"unchecked\")\n    static Condition createCondition(Object param, SectionBlock block, Operator operator, SectionInitContext context) {\n\n        Condition condition;\n\n        if (param instanceof String) {\n            String stringParam = param.toString();\n            boolean logicalComplement = stringParam.startsWith(LOGICAL_COMPLEMENT);\n            if (logicalComplement) {\n                stringParam = stringParam.substring(1);","sourceCodeStart":698,"sourceCodeEnd":734,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/qute/core/src/main/java/io/quarkus/qute/IfSectionHelper.java#L698-L734","documentation":"Qute parses composite (parenthesized) parameters inside {#if} sections, e.g. {#if (a || b) && c}. A composite param string starts with Parser.BEGIN_COMPOSITE_PARAM ('(') and must end with END_COMPOSITE_PARAM (')'). If the string ends with anything else, the parameter is structurally malformed and TemplateException is thrown during template parsing.","triggerScenarios":"A parenthesized fragment inside an {#if} section whose closing parenthesis is missing or the param string is corrupted, e.g. {#if (a || b && c} — the leading '(' opens a composite param but there is no matching ')'.","commonSituations":"Hand-edited templates where a closing paren was deleted; nested conditions with miscounted parentheses; template copy/paste truncation.","solutions":["Balance the parentheses in the {#if} condition so every '(' has a matching ')', e.g. {#if (a || b) && c}","If the condition is complex, split it into nested {#if} sections instead of one deeply parenthesized expression","Validate template syntax at build/startup (templates are parsed eagerly when possible) so the failure is caught before users hit the page"],"exampleFix":"// before\n{#if (user.active || user.admin && debug}...{/if}\n// after\n{#if (user.active || user.admin) && debug}...{/if}","handlingStrategy":"validation","validationCode":"long opens = expr.chars().filter(c -> c == '(').count();\nlong closes = expr.chars().filter(c -> c == ')').count();\nif (opens != closes) throw new IllegalArgumentException(\"Unbalanced parentheses in: \" + expr);","typeGuard":null,"tryCatchPattern":"try {\n    engine.parse(content);\n} catch (TemplateException e) {\n    if (e.getMessage().startsWith(\"Invalid composite parameter found\")) {\n        throw new TemplateSyntaxException(content, \"Unbalanced parentheses in {#if} expression\", e);\n    }\n    throw e;\n}","preventionTips":["Count '(' vs ')' before shipping template changes","Split deeply nested conditions into nested {#if} sections","Lint templates in CI by parsing all of them at build time"],"tags":["qute","template","syntax","if-section","parser"],"backgroundTag":"template-syntax-error","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}