Extension installation error with uuid

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • a.slyzhko
    Senior Member
    • Oct 2023
    • 124

    #1

    Extension installation error with uuid

    When using uuid as recordId, it is impossible to install extensions due to Espo doesn't follow recordId rules defined in metadata when installing extension.
    My suggestion is to refactor Espo\Core\Upgrades\Actions\Base.php

    PHP Code:
    use Espo\Core\Utils\Id\DefaultRecordIdGenerator;

    ...

    protected function 
    createRecordIdGenerator(): DefaultRecordIdGenerator
    {
        
    $injectableFactory $this->getContainer()->getByClass(InjectableFactory::class);

        return 
    $injectableFactory->create(DefaultRecordIdGenerator::class);
    }


    ...

    protected function 
    createProcessId(): string
    {
        if (isset(
    $this->processId)) {
            throw new 
    Error('Another installation process is currently running.');
        }

        
    $this->processId $this->createRecordIdGenerator()->generate();

        return 
    $this->processId;
    }
    ​ 
  • yuri
    EspoCRM product developer
    • Mar 2014
    • 9597

    #2
    Could try the fix:

    Code:
    DefaultRecordIdGenerator

    =>
    Code:
    RecordIdGenerator
    (with a proper namespace in a use statement)

    Code:
    $injectableFactory->create
    =>
    Code:
    $injectableFactory->createResolved

    Comment

    • yuri
      EspoCRM product developer
      • Mar 2014
      • 9597

      #3
      EspoCRM – Open Source CRM Application. Contribute to espocrm/espocrm development by creating an account on GitHub.


      Not yet tested.

      Comment

      • a.slyzhko
        Senior Member
        • Oct 2023
        • 124

        #4
        It works!

        Comment

        Working...