{"record":{"id":"cc7e05d9bff818c9","repo":"quarkusio/quarkus","slug":"object-param-not-present","errorCode":null,"errorMessage":"Object param not present","messagePattern":"Object param not present","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"independent-projects/qute/core/src/main/java/io/quarkus/qute/WithSectionHelper.java","lineNumber":54,"sourceCode":"            return ImmutableList.of(WITH);\n        }\n\n        @Override\n        public ParametersInfo getParameters() {\n            return ParametersInfo.builder().addParameter(OBJECT).build();\n        }\n\n        @Override\n        public WithSectionHelper initialize(SectionInitContext context) {\n            return new WithSectionHelper(context);\n        }\n\n        @Override\n        public Scope initializeBlock(Scope previousScope, BlockInfo block) {\n            if (block.getLabel().equals(MAIN_BLOCK_NAME)) {\n                String object = block.getParameters().get(OBJECT);\n                if (object == null) {\n                    throw new IllegalStateException(\"Object param not present\");\n                }\n                block.addExpression(OBJECT, object);\n                return previousScope;\n            } else {\n                return previousScope;\n            }\n        }\n\n    }\n}\n","sourceCodeStart":36,"sourceCodeEnd":65,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/qute/core/src/main/java/io/quarkus/qute/WithSectionHelper.java#L36-L65","documentation":"The {with} section requires an object parameter: {#with object}...{/}. WithSectionHelper.initializeBlock() throws IllegalStateException when the parameter named 'object' is absent from the section's parameters, because there is nothing to bind the nested scope to.","triggerScenarios":"Writing {#with} (or {#with nested.foo}) with no parameter, e.g. {#with}{/}; an empty expression after #with; a template parsing quirk that drops the parameter.","commonSituations":"Hand-edited templates where the parameter was accidentally deleted; copy-pasting a {with} block and forgetting to fill in the object expression; generated templates with an empty variable placeholder.","solutions":["Add the object expression to the section: {#with myObject}...{/}.","Verify the #with tag is not empty (no stray whitespace-only parameter removed by a minifier/template formatter).","If the value may be absent, wrap in a null check: {#if obj}{#with obj}...{/}{/}.","Re-run the app after fixing; the error occurs at block initialization so the template must be reparsed."],"exampleFix":"// before\n{#with}\n  {name}\n{/}\n// after\n{#with user.profile}\n  {name}\n{/}","handlingStrategy":"validation","validationCode":"// verify the with section always carries a parameter\nif (templateBody.matches(\"(?s).*\\\\{#with\\\\s*\\\\}.*\")) {\n    throw new TemplateValidationException(\"{#with} requires an object parameter\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    engine.parse(templateContent);\n} catch (IllegalStateException e) {\n    if (\"Object param not present\".equals(e.getMessage())) {\n        // report template authoring error: {#with} missing parameter\n    }\n}","preventionTips":["Never leave {#with} without an expression","Add template linting to CI for empty section parameters","Wrap nullable targets: {#if obj}{#with obj}...{/}{/}"],"tags":["qute","template","with-section","illegal-state"],"backgroundTag":"missing-template-parameter","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}