When i compile php bin/magento setup:di:compile it generates an error

 Fatal error: Class 'Magento\Sales\Block\Adminhtml\Totals' not found in C:\xampp\htdocs\market-place\vendor\magento\module-sales\Block\Adminhtml\
Order\Creditmemo\Totals.php on line 17

I don't known why the class is not found. The class even exists in this path.

  • try to disable custom extension related to sales, and then check. – Dhiren Vasoya Mar 1 '19 at 11:34
  • Share your directory structure please – Ghulam.M Mar 1 '19 at 11:57
  • Paste the concrete Magento2 version you are running, and a list of enabled modules (bin/magento module:status). So we get more details to help – Raul Sanchez Mar 1 '19 at 12:20
  • Thank you for all to comment and Answer me. I get my mistake . Actually i edit Magento\Sales\Block\Adminhtml\Totals class namespace by mistake – HaFiz Umer Mar 1 '19 at 12:21

And run this Command in ubantu os

sudo rm -rf pub/static/frontend/ pub/static/adminhtml/ pub/static/_requirejs pub/static/deployed_version.txt var/cache var/page_cache var/generation var/view_preprocessed var/session generated/code

sudo php bin/magento setup:upgrade

sudo php bin/magento setup:static-content:deploy

sudo php bin/magento cache:clean
| improve this answer | |
  • pub/static does not have anything to to with PHP – Philipp Sander Mar 1 '19 at 11:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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