Extension installation error with uuid

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

    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
    Member
    • Mar 2014
    • 8624

    #2
    Could try the fix:

    Code:
    DefaultRecordIdGenerator

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

    Code:
    $injectableFactory->create
    =>
    Code:
    $injectableFactory->createResolved
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment

    • yuri
      Member
      • Mar 2014
      • 8624

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


      Not yet tested.
      If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

      Comment

      • a.slyzhko
        Member
        • Oct 2023
        • 96

        #4
        It works!

        Comment

        Working...