SYMFONY_ENV=prod composer update --no-dev

Questions around the Aimeos bundle for the Symfony framework
Forum rules
Always add your Symfony, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Seds
Posts: 34
Joined: 26 Jun 2018, 17:42

SYMFONY_ENV=prod composer update --no-dev

Post by Seds » 05 Jul 2018, 16:42

hi,
when I update on no-dev I've got this error after:
Updating the "app/config/parameters.yml" file
> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap
> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache

Fatal error: Uncaught Symfony\Component\Debug\Exception\ClassNotFoundException: Attempted to load class "SensioGeneratorBundle" from namespace "Sensio\Bundle\GeneratorBundle".
Did you forget a "use" statement for another namespace? in C:\wamp64\www\shop\app\AppKernel.php:30
Stack trace:
#0 C:\wamp64\www\shop\vendor\symfony\symfony\src\Symfony\Component\HttpKernel\Kernel.php(492): AppKernel->registerBundles()
#1 C:\wamp64\www\shop\vendor\symfony\symfony\src\Symfony\Component\HttpKernel\Kernel.php(132): Symfony\Component\HttpKernel\Kernel->initializeBundles()
#2 C:\wamp64\www\shop\vendor\symfony\symfony\src\Symfony\Bundle\FrameworkBundle\Console\Application.php(64): Symfony\Component\HttpKernel\Kernel->boot()
#3 C:\wamp64\www\shop\vendor\symfony\symfony\src\Symfony\Component\Console\Application.php(148): Symfony\Bundle\FrameworkBundle\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 C:\wamp64\www\shop\bin\console(27): Symfony\Component\C in C:\wamp64\www\shop\app\AppKernel.php on line 30
Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the symfony-scripts event terminated with an exception


[RuntimeException]
An error occurred when executing the ""cache:clear --no-warmup"" command:


Fatal error: Uncaught Symfony\Component\Debug\Exception\ClassNotFoundException: Attempted to load class "SensioGene
ratorBundle" from namespace "Sensio\Bundle\GeneratorBundle".
Did you forget a "use" statement for another namespace? in C:\wamp64\www\shop\app\AppKernel.php:30
Stack trace:
#0 C:\wamp64\www\shop\vendor\symfony\symfony\src\Symfony\Component\HttpKernel\Kernel.php(492): AppKernel->registerB
undles()
#1 C:\wamp64\www\shop\vendor\symfony\symfony\src\Symfony\Component\HttpKernel\Kernel.php(132): Symfony\Component\Ht
tpKernel\Kernel->initializeBundles()
#2 C:\wamp64\www\shop\vendor\symfony\symfony\src\Symfony\Bundle\FrameworkBundle\Console\Application.php(64): Symfon
y\Component\HttpKernel\Kernel->boot()
#3 C:\wamp64\www\shop\vendor\symfony\symfony\src\Symfony\Component\Console\Application.php(148): Symfony\Bundle\Fra
meworkBundle\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component
\Console\Output\ConsoleOutput))
#4 C:\wamp64\www\shop\bin\console(27): Symfony\Component\C in C:\wamp64\www\shop\app\AppKernel.php on line 30


maybe it's because this error that I have an other one when I do php bin/console aimeos:account [email protected] :

Fatal error: Uncaught Symfony\Component\Debug\Exception\ClassNotFoundException: Attempted to load class "SensioGeneratorBundle" from namespace "Sensio\Bundle\GeneratorBundle".
Did you forget a "use" statement for another namespace? in C:\wamp64\www\shop\app\AppKernel.php:30
Stack trace:
#0 C:\wamp64\www\shop\vendor\symfony\symfony\src\Symfony\Component\HttpKernel\Kernel.php(492): AppKernel->registerBundles()
#1 C:\wamp64\www\shop\vendor\symfony\symfony\src\Symfony\Component\HttpKernel\Kernel.php(132): Symfony\Component\HttpKernel\Kernel->initializeBundles()
#2 C:\wamp64\www\shop\vendor\symfony\symfony\src\Symfony\Bundle\FrameworkBundle\Console\Application.php(64): Symfony\Component\HttpKernel\Kernel->boot()
#3 C:\wamp64\www\shop\vendor\symfony\symfony\src\Symfony\Component\Console\Application.php(148): Symfony\Bundle\FrameworkBundle\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 C:\wamp64\www\shop\bin\console(27): Symfony\Component\C in C:\wamp64\www\shop\app\AppKernel.php on line 30

please tell me
**

User avatar
aimeos
Administrator
Posts: 5088
Joined: 01 Jan 1970, 00:00

