Announcement

Collapse
No announcement yet.

Extension installation error with uuid

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

  • 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;
    }
    ​ 

  • #2
    Could try the fix:

    Code:
    DefaultRecordIdGenerator

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

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

    Comment


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


      Not yet tested.

      Comment


      • #4
        It works!

        Comment

        Working...
        X