Closed speller closed 2 years ago
Hi @speller. Thank you for your report. To speed up processing of this issue, make sure that you provided the following information:
Make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:
@magento give me 2.4-develop instance
- upcoming 2.4.x release
For more details, review the Magento Contributor Assistant documentation.
Add a comment to assign the issue: @magento I am working on this
To learn more about issue processing workflow, refer to the Code Contributions.
Join Magento Community Engineering Slack and ask your questions in #github channel.
:warning: According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
:clock10: You can find the schedule on the Magento Community Calendar page.
:telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.
:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel
@magento give me 2.4-develop instance with edition ee
Hi @shikhamis11. Thank you for your request. I'm working on Magento instance for you.
Hi @shikhamis11, here is your Magento Instance: https://ade592f006b0aee4d71631a7aaeac0ff.instances.magento-community.engineering Admin access: https://ade592f006b0aee4d71631a7aaeac0ff.instances.magento-community.engineering/admin_b9ce Login: 948641af Password: 1d16f0b0a50c
Hi @engcom-Lima. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:
[ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).Details
If the issue has a valid description, the label Issue: Format is valid
will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid
appears.
[ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description
label to the issue by yourself.
[ ] 3. Add Component: XXXXX
label(s) to the ticket, indicating the components it may be related to.
[ ] 4. Verify that the issue is reproducible on 2.4-develop
branchDetails
- Add the comment @magento give me 2.4-develop instance
to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.4-develop
branch, please, add the label Reproduced on 2.4.x
.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
[ ] 5. Add label Issue: Confirmed
once verification is complete.
[ ] 6. Make sure that automatic system confirms that report has been added to the backlog.
Hi @speller ,
Thanks for your contribution and collaboration.
Kindly provide us exact steps to reproduce the issue.
May be issue got fixed in the latest branch as this kind of error Deprecated Functionality: trim(): Passing null to parameter #1 ($string)
reported by many reporters.
Please test in latest 2.4-develop
of Magento and let us know if you are facing any issue.
Thanks
@engcom-Lima I didn't test in the dev version yet. But I think the issue appears when the customer entity has a custom attribute but is saved without setting this attribute value.
I'm using the following code to add this attribute:
public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
{
$this->logger->info("Installing Auth0 ID custom customer attribute.");
$this->moduleDataSetup->getConnection()->startSetup();
$this->customerSetup->addAttribute(
Customer::ENTITY,
Auth0Id::ATTR_NAME,
[
'type' => 'varchar',
'label' => 'Auth0 ID',
'input' => 'text',
'backend' => Auth0Id::class,
'required' => false,
'visible' => false,
'user_defined' => true,
'unique' => true,
'sort_order' => 150,
'position' => 150,
'system' => false,
]
);
$this->customerSetup->addAttributeToSet(
CustomerMetadataInterface::ENTITY_TYPE_CUSTOMER,
CustomerMetadataInterface::ATTRIBUTE_SET_ID_CUSTOMER,
null,
Auth0Id::ATTR_NAME,
);
$attribute =
$this->customerSetup->getEavConfig()
->getAttribute(Customer::ENTITY, Auth0Id::ATTR_NAME)
->addData([
'used_in_forms' => [
'adminhtml_customer',
],
'is_used_in_grid' => 1,
'is_visible_in_grid' => 1,
'is_filterable_in_grid' => 1,
'is_searchable_in_grid' => 1,
]);
$this->attributeResource->save($attribute);
$this->moduleDataSetup->getConnection()->endSetup();
$this->logger->info("Attribute Auth0 ID successfully installed.");
}
Hi @engcom-Hotel. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:
[ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).Details
If the issue has a valid description, the label Issue: Format is valid
will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid
appears.
[ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description
label to the issue by yourself.
[ ] 3. Add Component: XXXXX
label(s) to the ticket, indicating the components it may be related to.
[ ] 4. Verify that the issue is reproducible on 2.4-develop
branchDetails
- Add the comment @magento give me 2.4-develop instance
to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.4-develop
branch, please, add the label Reproduced on 2.4.x
.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
[ ] 5. Add label Issue: Confirmed
once verification is complete.
[ ] 6. Make sure that automatic system confirms that report has been added to the backlog.
Hello @speller,
Thanks for the report and collaboration!
We have tried to reproduce the issue in Magento's development branch i.e. 2-4-develop but for us the issue is not reproducible. We have made a custom module in order to reproduce the issue. The same is attached below:
We have tried to reproduce the issue with PHP 8.1;
Please let us know in case we have missed anything.
Thanks
@engcom-Hotel sorry for a late reply. I can confirm the issue is solved in 2.4.5. The line causing the warning was changed from
'value' => trim($value),
to
'value' => $value !== null ? trim($value) : '',
Hello @speller,
Thanks for the conforming that issue has been resolved in the latest release version of Magento. Hence we are closing this issue.
Thanks
Preconditions and environment
Steps to reproduce
Not really sure about the exact steps, but I'm checking for an attribute uniqueness before saving the customer user:
Expected result
Work fine under 2.4.3 + PHP 7.4
Actual result
Additional information
No response
Release note
No response
Triage and priority