Installing Aimeos into Neos CMS
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Installing Aimeos into Neos CMS
Hi,
i try to install Aimeos with the latest Neos Version (~2.3):
composer create-project neos/neos-base-distribution Neos
then following these steps:
https://github.com/aimeos/aimeos-flow#installation
after composer update i want to install aimeos database and get this error instead of installing database tables:
Fatal error: Class 'TYPO3\Flow\Core\ApplicationContext' not found in /var/www/sites/Neos/Aimeos/Packages/Framework/TYPO3.Flow/Classes/TYPO3/Flow/Core/Bootstrap.php on line 88
Code in Line 88: $this->context = new ApplicationContext($context);
I tried to add at top:
use TYPO3\Flow\Core\ApplicationContext;
but it did not help ...
Did i do something wrong?
__________________________________
If i install Aimeos with Flow:
composer create-project typo3/flow-base-distribution Aimeos
following these steps: https://github.com/aimeos/aimeos-flow#installation
composer require aimeos/aimeos-flow
... i got the this problem:
PHP Fatal error: Uncaught TYPO3\Flow\Exception: No suitable request handler could be found for the current request. This is most likely a setup-problem, so please check your package.json and/or try removing Configuration/PackageStates.php in /var/www/html/Neos/Aimeos/Packages/Framework/TYPO3.Flow/Classes/TYPO3/Flow/Core/Bootstrap.php:445
Stack trace:
#0 /var/www/html/Neos/Aimeos/Packages/Framework/TYPO3.Flow/Classes/TYPO3/Flow/Core/Bootstrap.php(108): TYPO3\Flow\Core\Bootstrap->resolveRequestHandler()
#1 /var/www/html/Neos/Aimeos/Packages/Framework/TYPO3.Flow/Scripts/flow.php(61): TYPO3\Flow\Core\Bootstrap->run()
#2 /var/www/html/Neos/Aimeos/flow(18): require('/var/www/html/N...')
#3 {main}
thrown in /var/www/html/Neos/Aimeos/Packages/Framework/TYPO3.Flow/Classes/TYPO3/Flow/Core/Bootstrap.php on line 445
Regards.
i try to install Aimeos with the latest Neos Version (~2.3):
composer create-project neos/neos-base-distribution Neos
then following these steps:
https://github.com/aimeos/aimeos-flow#installation
after composer update i want to install aimeos database and get this error instead of installing database tables:
Fatal error: Class 'TYPO3\Flow\Core\ApplicationContext' not found in /var/www/sites/Neos/Aimeos/Packages/Framework/TYPO3.Flow/Classes/TYPO3/Flow/Core/Bootstrap.php on line 88
Code in Line 88: $this->context = new ApplicationContext($context);
I tried to add at top:
use TYPO3\Flow\Core\ApplicationContext;
but it did not help ...
Did i do something wrong?
__________________________________
If i install Aimeos with Flow:
composer create-project typo3/flow-base-distribution Aimeos
following these steps: https://github.com/aimeos/aimeos-flow#installation
composer require aimeos/aimeos-flow
... i got the this problem:
PHP Fatal error: Uncaught TYPO3\Flow\Exception: No suitable request handler could be found for the current request. This is most likely a setup-problem, so please check your package.json and/or try removing Configuration/PackageStates.php in /var/www/html/Neos/Aimeos/Packages/Framework/TYPO3.Flow/Classes/TYPO3/Flow/Core/Bootstrap.php:445
Stack trace:
#0 /var/www/html/Neos/Aimeos/Packages/Framework/TYPO3.Flow/Classes/TYPO3/Flow/Core/Bootstrap.php(108): TYPO3\Flow\Core\Bootstrap->resolveRequestHandler()
#1 /var/www/html/Neos/Aimeos/Packages/Framework/TYPO3.Flow/Scripts/flow.php(61): TYPO3\Flow\Core\Bootstrap->run()
#2 /var/www/html/Neos/Aimeos/flow(18): require('/var/www/html/N...')
#3 {main}
thrown in /var/www/html/Neos/Aimeos/Packages/Framework/TYPO3.Flow/Classes/TYPO3/Flow/Core/Bootstrap.php on line 445
Regards.
Re: Installing Aimeos into Neos CMS
The NeosCMS integration is still unfinished and we are looking for a Neos expert who is able to help us to complete the integration.
For the Flow installation: Can you use the version 2016.10?
For the Flow installation: Can you use the version 2016.10?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Installing Aimeos into Neos CMS
I am using 2016.10.
{
"name": "neos/flow-base-distribution",
"description": "Flow Base Distribution",
"license": "MIT",
"support": {
"email": "hello@neos.io",
"slack": "http://slack.neos.io/",
"forum": "https://discuss.neos.io/",
"wiki": "https://discuss.neos.io/c/the-neos-proj ... umentation",
"issues": "https://jira.neos.io/browse/FLOW",
"docs": "http://flowframework.readthedocs.org/",
"source": "https://github.com/neos/flow-base-distribution"
},
"config": {
"vendor-dir": "Packages/Libraries",
"bin-dir": "bin"
},
"extra": {
"installer-paths": {
"Packages/Extensions/{$name}/": ["type:aimeos-extension"]
}
},
"prefer-stable": true,
"minimum-stability": "dev",
"require": {
"aimeos/aimeos-flow": "~2016.10",
"typo3/flow": "~3.3.0",
"typo3/welcome": "~3.3.0"
},
"require-dev": {
"typo3/kickstart": "~3.3.0",
"typo3/buildessentials": "3.3.x-dev",
"flowpack/behat": "dev-master",
"phpunit/phpunit": "~4.8 || ~5.4.0",
"mikey179/vfsstream": "~1.6"
},
"replace": {
"typo3/flow-base-distribution": "self.version"
},
"suggest": {
"ext-pdo_sqlite": "For running functional tests out-of-the-box this is required"
},
"scripts": {
"post-update-cmd": "TYPO3\\Flow\\Composer\\InstallerScripts::postUpdateAndInstall",
"post-install-cmd": "TYPO3\\Flow\\Composer\\InstallerScripts::postUpdateAndInstall",
"post-package-update": "TYPO3\\Flow\\Composer\\InstallerScripts::postPackageUpdateAndInstall",
"post-package-install": "TYPO3\\Flow\\Composer\\InstallerScripts::postPackageUpdateAndInstall"
}
}
{
"name": "neos/flow-base-distribution",
"description": "Flow Base Distribution",
"license": "MIT",
"support": {
"email": "hello@neos.io",
"slack": "http://slack.neos.io/",
"forum": "https://discuss.neos.io/",
"wiki": "https://discuss.neos.io/c/the-neos-proj ... umentation",
"issues": "https://jira.neos.io/browse/FLOW",
"docs": "http://flowframework.readthedocs.org/",
"source": "https://github.com/neos/flow-base-distribution"
},
"config": {
"vendor-dir": "Packages/Libraries",
"bin-dir": "bin"
},
"extra": {
"installer-paths": {
"Packages/Extensions/{$name}/": ["type:aimeos-extension"]
}
},
"prefer-stable": true,
"minimum-stability": "dev",
"require": {
"aimeos/aimeos-flow": "~2016.10",
"typo3/flow": "~3.3.0",
"typo3/welcome": "~3.3.0"
},
"require-dev": {
"typo3/kickstart": "~3.3.0",
"typo3/buildessentials": "3.3.x-dev",
"flowpack/behat": "dev-master",
"phpunit/phpunit": "~4.8 || ~5.4.0",
"mikey179/vfsstream": "~1.6"
},
"replace": {
"typo3/flow-base-distribution": "self.version"
},
"suggest": {
"ext-pdo_sqlite": "For running functional tests out-of-the-box this is required"
},
"scripts": {
"post-update-cmd": "TYPO3\\Flow\\Composer\\InstallerScripts::postUpdateAndInstall",
"post-install-cmd": "TYPO3\\Flow\\Composer\\InstallerScripts::postUpdateAndInstall",
"post-package-update": "TYPO3\\Flow\\Composer\\InstallerScripts::postPackageUpdateAndInstall",
"post-package-install": "TYPO3\\Flow\\Composer\\InstallerScripts::postPackageUpdateAndInstall"
}
}
Re: Installing Aimeos into Neos CMS
We always get this error, no matter how we install the flow-base-distribution:
There must be a problem in one of the Flow packages as this happens in the code of the ./flow command before any Aimeos code is executed.
Code: Select all
PHP Fatal error: Uncaught Error: Class 'TYPO3\Flow\Core\ApplicationContext' not found in .../flowtest/Packages/Framework/TYPO3.Flow/Classes/TYPO3/Flow/Core/Bootstrap.php:88
Stack trace:
#0 .../flowtest/Packages/Framework/TYPO3.Flow/Scripts/flow.php(60): TYPO3\Flow\Core\Bootstrap->__construct('Development')
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Installing Aimeos into Neos CMS
Yes, this is the same error i get. If i just dont require aimeos package everything works fine. The autoloader does not get the namespace from TYPO3\Flow\Core\ApplicationContext so it cant load the class.
this composer.json is working fine:
{
"name": "neos/flow-base-distribution",
"description": "Flow Base Distribution",
"license": "MIT",
"support": {
"email": "hello@neos.io",
"slack": "http://slack.neos.io/",
"forum": "https://discuss.neos.io/",
"wiki": "https://discuss.neos.io/c/the-neos-proj ... umentation",
"issues": "https://jira.neos.io/browse/FLOW",
"docs": "http://flowframework.readthedocs.org/",
"source": "https://github.com/neos/flow-base-distribution"
},
"config": {
"vendor-dir": "Packages/Libraries",
"bin-dir": "bin"
},
"require": {
"typo3/flow": "~3.3.0",
"typo3/welcome": "~3.3.0"
},
"require-dev": {
"typo3/kickstart": "~3.3.0",
"typo3/buildessentials": "3.3.x-dev",
"flowpack/behat": "dev-master",
"phpunit/phpunit": "~4.8 || ~5.4.0",
"mikey179/vfsstream": "~1.6"
},
"replace": {
"typo3/flow-base-distribution": "self.version"
},
"suggest": {
"ext-pdo_sqlite": "For running functional tests out-of-the-box this is required"
},
"scripts": {
"post-update-cmd": "TYPO3\\Flow\\Composer\\InstallerScripts::postUpdateAndInstall",
"post-install-cmd": "TYPO3\\Flow\\Composer\\InstallerScripts::postUpdateAndInstall",
"post-package-update": "TYPO3\\Flow\\Composer\\InstallerScripts::postPackageUpdateAndInstall",
"post-package-install": "TYPO3\\Flow\\Composer\\InstallerScripts::postPackageUpdateAndInstall"
}
}
this composer.json is working fine:
{
"name": "neos/flow-base-distribution",
"description": "Flow Base Distribution",
"license": "MIT",
"support": {
"email": "hello@neos.io",
"slack": "http://slack.neos.io/",
"forum": "https://discuss.neos.io/",
"wiki": "https://discuss.neos.io/c/the-neos-proj ... umentation",
"issues": "https://jira.neos.io/browse/FLOW",
"docs": "http://flowframework.readthedocs.org/",
"source": "https://github.com/neos/flow-base-distribution"
},
"config": {
"vendor-dir": "Packages/Libraries",
"bin-dir": "bin"
},
"require": {
"typo3/flow": "~3.3.0",
"typo3/welcome": "~3.3.0"
},
"require-dev": {
"typo3/kickstart": "~3.3.0",
"typo3/buildessentials": "3.3.x-dev",
"flowpack/behat": "dev-master",
"phpunit/phpunit": "~4.8 || ~5.4.0",
"mikey179/vfsstream": "~1.6"
},
"replace": {
"typo3/flow-base-distribution": "self.version"
},
"suggest": {
"ext-pdo_sqlite": "For running functional tests out-of-the-box this is required"
},
"scripts": {
"post-update-cmd": "TYPO3\\Flow\\Composer\\InstallerScripts::postUpdateAndInstall",
"post-install-cmd": "TYPO3\\Flow\\Composer\\InstallerScripts::postUpdateAndInstall",
"post-package-update": "TYPO3\\Flow\\Composer\\InstallerScripts::postPackageUpdateAndInstall",
"post-package-install": "TYPO3\\Flow\\Composer\\InstallerScripts::postPackageUpdateAndInstall"
}
}
Re: Installing Aimeos into Neos CMS
This composer.json is working fine with aimeos:
{
"name": "typo3/flow-base-distribution",
"description": "TYPO3 Flow Base Distribution",
"license": "LGPL-3.0+",
"config": {
"vendor-dir": "Packages/Libraries",
"bin-dir": "bin"
},
"extra": {
"installer-paths": {
"Packages/Extensions/{$name}/": ["type:aimeos-extension"]
}
},
"prefer-stable": true,
"minimum-stability": "dev",
"require": {
"aimeos/aimeos-flow": "~2016.10",
"typo3/flow": "3.0.*",
"typo3/welcome": "3.0.*",
"doctrine/migrations": "@rc"
},
"require-dev": {
"typo3/kickstart": "3.0.*",
"typo3/buildessentials": "3.0.*",
"phpunit/phpunit": "4.6.*",
"mikey179/vfsstream": "1.5.*",
"flowpack/behat": "dev-master"
},
"suggest": {
"ext-pdo_sqlite": "For running functional tests out-of-the-box this is required"
},
"scripts": {
"post-update-cmd": "TYPO3\\Flow\\Composer\\InstallerScripts::postUpdateAndInstall",
"post-install-cmd": "TYPO3\\Flow\\Composer\\InstallerScripts::postUpdateAndInstall",
"post-package-update": "TYPO3\\Flow\\Composer\\InstallerScripts::postPackageUpdateAndInstall",
"post-package-install": "TYPO3\\Flow\\Composer\\InstallerScripts::postPackageUpdateAndInstall"
}
}
{
"name": "typo3/flow-base-distribution",
"description": "TYPO3 Flow Base Distribution",
"license": "LGPL-3.0+",
"config": {
"vendor-dir": "Packages/Libraries",
"bin-dir": "bin"
},
"extra": {
"installer-paths": {
"Packages/Extensions/{$name}/": ["type:aimeos-extension"]
}
},
"prefer-stable": true,
"minimum-stability": "dev",
"require": {
"aimeos/aimeos-flow": "~2016.10",
"typo3/flow": "3.0.*",
"typo3/welcome": "3.0.*",
"doctrine/migrations": "@rc"
},
"require-dev": {
"typo3/kickstart": "3.0.*",
"typo3/buildessentials": "3.0.*",
"phpunit/phpunit": "4.6.*",
"mikey179/vfsstream": "1.5.*",
"flowpack/behat": "dev-master"
},
"suggest": {
"ext-pdo_sqlite": "For running functional tests out-of-the-box this is required"
},
"scripts": {
"post-update-cmd": "TYPO3\\Flow\\Composer\\InstallerScripts::postUpdateAndInstall",
"post-install-cmd": "TYPO3\\Flow\\Composer\\InstallerScripts::postUpdateAndInstall",
"post-package-update": "TYPO3\\Flow\\Composer\\InstallerScripts::postPackageUpdateAndInstall",
"post-package-install": "TYPO3\\Flow\\Composer\\InstallerScripts::postPackageUpdateAndInstall"
}
}
Re: Installing Aimeos into Neos CMS
Ok, Neos is also working fine with version 2.0, with this following composer.json. the problem is aimeos is not compatible with flow 3.3, this should be checked.
{
"name": "typo3/neos-base-distribution",
"description" : "Neos Base Distribution",
"license": "GPL-3.0+",
"support": {
"email": "hello@neos.io",
"slack": "http://slack.neos.io/",
"irc": "irc://irc.freenode.org/typo3-neos",
"forum": "https://discuss.neos.io/",
"issues": "https://jira.neos.io/",
"source": "https://git.typo3.org/"
},
"config": {
"vendor-dir": "Packages/Libraries",
"bin-dir": "bin"
},
"extra": {
"installer-paths": {
"Packages/Extensions/{$name}/": ["type:aimeos-extension"]
}
},
"prefer-stable": true,
"minimum-stability": "dev",
"require": {
"aimeos/aimeos-flow": "~2016.10",
"typo3/neos": "2.0.*",
"typo3/neos-nodetypes": "2.0.*",
"typo3/neosdemotypo3org": "2.0.*",
"typo3/neos-kickstarter": "2.0.*",
"typo3/neos-seo": "~1.0",
"typo3/imagine": "~2.0",
"typo3/twitter-bootstrap": "~2.0",
"typo3/form": "~2.0",
"typo3/setup": "~2.0"
},
"require-dev": {
"typo3/buildessentials": "3.0.*@rc",
"mikey179/vfsstream": "1.5.*",
"phpunit/phpunit": "4.6.*",
"flowpack/behat": "dev-master"
},
"suggest": {
"ext-pdo_sqlite": "For running functional tests out-of-the-box this is required"
},
"scripts": {
"post-update-cmd": "TYPO3\\Flow\\Composer\\InstallerScripts::postUpdateAndInstall",
"post-install-cmd": "TYPO3\\Flow\\Composer\\InstallerScripts::postUpdateAndInstall",
"post-package-update":"TYPO3\\Flow\\Composer\\InstallerScripts::postPackageUpdateAndInstall",
"post-package-install":"TYPO3\\Flow\\Composer\\InstallerScripts::postPackageUpdateAndInstall"
}
}
{
"name": "typo3/neos-base-distribution",
"description" : "Neos Base Distribution",
"license": "GPL-3.0+",
"support": {
"email": "hello@neos.io",
"slack": "http://slack.neos.io/",
"irc": "irc://irc.freenode.org/typo3-neos",
"forum": "https://discuss.neos.io/",
"issues": "https://jira.neos.io/",
"source": "https://git.typo3.org/"
},
"config": {
"vendor-dir": "Packages/Libraries",
"bin-dir": "bin"
},
"extra": {
"installer-paths": {
"Packages/Extensions/{$name}/": ["type:aimeos-extension"]
}
},
"prefer-stable": true,
"minimum-stability": "dev",
"require": {
"aimeos/aimeos-flow": "~2016.10",
"typo3/neos": "2.0.*",
"typo3/neos-nodetypes": "2.0.*",
"typo3/neosdemotypo3org": "2.0.*",
"typo3/neos-kickstarter": "2.0.*",
"typo3/neos-seo": "~1.0",
"typo3/imagine": "~2.0",
"typo3/twitter-bootstrap": "~2.0",
"typo3/form": "~2.0",
"typo3/setup": "~2.0"
},
"require-dev": {
"typo3/buildessentials": "3.0.*@rc",
"mikey179/vfsstream": "1.5.*",
"phpunit/phpunit": "4.6.*",
"flowpack/behat": "dev-master"
},
"suggest": {
"ext-pdo_sqlite": "For running functional tests out-of-the-box this is required"
},
"scripts": {
"post-update-cmd": "TYPO3\\Flow\\Composer\\InstallerScripts::postUpdateAndInstall",
"post-install-cmd": "TYPO3\\Flow\\Composer\\InstallerScripts::postUpdateAndInstall",
"post-package-update":"TYPO3\\Flow\\Composer\\InstallerScripts::postPackageUpdateAndInstall",
"post-package-install":"TYPO3\\Flow\\Composer\\InstallerScripts::postPackageUpdateAndInstall"
}
}
Re: Installing Aimeos into Neos CMS
There are two problem remainning if you insert a plugin view:
- Aimeos.Shop/Resources/Templates/NodeTypes/Plugin.html (is missing, so i created one).
- Packages/Libraries/aimeos/aimeos-core/Bootstrap.php:
i don't know why but in the manifest the section has the string $section.'/templates' so nothing was found and an error appears
public function getCustomPaths( $section )
{
$paths = array();
foreach( $this->manifests as $path => $manifest )
{
if( isset( $manifest['custom'][$section] ) ) {
$paths[$path] = $manifest['custom'][$section];
}
//this part was added by me so the error was gone, should be checked
if( isset( $manifest['custom'][$section.'/templates'] ) ) {
$paths[$path] = $manifest['custom'][$section.'/templates'];
}
}
return $paths;
}
- Aimeos.Shop/Resources/Templates/NodeTypes/Plugin.html (is missing, so i created one).
- Packages/Libraries/aimeos/aimeos-core/Bootstrap.php:
i don't know why but in the manifest the section has the string $section.'/templates' so nothing was found and an error appears
public function getCustomPaths( $section )
{
$paths = array();
foreach( $this->manifests as $path => $manifest )
{
if( isset( $manifest['custom'][$section] ) ) {
$paths[$path] = $manifest['custom'][$section];
}
//this part was added by me so the error was gone, should be checked
if( isset( $manifest['custom'][$section.'/templates'] ) ) {
$paths[$path] = $manifest['custom'][$section.'/templates'];
}
}
return $paths;
}
Re: Installing Aimeos into Neos CMS
I think the main problem is that you generate links by your own framework and not by flow. you also do not use domain, models and repositories so i can not extend you shop package. this is the basic part of Extbase or Flow. so it seems to be hard to let you shop package know what link should be generated. i thought i could extend you package easily but your database structure does not allow it to integrate it by my own flow extbase or neos package.
Re: Installing Aimeos into Neos CMS
First of all, thank you very much for your analysis!
Aimeos use the router of the host application and in the Flow context it's the Flow UriBuilder:
https://github.com/aimeos/ai-flow/blob/ ... l/Flow.php
Think of Aimeos as a PHP component library that encapsulates the whole shop part and use the infrastructure of the host system where possible (URL generation for example). It has it's own database structure and manages its data itself. If you want to extend Aimeos, you need to extend the component library which is different from the host framework. Otherwise it wouldn't be possible to integrate the components into different frameworks (Symfony, Laravel, Flow, etc.) that all have their own way of doing things.
Regarding the manifest file / Bootstrap class:
There was a wrong parameter in the Page base class. Don't know why it worked in our tests but it's fixed now and a minor version update will be released as soon as the tests are OK. Thanks for spotting this!
Aimeos use the router of the host application and in the Flow context it's the Flow UriBuilder:
https://github.com/aimeos/ai-flow/blob/ ... l/Flow.php
Think of Aimeos as a PHP component library that encapsulates the whole shop part and use the infrastructure of the host system where possible (URL generation for example). It has it's own database structure and manages its data itself. If you want to extend Aimeos, you need to extend the component library which is different from the host framework. Otherwise it wouldn't be possible to integrate the components into different frameworks (Symfony, Laravel, Flow, etc.) that all have their own way of doing things.
Regarding the manifest file / Bootstrap class:
There was a wrong parameter in the Page base class. Don't know why it worked in our tests but it's fixed now and a minor version update will be released as soon as the tests are OK. Thanks for spotting this!
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star