{"record":{"id":"3cd8b45e354d7835","repo":"octobercms/october","slug":"error-parsing-inspector-configuration-err","errorCode":null,"errorMessage":"Error parsing Inspector configuration. ${err}","messagePattern":"Error parsing Inspector configuration\\. (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"modules/backend/assets/foundation/controls/inspector/inspector.datainteraction.js","lineNumber":143,"sourceCode":"            $.oc.stripeLoadIndicator.hide();\n        });\n    }\n\n    //\n    // Internal methods\n    //\n\n    DataInteraction.prototype.parseConfiguration = function(configuration) {\n        if (!Array.isArray(configuration) && !$.isPlainObject(configuration)) {\n            if ($.trim(configuration) === 0) {\n                return {};\n            }\n\n            try {\n               return JSON.parse(configuration);\n            }\n            catch(err) {\n                throw new Error('Error parsing Inspector configuration. ' + err);\n            }\n        }\n        else {\n            return configuration;\n        }\n    }\n\n    DataInteraction.prototype.configurationRequestDone = function(data, onComplete, result) {\n        result.configuration = this.parseConfiguration(data.configuration.properties);\n\n        if (data.configuration.title !== undefined) {\n            result.title = data.configuration.title;\n        }\n\n        if (data.configuration.description !== undefined) {\n            result.description = data.configuration.description;\n        }\n","sourceCodeStart":125,"sourceCodeEnd":161,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/backend/assets/foundation/controls/inspector/inspector.datainteraction.js#L125-L161","documentation":"When `{% put %}` is used without `=` (capture mode), the tag body between `{% put %}` and `{% endput %}` is captured into exactly one target name. PutTokenParser throws this SyntaxError when parseAssignmentExpression returns more than one name in capture mode, because there is no way to split one rendered body across several variables.","triggerScenarios":"Writing `{% put header, footer %} ... {% endput %}` — any comma-separated list of targets before `{% endput %}` triggers it at compile time.","commonSituations":"Trying to fill two placeholders from one block; refactoring a `{% put a, b = x, y %}` assignment into capture form and leaving the comma; misunderstanding the tag as a multi-placeholder setter.","solutions":["Use one `{% put name %}...{% endput %}` block per target variable.","If you have multiple values up front, keep direct-assignment mode: `{% put header, footer = h, f %}`.","Compute the second value inside the body and assign it separately with `{% put other = expr %}`."],"exampleFix":"// before\n{% put header, footer %}<h1>Hi</h1>{% endput %}\n\n// after\n{% put header %}<h1>Hi</h1>{% endput %}\n{% put footer %}<small>Bye</small>{% endput %}","handlingStrategy":"try-catch","validationCode":"// Lint: capture-mode {% put %} must have exactly one target name\nif (preg_match_all('/{%-?\\s*put\\s+([a-zA-Z_][\\w]*)\\s*,[^=]*%-?}(?!.*=)/s', $template, $m)) {\n    // a comma after the first name in a tag without `=` is capture mode with multiple targets\n    throw new RuntimeException('Multiple put targets in block mode');\n}","typeGuard":null,"tryCatchPattern":"try {\n    $twig->load($template);\n} catch (Twig\\Error\\SyntaxError $e) {\n    if (str_contains($e->getMessage(), 'cannot have multiple targets')) {\n        // split the block into one {% put %} per target\n    }\n}","preventionTips":["Use exactly one target name in capture mode ({% put name %}...{% endput %}).","Use assignment mode ({% put a, b = x, y %}) when you have multiple values.","Add a CI twig parse pass to catch tag misuse before deploy."],"tags":["twig","october-cms","put","template-syntax","compile-time"],"backgroundTag":"twig-syntax-error","analyzedSha":"b608633a7e8922487d91a8161499020121c3b3bf","analyzedAt":"2026-08-21T04:24:57.515Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}