New answers tagged

0

You can add cache control header inside your controller /** * This action render random number for each request */ public function execute() { $page = $this->pageFactory->create(); //We are using HTTP headers to control various page caches (varnish, fastly, built-in php cache) $page->setHeader('Cache-...


0

If you cannot change the headers values, you can do as follows: Import these classes: use Magento\Framework\App\CsrfAwareActionInterface; use Magento\Framework\App\RequestInterface; use Magento\Framework\App\Request\InvalidRequestException; Implement CsrfAwareActionInterface : class MyApi extends \Magento\Framework\App\Action\Action implements ...


0

Your URLs come from Magento 2's router system, which can be configured per module. This means that not all the admin controllers are in one place, example: https://mysite/admin/admin/export/export/key/xxx/entity/catalog_product/file_format/csv comes from module magento/module-import-export https://sysite/admin/admin/dashboard/index/key/xxx/ comes from ...


0

You can increasing the following PHP settings (php.ini) for doing imports: Error cause: post_max_size = 128M as suggested in some articles about import... After setting them back to default (64M) Solution: post_max_size = 64M and ,naturally, deleting all the cache folders under /var/cache/, everything went back to normal.


2

in php we use POST and GET method for submit data if we use POST method then form data will be submit in Form data parameter when you come back from browser that time it will not call your controller for Action directly submit form Again based on Form data parameter so you will get Error like Confirm Form Resubmission Suggest you to use GET method ...


0

This isn't Magento causing an error, rather your browser (Chrome) warning you that you are resubmitting the exact same data in a (POST) request. Firefox does the same: It's not isolated to Magento sites either, any site that you press the browser back button in after making a POST request will warn you of the same.


0

you can add your data in below code One approach is to use the registry so in your controller class you put it in the registry, and then in your block you can retrieve it. <?php namespace Vendor\Module\Controller\Index; use Magento\Framework\App\Action\Action; class Index extends Action { protected $_coreRegistry; public function __construct( ...


Top 50 recent answers are included