Announcement

Collapse
No announcement yet.

Class "Espo\Modules\Hello\Controllers\Hello" does not exist

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Class "Espo\Modules\Hello\Controllers\Hello" does not exist

    This weekend I have create my first Espo extention using this template: https://github.com/espocrm/ext-template
    It's all working fine; I created a very simple Hello-entity to check I fully understand whats happening.
    After creating the entity with the entity manager, i used the 'copy-custom' function to get all the sources in my src folder.
    But after using the 'node build --copy​', my application doesnt work anymore.
    The files are copied the the right places in the site folder, my 'Hello'module is there in the 'custom\Espo\Modules' folder.

    But i got this error:
    [2023-10-15 20:21:34] ERROR: (-1) Class "Espo\Modules\Hello\Controllers\Hello" does not exist; GET /Settings; line: 174, file: D:\Webserver\ext-template\site\application\Espo\Core\Utils\File\Cla ssMap.php
    [2023-10-15 20:21:34] ERROR: (-1) Class "Espo\Modules\Hello\Controllers\Hello" does not exist; GET /I18n; line: 174, file: D:\Webserver\ext-template\site\application\Espo\Core\Utils\File\Cla ssMap.php​

    Once i remove the Hello-folder from the modules directory, the application directly starts to work again.
    Could you please help me to any direction? I have no cue at all.

    Thanks, Serge.

  • #2
    Hi Serge,

    I didn't try the copy-custom script for a while. Maybe there's some incompatibility with new versions. What is content of the controller class?

    Comment


    • #3
      Just a empty controller:

      Code:
      <?php
      
      namespace Espo\Custom\Controllers;
      
      class Hello extends \Espo\Core\Templates\Controllers\Base
      {
      }
      ​

      Comment


      • rabii
        rabii commented
        Editing a comment
        Did you delete the custom folder after? according to documentation, you should delete the custom folder from Site/custom/Espo/Custom otherwise it will cause issues.

        I think that is what is happening here, i can see that you still have the controller under custom folder which causes the issue.

        Delete the custom folder and try again.

      • Serge
        Serge commented
        Editing a comment
        Many thanks for your reponse; yes i did.

    • #4
      I fixed incompatibility with v8.0.

      Template repository for EspoCRM extensions. Contribute to espocrm/ext-template development by creating an account on GitHub.

      Comment


      • #5
        Thanks yuri, is working now
        Thanks for your fast reply and fix.

        Comment

        Working...
        X