Open Bugfunder opened 3 years ago
Hello!
If you cloned the project, instead of using the release, Did you run composer install
first? It's required so the autoloader is generated (there needs to be a vendor folder on the project).
No, did not run it (was not written in your readme). In which folder should I run it?
вт, 29 черв. 2021 о 14:40 skaparate @.***> пише:
Hello!
Did you run composer install first? It's required so the autoloader is generated (there needs to be a vendor folder on the project).
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/skaparate/prestashop-sample-module/issues/1#issuecomment-870564372, or unsubscribe https://github.com/notifications/unsubscribe-auth/AM2RNELIIJZZFCMA2JCRXPDTVG5KLANCNFSM47P4JTGA .
If you cloned the repository, then in the root of the module, under PrestaShop/modules/sk_test
:
cd path_to_prestashop/modules/sk_test
composer install
If you used the release zip, then it should work out of the box.
Yes, I installed it and got it writing Hello World.
Can you point out where your release zip is?
Because in my case
composer install
generated lots of files in vendor folder, and I wonder if they are all needed.
вт, 29 черв. 2021 о 14:48 skaparate @.***> пише:
If you cloned the repository, then in the root of the module, under PrestaShop/modules/sk_test:
cd path_to_prestashop/modules/sk_test composer install
If you used the release zip, then it should work out of the box.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/skaparate/prestashop-sample-module/issues/1#issuecomment-870569977, or unsubscribe https://github.com/notifications/unsubscribe-auth/AM2RNELLEOYZUDIDJDOQZDTTVG6KZANCNFSM47P4JTGA .
It's under the releases of the repository.
To understand what composer does, please refer to the documentation.
By the way, the "require-dev"
of the composer file are just utilities to help you develop the module and are not really required (you may replace or remove them)
Thanks, in my case composer install generates lots of folders in vendor:
autoload.php bin composer doctrine friendsofphp myclabs nikic phar-io php-cs-fixer phpdocumentor phpspec phpunit prestashop psr sebastian squizlabs symfony theseer webmozart
Perhaps it has to do with my installation of composer. Will give a try to your release zip instead.
вт, 29 черв. 2021 о 21:45 skaparate @.***> пише:
By the way, the "require-dev" of the composer file are just utilities to help you develop the module and are not really required (you may replace or remove them)
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/skaparate/prestashop-sample-module/issues/1#issuecomment-870866812, or unsubscribe https://github.com/notifications/unsubscribe-auth/AM2RNEO3G7MY2S6NSAKCNRLTVIPFRANCNFSM47P4JTGA .
Now I get a different problem. When I go to Orders/Orders for the first time, I get " Hello world! ", as intended.
When I do it for the next time, I get Page not found The controller AdminOrders is missing or invalid. So apparently it tries to load the old (legacy) controller.
ср, 30 черв. 2021 о 09:31 Yarick @.***> пише:
Thanks, in my case composer install generates lots of folders in vendor:
autoload.php bin composer doctrine friendsofphp myclabs nikic phar-io php-cs-fixer phpdocumentor phpspec phpunit prestashop psr sebastian squizlabs symfony theseer webmozart
Perhaps it has to do with my installation of composer. Will give a try to your release zip instead.
вт, 29 черв. 2021 о 21:45 skaparate @.***> пише:
By the way, the "require-dev" of the composer file are just utilities to help you develop the module and are not really required (you may replace or remove them)
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/skaparate/prestashop-sample-module/issues/1#issuecomment-870866812, or unsubscribe https://github.com/notifications/unsubscribe-auth/AM2RNEO3G7MY2S6NSAKCNRLTVIPFRANCNFSM47P4JTGA .
Thanks, in my case composer install generates lots of folders in vendor: autoload.php bin composer doctrine friendsofphp myclabs nikic phar-io php-cs-fixer phpdocumentor phpspec phpunit prestashop psr sebastian squizlabs symfony theseer webmozart
Don't worry, that's OK. Those are the dependencies (and the dependencies between) used on the "require-dev"
of the composer.json
file. Remove all the "required-dev"
if you like.
When I do it for the next time, I get Page not found The controller AdminOrders is missing or invalid. So apparently it tries to load the old (legacy) controller.
That's something I didn't test for :stuck_out_tongue:. If you can wait, I'll review it in a couple of weeks (I have another job right now), otherwise you will have to try it on your own, sorry :sweat:. Regardless, I thank you for letting me know :smiley:.
Yes, I can wait, no problem. Currently put my controller under PrestashopBundle.
BTW, in the official documentation there is nothing about composer stuff.
ср, 30 черв. 2021 о 18:15 skaparate @.***> пише:
Thanks, in my case composer install generates lots of folders in vendor: autoload.php bin composer doctrine friendsofphp myclabs nikic phar-io php-cs-fixer phpdocumentor phpspec phpunit prestashop psr sebastian squizlabs symfony theseer webmozart
Don't worry, that's OK. Those are the dependencies (and the dependencies between) used on the "require-dev" of the composer.json file. Remove all the "required-dev" if you like.
When I do it for the next time, I get Page not found The controller AdminOrders is missing or invalid. So apparently it tries to load the old (legacy) controller.
That's something I didn't test for 😛. If you can wait, I'll review it in a couple of weeks (I have another job right now), otherwise you will have to try it on your own, sorry 😓. Regardless, I thank you for letting me know 😃.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/skaparate/prestashop-sample-module/issues/1#issuecomment-871540396, or unsubscribe https://github.com/notifications/unsubscribe-auth/AM2RNEITC2G52HMWSWWPEP3TVM7JTANCNFSM47P4JTGA .
Currently put my controller under PrestashopBundle.
You mean you put it directly under path_to_prestashop/src/PrestaShopBundle
? If so, there's a chance that when you update PrestaShop your controller will be replaced/removed.
BTW, in the official documentation there is nothing about composer stuff
It's mentioned here: https://devdocs.prestashop.com/1.7/modules/concepts/composer/#composer
Remember that this is just a sample and not meant to serve as a rule for everyone. If you don't want to use composer on your project, switch it to another dependency manager or remove it (if you know what you're doing) 😃.
I just wish it works without any dependency manager other than the standard one used in Prestashop. The twig template works without it, and also the page
does not mention the need to use composer.
As I do updates via git, I do not think they can remove my controller.
ср, 30 черв. 2021 о 22:36 skaparate @.***> пише:
Currently put my controller under PrestashopBundle.
You mean you put it directly under path_to_prestashop/src/PrestaShopBundle? If so, there's a change that when you update PrestaShop your controller will be replaced/removed.
BTW, in the official documentation there is nothing about composer stuff
It's mentioned here: https://devdocs.prestashop.com/1.7/modules/concepts/composer/#composer
Remember that this is just a sample and not meant to serve as a rule for everyone. If you don't want to use composer on your project, switch it to another dependency manager or remove it (if you know what you're doing) 😃 .
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/skaparate/prestashop-sample-module/issues/1#issuecomment-871710688, or unsubscribe https://github.com/notifications/unsubscribe-auth/AM2RNEMUTXDUWRS52MA32D3TVN56BANCNFSM47P4JTGA .
I just wish it works without any dependency manager other than the standard one used in Prestashop. The twig template works without it, and also the page
does not mention the need to use composer.
Like I said, you can simply remove it and adapt it however you like :)
Yeah, but the problem is that it does not work without..
чт, 1 лип. 2021 о 00:07 skaparate @.***> пише:
I just wish it works without any dependency manager other than the standard one used in Prestashop. The twig template works without it, and also the page
does not mention the need to use composer.
Like I said, you can simply remove it and adapt it however you like :)
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/skaparate/prestashop-sample-module/issues/1#issuecomment-871758442, or unsubscribe https://github.com/notifications/unsubscribe-auth/AM2RNEO2IGY5HTHRGVSBMJDTVOISJANCNFSM47P4JTGA .
Any idea how to resolve / debug it?