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.
this is actually for Drupal 8.0.0 not dev version
As soon as I initialized composer manager I lost the ability to reach the report status page in drupal 8. I get this error:
- The website encountered an unexpected error. Please try again later.
When I check the composer manager report i get this:
- Could not decode JSON: Syntax error
After uninstalling Composer Manager I am able to get my status report page. I apologize if I posted in the wrong section!
Chris
Comments
Comment #2
platinum1 CreditAttribution: platinum1 commentedSame problem here.
Comment #3
sushichris CreditAttribution: sushichris commentedI had problems upgrading drupal release candidates with the drupal commerce module installed, I was getting unrecoverable errors and completely
reinstalleddrupal (installed the next release candidate) instead of upgrading. Now I am wondering if it was composer manager. I wish I kept the logs and errors but I assumed it was my error and was upgrading a test / dummy site anyway.Comment #4
sushichris CreditAttribution: sushichris commentedFatal error: Interface 'CommerceGuys\Zone\Model\ZoneInterface' not found in /home/XXXXXXX/public_html/drupal/modules/address/src/Entity/ZoneInterface.php on line 23
Comment #5
bojanz CreditAttribution: bojanz at Centarro commentedI can't reproduce this on a fresh install with Commerce, Address.
In general it looks like one of the modules you downloaded has a malformed composer.json. You'll need to find out which one
(and we should figure out how to make that more obvious in the future).
You can try enabling errors at admin/config/development/logging and then reloading to see if any extra info is provided.
The ZoneInterface error is unrelated to this module, and points to the Address module being installed without its dependencies (composer drupal install never ran).
Comment #6
platinum1 CreditAttribution: platinum1 commentedThe problem occurred when updating an existing RC3 site to D 8.0.0. A new init.php was required. The script "composer Drupal-update" terminates with an exception
[UnexpectedValueException]
Could not decode JSON: Syntax error
Logging provides the following message:
UnexpectedValueException: Could not decode JSON: Syntax error in Drupal\composer_manager\JsonFile::read() (line 36 of modules/contrib/composer_manager/src/JsonFile.php).
Comment #7
platinum1 CreditAttribution: platinum1 commentedAdditional log info:
Drupal\composer_manager\PackageManager->getExtensionPackages()
Drupal\composer_manager\PackageManager->buildMergedExtensionPackage()
Drupal\composer_manager\PackageManager->getRequiredPackages()
Drupal\composer_manager\PackageManager->needsComposerUpdate()
composer_manager_requirements('runtime')
call_user_func_array('composer_manager_requirements', Array)
Drupal\Core\Extension\ModuleHandler->invokeAll('requirements', Array)
Drupal\system\SystemManager->listRequirements()
Drupal\system\Controller\SystemInfoController->status()
call_user_func_array(Array, Array)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
call_user_func_array(Object, Array)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1)
Stack\StackedHttpKernel->handle(Object, 1, 1)
Drupal\Core\DrupalKernel->handle(Object)
Comment #8
bojanz CreditAttribution: bojanz at Centarro commentedA new init was required because you accidentally replaced vendor/ and composer.json when you upgraded core.
You're not supposed to do that, only the core folder is supposed to be replaced.
The error is still caused by a module's broken composer.json.
Go through your modules, find out which one it is.
I'll commit a fix so that the error actually shows where it came from.
Comment #9
sushichris CreditAttribution: sushichris commentedAh the drupal install text says to delete the core and vendor files, thank you for clarifying this I will try this again.
Comment #10
bojanz CreditAttribution: bojanz at Centarro commentedDone in #2735973: Increase error details on invalid JSON.