Skip to content

Fatal error at admin customer edit #13213

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
kevincream opened this issue Jan 16, 2018 · 9 comments
Closed

Fatal error at admin customer edit #13213

kevincream opened this issue Jan 16, 2018 · 9 comments
Labels
Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release

Comments

@kevincream
Copy link
Contributor

Preconditions

  1. PHP 7.0.25
  2. MariaDB 10.1.29
  3. Confirmed Magento versions: v2.2.0 & v2.2.2

Steps to reproduce

  1. Create user role with custom access
  2. Enable everything under Sales, Customers & Stores leave the rest unchecked at Role Resources.
  3. Add user to this role
  4. Login with this user
  5. Try to edit an existing customer

Expected result

  1. User can be editted

Actual result

Fatal error: Uncaught TypeError: Argument 2 passed to Magento\Ui\Component\HtmlContent::__construct() must implement interface Magento\Framework\View\Element\BlockInterface, boolean given, called in /home/bennies/domains/fiftiesstore.staging.web26.cream.nl/public_html/releases/20180112105829/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 111 and defined in /home/bennies/domains/fiftiesstore.staging.web26.cream.nl/public_html/releases/20180112105829/vendor/magento/module-ui/Component/HtmlContent.php:27 Stack trace: #0 /home/bennies/domains/fiftiesstore.staging.web26.cream.nl/public_html/releases/20180112105829/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(111): Magento\Ui\Component\HtmlContent->__construct(Object(Magento\Framework\View\Element\UiComponent\Context), false, Array, Array) #1 /home/bennies/domains/fiftiesstore.staging.web26.cream.nl/public_html/releases/20180112105829/vendor/magento/framework/ObjectManager/Factory/Compiled.php(108): Magento\Framework\ObjectManag in /home/bennies/domains/fiftiesstore.staging.web26.cream.nl/public_html/releases/20180112105829/vendor/magento/module-ui/Component/HtmlContent.php on line 27

@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Jan 16, 2018
@ripen-misha
Copy link

Running into the same issue. A user with admin privileges can edit customer just fine, but a user with custom access (Sales/Orders, Customers, System/Notifications) cannot access Edit Customer page. After clicking Edit link on the customer grid, the page fails to load. Fatal error is found in php log (the same error as reported in the original post.)

Magento ver. 2.2.0

@magento-engcom-team
Copy link
Contributor

@kevincream, thank you for your report.
We've acknowledged the issue and added to our backlog.

@magento-engcom-team magento-engcom-team added Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release labels Jan 17, 2018
@magefan
Copy link
Contributor

magefan commented Jan 17, 2018

We have the same issue.

@magento-engcom-team magento-engcom-team added the Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed label Jan 17, 2018
@elzekool
Copy link
Contributor

We had the same issue. I tracked it down to the following block definition in vendor/magento/module-newsletter/view/base/ui_component/customer_form.xml.

I didn't have the time yet to find a good solution, For now I commented out this block as we don't use newsletters in our shop. But this is only a hacky fix and not the final solution

<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <htmlContent name="newsletter_content">
        <block acl="Magento_Newsletter::subscriber" class="Magento\Customer\Block\Adminhtml\Edit\Tab\Newsletter" name="newsletter">
            <block class="Magento\Customer\Block\Adminhtml\Edit\Tab\Newsletter\Grid" name="newsletter.grid" as="grid"/>
        </block>
    </htmlContent>
</form>

@martinhetschel
Copy link

Workaround is:

Permissions -> User Roles give your user following permissions:
tick: Marketing -> User Content
tick: Marketing -> Communications -> Newsletter Queue
tick: Marketing -> Communications -> Newsletter Subscribers

@tesilCz
Copy link

tesilCz commented Feb 5, 2018

@martinhetschel doesn't work for me, unfortunately...

@martinhetschel
Copy link

image

This is what is working for my office users after upgrade to 2.2.2

@tesilCz
Copy link

tesilCz commented Feb 5, 2018

@martinhetschel It works with permissions set like that, thanks ! However adding those marketing ones wasn't a fix. Was something within "sales" or "catalog" for me. (running 2.2.0)

@ankurvr
Copy link
Member

ankurvr commented May 22, 2018

This issue has been resolved here Pull Request #12661 and it's already released with version 2.2.4

@ankurvr ankurvr added Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line labels May 22, 2018
JesKingDev added a commit to JesKingDev/magento2-patches that referenced this issue May 22, 2018
@ankurvr ankurvr closed this as completed Jun 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release
Projects
None yet
Development

No branches or pull requests

8 participants