[Real Estate Ext] Custom Controller breaks Inheritance (404) & Matcher Crash (500)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MoveFaster
    Junior Member
    • Feb 2026
    • 2

    #1

    [Real Estate Ext] Custom Controller breaks Inheritance (404) & Matcher Crash (500)

    Hi everyone, I am customizing the standard Real Estate extension and hitting two critical blockers that seem to be related to how the module handles inheritance and validation.

    My goal is to keep the standard "Matching" functionality while adding custom actions, but I am running into a 404 on the config page and a 500 crash on the matching engine.

    Here are the details:

    1. Controller Inheritance Issue (404 Not Found) I created a custom controller for `RealEstateRequest` to add a new action. File: `custom/Espo/Custom/Controllers/RealEstateRequest.php`

    When I extend `\Espo\Core\Controllers\Record`, I lose access to the standard Real Estate actions. Specifically, the "Matching Configuration" page throws a 404 error: Error: Action 'RealEstateRequest#matchingConfiguration' is not found.

    Question: What is the correct fully qualified namespace for the original Real Estate controller so I can extend it (e.g., `extends \Espo\Modules\RealEstate\Controllers...`)? I want to inherit the standard actions, not replace them.

    2. Matching Engine Crash (500 Internal Server Error) When I attempt to run `findMatchingProperties`, the server crashes with a 500 error. Checking the logs, I see a "Field validation failure" on my custom Enum field `cPropertyType`.

    Error Log: [ERROR] Field validation failure; entityType: RealEstateRequest, field: cPropertyType, type: valid.

    It appears the standard `PropertyMatching` service has strict validation that rejects my custom multi-select options before the matching logic even runs.

    Has anyone successfully extended the `PropertyMatching` service to allow custom Enum fields without triggering a validation hard stop?

    System Info: - EspoCRM Version: 8.x - Extension: Real Estate - Server: Nginx/MySQL (Docker) Any pointers on the correct inheritance path or how to relax the matcher's validation would be greatly appreciated. Thanks!
  • rabii
    Active Community Member
    • Jun 2016
    • 1384

    #2
    instead of extending you can use Api Action and add your own api action. https://docs.espocrm.com/development...n/#api-actions

    if you still want to use controller here is how to extend a controller in documentation https://docs.espocrm.com/development...ing-controller
    Rabii
    EspoCRM Custom Development

    🔗 Portfolio & Builds

    Comment

    Working...