0

I am getting error when I try to edit customer from Admin side.

Error:

Magento\AdminAdobeIms\Plugin\RemovePasswordAndUserConfirmationFormFieldsPlugin::afterGetForm(): Argument #2 ($result) must be of type Magento\Framework\Data\Form, null given, called in /html/vendor/magento/framework/Interception/Interceptor.php on line 146 Exception in /html/vendor/magento/module-admin-adobe-ims/Plugin/RemovePasswordAndUserConfirmationFormFieldsPlugin.php:39

enter image description here Can anyone tell me how to fix this issue.

2 Answers 2

1

This issue can be related to other 3rd party modules,

You can check in whole log, the Extension name will be there and then you can debug the module or upgrade it if required.

Please check here. https://github.com/magento/magento2/issues/36145

Hope this will help you!

1
  • Yes, the issue is from my custom module. Sep 6, 2023 at 11:32
1

Hello @Yashir this is the same error I have also faced but not in customer edit but in the configuration we have created a custom form and tab due to this error.To resolve this I had to override the get form method in our custom form file here is the sample. enter image description here

Solution which worked for me :

<?php

namespace [Vendor_Name]\[Module_Name]\Block\Adminhtml\Configuration\Edit\Tab;

use Magento\Backend\Block\Template\Context;
use Magento\Backend\Block\Widget\Form\Generic;
use Magento\Backend\Block\Widget\Tab\TabInterface;
use Magento\Framework\Data\FormFactory;
use Magento\Framework\Registry;

class FiscalCalendar extends Generic implements TabInterface
{

    /**
     * @param Context $context
     * @param Registry $registry
     * @param FormFactory $formFactory
     * @param Data $helper
     * @param array $data
     */
    public function __construct(
        Context $context,
        Registry $registry,
        FormFactory $formFactory,
        array $data = []
    ) {
        parent::__construct($context, $registry, $formFactory, $data);
    }

    public function getForm()
    {
        if ($this->_form == null) {
            return $this->_formFactory->create();
        } else {
            return $this->_form;
        }
    }

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.