I am developing a custom payment module in Magento2. I used http://inchoo.net/magento-2/implementing-payment-gateway-magento-2/ as example to build it.
I need to debug static code generation. Where are generated pub/static/ files ? What class/method works to do it?
I'm going crazy to make this work on a develop server. I dont understand why method-renderer files are not loadng into http://myserver.com/pub/static/frontend/Magento/luma/es_AR/MyVendor_MyCustomPayment/js/view/payment/custom-payment.js when it exists in magento project (pub/static).
I tried:
php bin/magento module:enable MyVendor_MyCustomPayment --clear-static-contentphp bin/magento setup:upgraderm -rf var/diphp bin/magento setup:di:compilephp bin/magento --ansi setup:static-content:deploy es_ARphp bin/magento setup:static-content:deploy- Verify file permissions:
(ls -la var/) chown -R magento_user:www-data var/ pub/static/find . -type d -exec chmod 770 {} \; && find . -type f -exec chmod 660 {} \; && chmod u+x bin/magento
2 Answers 2
I'm not sure how much it will help you but you can add verbose mode to the static content deploy command, up to three levels.
php bin/magento setup:static-content:deploy -v
php bin/magento setup:static-content:deploy -vv
php bin/magento setup:static-content:deploy -vvv
It has helped me track down errors in the past.
Good entry point to debug:
\Magento\Framework\App\StaticResource::launch
var_dump($params) after $this->parsePath($path);
Module key is empty?
- Reason would probably be a problem with
registration.phpand/ormodule.xml
var/generation), but static file deployment, which seems to work fine for you. Something else is happening there. Double check file name and make sure this is correct. I had troubles with such files myself.