Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception when creating entities during Module install #3572

Open
davysumo opened this issue Oct 25, 2023 · 1 comment
Open

Exception when creating entities during Module install #3572

davysumo opened this issue Oct 25, 2023 · 1 comment
Labels

Comments

@davysumo
Copy link
Contributor

Bug Report

Q A
Critical Bug no
Version 6.x.x

Problem description

The method this->createTableForEntities(...) crashes in ModuleInstaller for optional modules (the modules that are installed during fork installation seem to install just fine.)

Exception:

"Handling "ForkCMS\Modules\Extensions\Domain\Module\Command\InstallModules" failed: The class 'ForkCMS\Modules\ContentBlocks\Domain\ContentBlock\ContentBlock' was not found in the chain configured namespaces ForkCMS\Modules\Pages\Domain, ForkCMS\Modules\Internationalisation\Domain, ForkCMS\Modules\Frontend\Domain, ForkCMS\Modules\Extensions\Domain, ForkCMS\Modules\BlockEditor\Domain, ForkCMS\Modules\Backend\Domain"

Relevant stack trace:

"TraceableMessageBus->dispatch() in src/Modules/Extensions/Backend/Actions/ModuleInstall.php (line 32)

                $this->header->addFlashMessage(FlashMessage::error('NotFound'));
                return new RedirectResponse(ModuleIndex::getActionSlug()->generateRoute($this->router));
            },
            validCallback: function (FormInterface $form): RedirectResponse {
                $this->commandBus->dispatch(new InstallModules(ModuleName::fromString($form->getData()['id'])));
                return new RedirectResponse(ModuleIndex::getActionSlug()->generateRoute($this->router));
            },
            flashMessageCallback: function (FormInterface $form): FlashMessage {
                return FlashMessage::success('ModuleInstalled', ['%module%' => $form->getData()['id']]);

ModuleInstall->ForkCMS\Modules\Extensions\Backend\Actions{closure}() in src/Modules/Backend/Domain/Action/AbstractFormActionController.php (line 90)

AbstractFormActionController->handleForm() in src/Modules/Extensions/Backend/Actions/ModuleInstall.php (line 22)

ModuleInstall->getFormResponse() in src/Modules/Backend/Domain/Action/AbstractFormActionController.php (line 52)"

Steps to reproduce

Reproduce by installing ContentBlocks from #3555

Expected behavior / Proposed solution

I suspect this broke in 1af2d77 or any of the commits on Sep 28, since before this was working.

@davysumo davysumo added the Bug label Oct 25, 2023
@carakas
Copy link
Member

carakas commented Nov 24, 2023

@davysumo is this still an issue? I seem to remember that your entity was final originally, that might have caused the problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants