rest-api icon indicating copy to clipboard operation
rest-api copied to clipboard

API errors after upgrade to 3.6.3 - why is it looking for composer.json

Open littlepackage opened this issue 4 years ago • 0 comments

Short problem description

I almost had API working with 3.6.2, but was having trouble authenticating (getting credentials) with an error similar to this one: https://github.com/phpList/rest-api/issues/57 so I tried upgrading. Admin site works fine and doesn't throw errors; however, trying to access the API is causing errors, see below:

Steps to reproduce

  1. Upgrade to 3.6.3 from 3.6.2
  2. Attempt to use phplist API

Expected behaviour

I'd love to be able to use the API. Authentication is another thing I guess I'll tackle later. It was giving me a really hard time before the upgrade to 3.6.3 from 3.6.2

Actual behaviour

Stack trace:
#0 /home/sierdcqi/public_html/lists/base/vendor/phplist/core/src/Core/ApplicationKernel.php(70): PhpList\Core\Core\ApplicationStructure->getApplicationRoot()
#1 /home/sierdcqi/public_html/lists/base/vendor/phplist/core/src/Core/ApplicationKernel.php(169): PhpList\Core\Core\ApplicationKernel->getApplicationDir()
#2 /home/sierdcqi/public_html/lists/base/vendor/phplist/core/src/Core/ApplicationKernel.php(147): PhpList\Core\Core\ApplicationKernel->readBundleConfiguration()
#3 /home/sierdcqi/public_html/lists/base/vendor/phplist/core/src/Core/ApplicationKernel.php(31): PhpList\Core\Core\ApplicationKernel->bundlesFromConfiguration()
#4 /home/sierdcqi/public_html/lists/base/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php(493): Ph in /home/sierdcqi/public_html/lists/base/vendor/phplist/core/src/Core/ApplicationStructure.php on line 56

$corePackageIsRootPackage is returned false. Exception thrown because "there is no composer.json in the application root." This package is installed on my server per the installation instructions and as mentioned above, is otherwise working fine except the API.

System configuration

Package version

Phplist version 3.6.3

PHP and Composer version

LiteSpeed Server PHP version: 7.3.27 PHP post max size: 1 GB PHP time limit: 1500 PHP max input vars: 2000 cURL version: 7.71.0, OpenSSL/1.1.1d

littlepackage avatar Jun 01 '21 15:06 littlepackage