Agile UI working only on local

Hi everyone,

I’m trying to deploy my project on a server, but I keep getting this error:

Fatal error: Uncaught TypeError: Argument 1 passed to atk4\ui\View::addTo() must be an instance of atk4\core\object, instance of atk4\ui\Layout\Centered given, called in /usr/home/wavesfactory.com/web/wavesfactory_db/vendor/atk4/ui/src/App.php on line 270 and defined in /usr/home/wavesfactory.com/web/wavesfactory_db/vendor/atk4/core/src/StaticAddToTrait.php:30 Stack trace: #0 /usr/home/wavesfactory.com/web/wavesfactory_db/vendor/atk4/ui/src/App.php(270): atk4\ui\View::addTo(Object(atk4\ui\Layout\Centered), Array) #1 [internal function]: atk4\ui\App->caughtException(Object(TypeError)) #2 {main} thrown in /usr/home/wavesfactory.com/web/wavesfactory_db/vendor/atk4/core/src/StaticAddToTrait.php on line 30

The only code I have is:
require_once $_SERVER[‘DOCUMENT_ROOT’] . ‘/wavesfactory_db/vendor/autoload.php’;
require_once $_SERVER[‘DOCUMENT_ROOT’] . ‘/wavesfactory_db/www/public/menu/models.php’;
$app = new \atk4\ui\App(‘Wavesfactory DB’);
$app->initLayout(‘Admin’);

It only happens on the server, the project works properly on a localhost. What could the problem be?

Thanks!

only suggest: php version and enabled php modules are the same?

1 Like