Page 1 of 3

SYMFONY_ENV=prod composer update --no-dev

Posted: 05 Jul 2018, 16:42
by Seds
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 me@example.com :

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

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

Posted: 06 Jul 2018, 13:54
by aimeos
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.

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

Posted: 07 Jul 2018, 09:04
by Seds
I'm not sure to understand what to do
i tried to move but there are still errors
please be more explicit

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

Posted: 07 Jul 2018, 13:43
by Seds
- 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

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

Posted: 11 Jul 2018, 16:53
by Seds
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', xxx@xxx.com', 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

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

Posted: 12 Jul 2018, 12:10
by aimeos
Please update to the new 2018.07 version which should fix the problem. 2018.04 isn't supported any more

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

Posted: 12 Jul 2018, 17:10
by Seds
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?

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

Posted: 14 Jul 2018, 08:13
by aimeos
Do you use the internal PHP web server and your address is 127.0.0.1:8000 instead?

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

Posted: 14 Jul 2018, 11:54
by Seds
yes i use wamp and prod i wil install in a sub domain..

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

Posted: 14 Jul 2018, 12:35
by aimeos
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