{"record":{"id":"10759527e7ca96c6","repo":"discourse/discourse","slug":"this-constructor-name-must-implement-evaluate","errorCode":null,"errorMessage":"${this.constructor.name} must implement evaluate()","messagePattern":"(.+?) must implement evaluate\\(\\)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"frontend/discourse/app/blocks/conditions/condition.ts","lineNumber":266,"sourceCode":"      ? this.resolveSource(args, context)\n      : this.defaultSource;\n  }\n\n  /**\n   * Evaluates whether the condition passes.\n   * Called at render time to determine if a block should be shown.\n   *\n   * **Note: This method MUST be pure and idempotent.** It may be called\n   * multiple times during a single render cycle (e.g., when debug logging\n   * is enabled), and should not have side effects.\n   *\n   * @param args - The condition arguments from the layout entry.\n   * @param context - Evaluation context from the blocks service.\n   * @returns True if condition passes, false otherwise.\n   */\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  evaluate(args: Record<string, unknown>, context?: ConditionContext): boolean {\n    throw new Error(`${this.constructor.name} must implement evaluate()`);\n  }\n\n  /**\n   * Returns the resolved value for debug logging purposes.\n   *\n   * Override this method in subclasses to provide custom resolved values\n   * for conditions that don't use the standard `source` parameter.\n   * For example, the `outletArg` condition uses a `path` parameter\n   * to resolve values from outlet args.\n   *\n   * @param args - The condition arguments from the layout entry.\n   * @param context - Evaluation context containing outletArgs.\n   * @returns Object with resolved value, or undefined if this condition doesn't resolve values.\n   */\n  getResolvedValueForLogging(\n    args: Record<string, unknown>,\n    context?: ConditionContext\n  ): ConditionResolvedValue | undefined {","sourceCodeStart":248,"sourceCodeEnd":284,"githubUrl":"https://github.com/discourse/discourse/blob/1b2d7253e854205d2c95c80b2c6a1cdd42e45059/frontend/discourse/app/blocks/conditions/condition.ts#L248-L284","documentation":"Error \"${this.constructor.name} must implement evaluate()\" thrown in discourse/discourse.","triggerScenarios":"Thrown at frontend/discourse/app/blocks/conditions/condition.ts:266 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"1b2d7253e854205d2c95c80b2c6a1cdd42e45059","analyzedAt":"2026-08-26T03:11:08.302Z","schemaVersion":2},"datasetVersion":"2026-08-26T07:17:17.940Z"}