A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

New answers tagged

0

After many hours of debugging I managed to resolve this. It turns out to be an issue with the SalesFire extension that was installed. Disabling this extension prevented the errors from occurring and allowed the site to switch caching methods.


0

You can also put Varnish hots using bin/magento: magento setup:config:set --http-cache-hosts=192.0.2.100,192.0.2.155:6081


1

Magento provides a more flexible way for you to set file ownership and permissions. Instead of setting permissions explicitly, you only need to make sure files and directories are writable for installation. We provide different suggestions for doing this, depending on whether you access your Magento server with one user account (typical of shared ...


0

Have you tried removing the generated directory? rm -rf generated


0

it is due to the ownership issues. I was using ubuntu os so I used the following command to correct ownership. sudo useradd magento Now associate this magento user to the web server’s user group. In ubuntu it is by default www-data sudo usermod -g www-data magento Now navigate the Magento project directory in the terminal and run following commands. ...


-1

Go to Magento root directory using below command cd /opt/bitnami/apps/magento/htdocs And run below commands chmod -R 777 var/ pub/ Hope this will work for you.


1

"/opt/bitnami/apps/magento/htdocs/var/cache/" is not writable in /opt/bitnami/apps/magento/htdocs/vendor/magento/zendframework1/library/Zend/Cache.php:209 Stack trace: #0 Looks like you got problem with permissions. Refer this and remeber to run that as web server user :) like: www-data but this would be based on your server configuration.


0

Set 'cache_lifetime' => null


0

You need to give ownership permission to your apache user in magento directory.


0

I had your same problem and solved it by disabling the server cache. I had the nginx and varnish cache active If you put the site in developer mode do you have the same error?


2

You can't with cache enabled, all files aren't re-interpreted. You should get it with customer data. You can try to add the following code in your phtml file. <script type="text/javascript"> require([ 'Magento_Customer/js/customer-data' ], function (customerData) { 'use strict'; customerData.get('cart').subscribe(...


1

Once you delete the generation folder your generated construction will be removed so you need to regenerate that construction you can generate by following command php bin/magento setup:upgrade php bin/magento setup:di:compile php bin/magento setup:static-content:deploy -f


0

Try this $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $cart = $objectManager->get('\Magento\Checkout\Model\Cart'); $totalItems = $cart->getQuote(); $quoteItems= $totalItems->getAllItems(); foreach ($quoteItems as $item ){ echo $item->getQty(); }


3

I think this code will help you!! $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $cart = $objectManager->get('\Magento\Checkout\Model\Cart'); // get quote items collection $itemsCollection = $cart->getQuote()->getItemsCollection(); // get array of all items what can be display directly ...


2

Explanation: Your frontend is using http, but in your config you've set it to force https in frontend (web/secure/use_in_frontend value 1, meaning "yes/true"). Therefore by visiting https, magento2 redirects to http, but the http reads the m2 config and goes back to https. Hence the loop. Solution 1: Try setting web/secure/use_in_frontend to 0 php bin/...


Top 50 recent answers are included