Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
After importing some BOMN.IO models via /admin/config/workflow/eca/import, the follwing error occurs:
The website encountered an unexpected error. Please try again later.
Error: Class "Symfony\Component\Filesystem\Filesystem" not found in Drupal\eca_ui\Form\Import->submitForm() (line 365 of modules/contrib/eca/modules/ui/src/Form/Import.php).
Drupal\eca_ui\Form\Import->submitForm(Array, Object)
call_user_func_array(Array, Array) (Line: 114)
Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object) (Line: 52)
Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object) (Line: 592)
Drupal\Core\Form\FormBuilder->processForm('eca_import', Array, Object) (Line: 320)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 73)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 564)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 158)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 80)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 709)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
However, imported model was imported and works.
Steps to reproduce
- Go to https://ecaguide.org/library/test%20models/views/ and download the example model or create a dummy model and export this one and delete it (to be able to reimport).
- Import the downloaded file via /admin/config/workflow/eca/import
- Error occurs
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#18 | 2022-08-25_13-58.png | 41.29 KB | jurgenhaas |
#12 | PHP 8.0.20 - phpinfo.pdf | 2.53 MB | marco.b |
Issue fork eca-3305587
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
marco.b CreditAttribution: marco.b as a volunteer commentedComment #3
jurgenhaasUnfortunately, I can't reproduce this error.
It appears, that your Drupal site can't find the class
Symfony\Component\Filesystem\Filesystem
but that should always be there, as Drupal core requiressymfony/routing
which in itself requiressymfony/filesystem
.@marco.b can you provide some more details about the versions (Drupal, PHP, etc.) you're using and how you've installed your Drupal site in the first place?
Comment #4
marco.b CreditAttribution: marco.b as a volunteer commentedMy system runs at Drupal Version 9.4.5, PHP-Version 8.0.20, Memory limit 512M.
I installed it via composer command
`composer create-project drupal/recommended-project mynewproject --no-interaction`.
Comment #5
jurgenhaasThat should be exactly what's needed.
What output do you get with
composer show symfony/filesystem
?Comment #6
marco.b CreditAttribution: marco.b as a volunteer commentedMy
composer show symfony/filesystem
output:Comment #7
jurgenhaasThat's exactly what I get too. TBH, I have no idea why your Drupal installation then can't find the class
Symfony\Component\Filesystem\Filesystem
. And that's what the error message above is all about. So, it's hard to help with this. I would probably delete the vendor directory and callcomposer update
, that will rebuild all the dependencies and I can't see why that shouldn't work then.Comment #8
marco.b CreditAttribution: marco.b as a volunteer commentedI just deleted the vendor directory and called composer update so it has been recreated but the error is still happening.
Comment #9
mxhWe need more details about your installation and setup. Example info that may be useful here:
Comment #10
marco.b CreditAttribution: marco.b as a volunteer commentedComment #11
marco.b CreditAttribution: marco.b as a volunteer commentedComment #12
marco.b CreditAttribution: marco.b as a volunteer commentedThe error occured on two instances on separate webservers of provider all-inkl.com (shared hosting accounts).
operating system: Linux dd14330 5.4.0-113-generic - more infos see attached phpinfo as PDF.
I don't use any special Drupal installation profile. The Modules list differ between the affected systems.
Comment #14
jurgenhaasI have no idea whatsoever, what's going on here. Can't find any logical explanation.
However, I've found an issue in the submit handler where we've instantiated a new Filesystem object instead of using the available service. I've corrected that, and that makes that use-statement obsolete which caused the exception.
@marco.b please give it a try if that solves it at your end, because here we can't reproduce the problem.
Comment #15
rkolleri've tested to import the example model with the latest eca
1.1.x-dev
version. i dont get the exact same error @marco.b got. but i get the following error admin notice on the models list page:The import failed due to the following reason: There were errors validating the config synchronization. Configuration <em class="placeholder">eca.eca.process_z6jzc9k</em> depends on the <em class="placeholder">views.view.</em> configuration that will not exist after import. Configuration <em class="placeholder">eca.eca.process_z6jzc9k</em> depends on the <em class="placeholder">views.view.</em> configuration that will not exist after import.
Comment #16
jurgenhaas@rkoller that is something different. You should open a new issue for that and then also upload the ECA model
process_z6jzc9k
so that we can analyse.Comment #17
marco.b CreditAttribution: marco.b as a volunteer commented> @marco.b please give it a try if that solves it at your end, because here we can't reproduce the problem. (merge request !217)
sorry i don't get along well with git merge, can't test this. I can do a patch (.diff) if you have one.
Comment #18
jurgenhaasHi @marco.b there is a link to the patch available, see at the red arrow:
Comment #19
marco.b CreditAttribution: marco.b as a volunteer commentedAfter applying the patch the import works without error.
Comment #20
jurgenhaasOh, that's good news. Thanks @marco.b for your feedback.
Comment #23
jurgenhaasCommitted to 1.1.x and back-ported to 1.0.x