contentacms / contenta_jsonapi

Contenta CMS, the decoupled Drupal
http://www.contentacms.org/
GNU General Public License v2.0
328 stars 104 forks source link

Error disable recipes_magazin and removing default content #405

Closed balmacefa closed 3 years ago

balmacefa commented 4 years ago

When I try to disable the recipes_magazin module I get this error:

drush pmu recipes_magazin


 [error]  InvalidArgumentException: The internal path component 'Array' is invalid. Its path component must have a leading slash, e.g. internal:/foo. in Drupal\Core\Url::fromInternalUri() (line 413 of /app/web/core/lib/Drupal/Core/Url.php). 
 [error]  Drupal\Core\Entity\EntityStorageException: The internal path component 'Array' is invalid. Its path component must have a leading slash, e.g. internal:/foo. in Drupal\Core\Entity\Sql\SqlContentEntityStorage->delete() (line 794 of /app/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php). 
 [error]  Drupal\Core\Entity\EntityStorageException: The internal path component 'Array' is invalid. Its path component must have a leading slash, e.g. internal:/foo. in Drupal\Core\Entity\Sql\SqlContentEntityStorage->delete() (line 794 of /app/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php). 

In SqlContentEntityStorage.php line 794:

  The internal path component 'Array' is invalid. Its path component must have a leading slash, e.g. internal:/foo.  

In SqlContentEntityStorage.php line 794:

  The internal path component 'Array' is invalid. Its path component must have a leading slash, e.g. internal:/foo.  

In SqlContentEntityStorage.php line 794:

  The internal path component 'Array' is invalid. Its path component must have a leading slash, e.g. internal:/foo.  

In Url.php line 413:

  The internal path component 'Array' is invalid. Its path component must have a leading slash, e.g. internal:/foo.  

If I try to use the /admin/contenta/revert function I had this error:

The website encountered an unexpected error. Please try again later.

Drupal\Core\Entity\EntityStorageException: The internal path component 'Array' is invalid. Its path component must have a leading slash, e.g. internal:/foo. in Drupal\Core\Entity\Sql\SqlContentEntityStorage->delete() (line 794 of core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).

Drupal\Core\Url::fromUri('internal:Array') (Line: 80)
Drupal\decoupled_router\CacheInvalidator->getTagsBySourcePath(Array) (Line: 54)
Drupal\decoupled_router\CacheInvalidator->invalidateByPath(Array) (Line: 32)
decoupled_router_path_delete(Array)
call_user_func_array('decoupled_router_path_delete', Array) (Line: 403)
Drupal\Core\Extension\ModuleHandler->invokeAll('path_delete', Array) (Line: 428)
Drupal\Core\Extension\ModuleHandler->invokeAllDeprecated('It will be removed before Drupal 9.0.0. Use hook_ENTITY_TYPE_delete() for the 'path_alias' entity type instead. See https://www.drupal.org/node/3013865.', 'path_delete', Array) (Line: 37)
Drupal\path_alias\PathAliasStorage->invokeHook('delete', Object) (Line: 434)
Drupal\Core\Entity\EntityStorageBase->delete(Array) (Line: 786)
Drupal\Core\Entity\Sql\SqlContentEntityStorage->delete(Array) (Line: 65)
Drupal\path\Plugin\Field\FieldType\PathFieldItemList->delete() (Line: 881)
Drupal\Core\Entity\ContentEntityStorageBase->invokeFieldMethod('delete', Object) (Line: 743)
Drupal\Core\Entity\ContentEntityStorageBase->doDelete(Array) (Line: 428)
Drupal\Core\Entity\EntityStorageBase->delete(Array) (Line: 786)
Drupal\Core\Entity\Sql\SqlContentEntityStorage->delete(Array) (Line: 798)
node_user_predelete(Object)
call_user_func_array('node_user_predelete', Array) (Line: 403)
Drupal\Core\Extension\ModuleHandler->invokeAll('user_predelete', Array) (Line: 204)
Drupal\Core\Entity\EntityStorageBase->invokeHook('predelete', Object) (Line: 843)
Drupal\Core\Entity\ContentEntityStorageBase->invokeHook('predelete', Object) (Line: 424)
Drupal\Core\Entity\EntityStorageBase->delete(Array) (Line: 786)
Drupal\Core\Entity\Sql\SqlContentEntityStorage->delete(Array) (Line: 403)
Drupal\Core\Entity\EntityBase->delete() (Line: 205)
Drupal\migrate\Plugin\migrate\destination\Entity->rollback(Array) (Line: 369)
Drupal\migrate\Plugin\migrate\destination\EntityContentBase->rollback(Array) (Line: 314)
Drupal\migrate\MigrateExecutable->rollback()
call_user_func_array(Array, Array) (Line: 67)
Drupal\recipes_magazin\MigrationRunner->Drupal\recipes_magazin\{closure}('recipes_magazin__recipe_authors', 7)
array_walk(Array, Object) (Line: 68)
Drupal\recipes_magazin\MigrationRunner->execute(Array, 'rollback') (Line: 49)
Drupal\recipes_magazin\MigrationRunner->remove(Array) (Line: 22)
recipes_magazin_uninstall()
call_user_func_array('recipes_magazin_uninstall', Array) (Line: 392)
Drupal\Core\Extension\ModuleHandler->invoke('recipes_magazin', 'uninstall', Array) (Line: 433)
Drupal\Core\Extension\ModuleInstaller->uninstall(Array, 1) (Line: 91)
Drupal\Core\ProxyClass\Extension\ModuleInstaller->uninstall(Array) (Line: 62)
Drupal\contenta_enhancements\Form\RevertForm->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: 593)
Drupal\Core\Form\FormBuilder->processForm('contenta_enhancements.revert.confirm', Array, Object) (Line: 321)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 91)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 573)
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: 151)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 67)
Drupal\simple_oauth\HttpMiddleware\BasicAuthSwap->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
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: 49)
Asm89\Stack\Cors->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

I'm using Lando dev for the environment setup and is a fresh installation

balmacefa commented 4 years ago

There's an error with decoupled_router ver 1.1

Solved updating the dependencies. Edit your compose.json:

  "require": {
    "drupal/decoupled_router":  "1.1 as 1.12"
  },

clear the cache composer clearcache

deleting the composer.lock

Run composer install

balmacefa commented 4 years ago

https://github.com/contentacms/contenta_jsonapi/blob/8.x-3.x/composer.json

Should be updated to 1.12

e0ipso commented 3 years ago

Thanks for the heads up! Fixing compose.json in the distribution.