Skip to content

controllers

Auto Added by WPeMatico

Submitting a form on a CMS page that is loading a template file is returning a 404 error on the post request

I think I am running into a routing issue where my post request is not reaching my controller. Test/Example/view/frontend/templates/swatches.phtml <form action=”<? echo $block->getUrl(‘example/index/index’); ?>” id=”pgswatchForm” method=”post”> Test/Example/Controller/Index/Index.php <?php namespace TestExampleControllerIndex; use MagentoFrameworkAppActionAction; use MagentoFrameworkAppActionContext; use MagentoFrameworkViewResultPageFactory; use MagentoFrameworkMailTemplateTransportBuilder; use MagentoFrameworkAppActionHttpPostActionInterface;… Read More »Submitting a form on a CMS page that is loading a template file is returning a 404 error on the post request

Having trouble refactoring Submit Index class that extends deprecated MagentoFrameworkAppActionAction;

<?php namespace AlexAskQuestionControllerSubmit; use AlexAskQuestionModelAskQuestionFactory; use MagentoFrameworkAppActionAction; use MagentoFrameworkAppActionContext; use MagentoFrameworkControllerResultJson; use MagentoFrameworkControllerResultFactory; use MagentoFrameworkDataFormFormKeyValidator; use MagentoFrameworkExceptionLocalizedException; class Index extends Action { public const STATUS_ERROR = ‘Error’; public const STATUS_SUCCESS = ‘Success’; /** * @var Validator */ private Validator $formKeyValidator;… Read More »Having trouble refactoring Submit Index class that extends deprecated MagentoFrameworkAppActionAction;

Argument 5 passed to VendorModuleModelResourceModelPriceResultCollectionInterceptor::__construct()

I have created a custom module and it’s working fine,if I only run php bin/magento setup:upgrade command. However, when I attempt to run php bin/magento s:d:c it raises an exception. Type Error occurred when creating object: VendorModuleNameModelResourceModelPriceResultCollectionInterceptor, Argument 5 passed… Read More »Argument 5 passed to VendorModuleModelResourceModelPriceResultCollectionInterceptor::__construct()

MassAction if I select all items I get NULL in the controller

I have this grid: <?xml version=”1.0″ encoding=”UTF-8″?> <listing xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:noNamespaceSchemaLocation=”urn:magento:module:Magento_Ui:etc/ui_configuration.xsd”> <argument name=”data” xsi:type=”array”> <item name=”js_config” xsi:type=”array”> <item name=”provider” xsi:type=”string”>employees_listing.employees_listing_data_source</item> <item name=”deps” xsi:type=”string”>employees_listing.employees_listing_data_source</item> </item> <item name=”spinner” xsi:type=”string”>columns</item> <item name=”buttons” xsi:type=”array”> <item name=”add” xsi:type=”array”> <item name=”name” xsi:type=”string”>add</item> <item name=”label” xsi:type=”string” translate=”true”>Add New… Read More »MassAction if I select all items I get NULL in the controller