Re: SYMFONY_ENV=prod composer update --no-dev

Post by aimeos » 06 Jul 2018, 13:54

I think the problem is that the SensioGeneratorBundle is only included for "dev" environment in ./app/AppKernel.php:

Code: Select all

            if ('dev' === $this->getEnvironment()) {
                $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
                $bundles[] = new Symfony\Bundle\WebServerBundle\WebServerBundle();
            }
If you move the line adding SensioGeneratorBundle to the $bundles array unconditionally, it shall work as expected.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Seds
Posts: 34
Joined: 26 Jun 2018, 17:42

Re: SYMFONY_ENV=prod composer update --no-dev

Post by Seds » 07 Jul 2018, 09:04

I'm not sure to understand what to do
i tried to move but there are still errors
please be more explicit
**

Seds
Posts: 34
Joined: 26 Jun 2018, 17:42

Re: SYMFONY_ENV=prod composer update --no-dev

Post by Seds » 07 Jul 2018, 13:43

- on composer.json, I moved "sensio/generator-bundle": "^3.0" from require-dev to require
- I commented $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle(); in if lines
- and I pasted new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle(), into bundles array

now every little things seems to be allright..

I could add an user admin
Last edited by Seds on 25 Aug 2018, 10:30, edited 1 time in total.
**

Seds
Posts: 34
Joined: 26 Jun 2018, 17:42

Re: SYMFONY_ENV=prod composer update --no-dev

Post by Seds » 11 Jul 2018, 16:53

Hhh well:

Error An exception occurred while executing ' INSERT INTO "mshop_media" ( "langid", "typeid", "label", "mimetype", "link", "status", "domain", "preview", "mtime", "editor", "siteid", "ctime" ) VALUES ( 'fr', NULL, '501_h.jpg', 'image/jpeg', 'files/6/4/644325a877194c9a15a8c18a7a218546.jpg', 1, 'product', 'preview/9/3/936f6f417c4d80bc92596d9bd0a8d15f.jpg', '2018-07-11 16:50:09', [email protected]', 1, '2018-07-11 16:50:09' ) ': SQLSTATE[23000]: Integrity constraint violation: 1048 Le champ 'typeid' ne peut être vide (null), C:\wamp64\www\shop\vendor\aimeos\aimeos-core\lib\mwlib\src\MW\DB\Statement\DBAL\Simple.php:97

on 2018.04 no dev version
/web/admin/default/jqadm/save/product?id=1#image

and in /web/admin/default/jqadm/get/catalog/1?act=save#image
image is into data base but doesn't appear
neither on /web/list/1/XXX, no image in view-source
**

User avatar
aimeos
Administrator
Posts: 5088
Joined: 01 Jan 1970, 00:00

Re: SYMFONY_ENV=prod composer update --no-dev

Post by aimeos » 12 Jul 2018, 12:10

Please update to the new 2018.07 version which should fix the problem. 2018.04 isn't supported any more
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Seds
Posts: 34
Joined: 26 Jun 2018, 17:42

Re: SYMFONY_ENV=prod composer update --no-dev

Post by Seds » 12 Jul 2018, 17:10

ok, done
now there's still something strange:
urls image in product view source are wrong, domain left:
>> http://localhost/files/0/5/0513cfa3dc15 ... beddf0.jpg
Not Found
The requested URL /files/0/5/0513cfa3dc157a8889266c47d0beddf0.jpg was not found on this server.

and catalog view source, div class="media-list" is empty

did I miss something?
**

User avatar
aimeos
Administrator
Posts: 5088
Joined: 01 Jan 1970, 00:00

Re: SYMFONY_ENV=prod composer update --no-dev

Post by aimeos » 14 Jul 2018, 08:13

Do you use the internal PHP web server and your address is 127.0.0.1:8000 instead?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Seds
Posts: 34
Joined: 26 Jun 2018, 17:42

Re: SYMFONY_ENV=prod composer update --no-dev

Post by Seds » 14 Jul 2018, 11:54

yes i use wamp and prod i wil install in a sub domain..
**

User avatar
aimeos
Administrator
Posts: 5088
Joined: 01 Jan 1970, 00:00

Re: SYMFONY_ENV=prod composer update --no-dev

Post by aimeos » 14 Jul 2018, 12:35

If your URL for the images in the admin interface is "/files/0/5/0513cfa3dc15 ... beddf0.jpg", then it should work because the files are in ./web/files/... of your installation. You can change the base URL for images with

Code: Select all

aimeos_shop:
    client:
        html:
            common:
                content:
                    baseurl: /
to e.g.

Code: Select all

baseurl: 127.0.0.1:8000
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply