1

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:

  1. php bin/magento module:enable MyVendor_MyCustomPayment --clear-static-content
  2. php bin/magento setup:upgrade
  3. rm -rf var/di
  4. php bin/magento setup:di:compile
  5. php bin/magento --ansi setup:static-content:deploy es_AR
  6. php bin/magento setup:static-content:deploy
  7. Verify file permissions: (ls -la var/)
  8. chown -R magento_user:www-data var/ pub/static/
  9. find . -type d -exec chmod 770 {} \; && find . -type f -exec chmod 660 {} \; && chmod u+x bin/magento
1
  • That's not code generation (which happens in 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.
    – nevvermind
    Commented Apr 18, 2016 at 0:21

2 Answers 2

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.

0

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.php and/or module.xml

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.