Skip to content
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

Bulk Update Attributes - datetime doesn't extend \Magento\Framework\Data\Form\Element\AbstractElement #35214

Closed
timpea opened this issue Mar 22, 2022 · 37 comments
Assignees
Labels
Issue: needs update Additional information is require, waiting for response

Comments

@timpea
Copy link

timpea commented Mar 22, 2022

Preconditions (*)

  1. Magento 2.4.3

Steps to reproduce (*)

  1. Add a datetime product attribute
  2. Assign attribute to Default attribute set.
  3. Catalog>Products: Update Attributes on 1 or more products

Expected result (*)

  1. Ability to update product attributes

Actual result (*)

  1. Update attributes page fails to load
  2. [2022-03-22 12:04:34] main.CRITICAL: datetime doesn't extend \Magento\Framework\Data\Form\Element\AbstractElement {"exception":"[object] (InvalidArgumentException(code: 0): datetime doesn't extend \Magento\Framework\Data\Form\Element\AbstractElement at /public/vendor/magento/framework/Data/Form/Element/Factory.php:83)"} []

[ ] Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.

@m2-assistant
Copy link

m2-assistant bot commented Mar 22, 2022

Hi @timpea. Thank you for your report.
To speed up processing of this issue, make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

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.


⚠️ According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

🕙 You can find the schedule on the Magento Community Calendar page.

📞 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.

✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

@timpea
Copy link
Author

timpea commented Mar 22, 2022

@magento give me 2.4-develop instance

@magento-deployment-service
Copy link

Hi @timpea, unfortunately there is no ability to deploy Magento instance at the moment. Please try again later.

@timpea
Copy link
Author

timpea commented Mar 22, 2022

@magento give me 2.4-develop instance

@magento-deployment-service
Copy link

Hi @timpea, unfortunately there is no ability to deploy Magento instance at the moment. Please try again later.

@engcom-Delta engcom-Delta self-assigned this Mar 22, 2022
@m2-assistant
Copy link

m2-assistant bot commented Mar 22, 2022

Hi @engcom-Delta. 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: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf 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 branch

    Details- 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.

@engcom-Delta
Copy link
Contributor

Hi @timpea ,
We tried to reproduce the issue on Magento 2.4 Develop with latest branch , unfortunately issue is not reproducible.
Hence request to review the provided steps.

steps followed:

  1. Add a datetime product attribute

Screenshot 2022-03-22 at 5 49 20 PM

2. Assign attribute to Default attribute set.

Screenshot 2022-03-22 at 5 55 17 PM

3. Catalog>Products: Update Attributes on 1 or more products

Actual : Attributed are updated without any error.
Please find below screenshots for reference.
Screenshot 2022-03-22 at 5 58 03 PM
Screenshot 2022-03-22 at 5 58 20 PM

Hence, added the label 'Needs Update'

@engcom-Delta engcom-Delta added Issue: needs update Additional information is require, waiting for response and removed Issue: ready for confirmation labels Mar 22, 2022
@m2-community-project m2-community-project bot moved this from Ready for Confirmation to Needs Update in Issue Confirmation and Triage Board Mar 22, 2022
@timpea
Copy link
Author

timpea commented Mar 22, 2022

@magento give me 2.4-develop instance

@magento-deployment-service
Copy link

Hi @timpea, unfortunately there is no ability to deploy Magento instance at the moment. Please try again later.

@timpea
Copy link
Author

timpea commented Mar 22, 2022

@engcom-Delta try the bulk update attributes page:
Screenshot 2022-03-22 at 12 56 51

@feling07
Copy link

I have the same issue. Any update?

@engcom-Delta
Copy link
Contributor

Hi @timpea ,
Thanks for quick turn around. tried again in Magento 2.4 Develop. We are able to do Bulk update attributes.
Not getting any errors the page. Hence request to review the provided steps.
Screenshot 2022-03-25 at 6 37 54 AM
Screenshot 2022-03-25 at 6 51 30 AM
Screenshot 2022-03-25 at 6 51 45 AM

in Magento 2.4.3.p1 insance also verified ,it works fine.
Screenshot 2022-03-25 at 6 59 43 AM
Screenshot 2022-03-25 at 7 00 32 AM
Screenshot 2022-03-25 at 7 01 02 AM

@timpea
Copy link
Author

timpea commented Mar 25, 2022

@magento give me 2.4-develop instance

@magento-deployment-service
Copy link

Hi @timpea. Thank you for your request. I'm working on Magento instance for you.

@magento-deployment-service
Copy link

@timpea
Copy link
Author

timpea commented Mar 25, 2022

@engcom-Delta It looks like you are updating a Date field, it is the DateTime attribute that is causing the error for us. I haven't tested it on a fresh install of 2.4.3-p1, but we are getting this error on our live and staging sites running 2.4.3-p1.

I have just tested it in the Develop version and it is working as expected.

@feling07
Copy link

Hi Timpea, I checked all the data in eav_attribute and found the one using backend_type datetime and frontend_input datetime. After updating the frontend input to date the error is gone and it seems all working fine. I'm not sure if yours would be similar but in frontend there's no element for the type of datetime that's why it throws the error for me. Hope this helps.

@timpea
Copy link
Author

timpea commented Mar 25, 2022

@feling07 thank you, I was able to get around it by using the Date attribute, we didn't really need DateTime, it was only for a last_stock_checked field so we could record when we last checked the stock levels of each product.

@engcom-Delta
Copy link
Contributor

Hi @timpea ,
Kindly try on fresh instance of 2.4.3-p1 and confirm.

Thanks

@timpea
Copy link
Author

timpea commented Mar 28, 2022

@magento give me 2.4.3-p1 instance

@magento-deployment-service
Copy link

Hi @timpea. Thank you for your request. I'm working on Magento instance for you.

@magento-deployment-service
Copy link

Hi @timpea, unfortunately there is no ability to deploy Magento instance at the moment. Please try again later.

@timpea
Copy link
Author

timpea commented Mar 28, 2022

@magento give me 2.4.3-p1 instance

@magento-deployment-service
Copy link

Hi @timpea. Thank you for your request. I'm working on Magento instance for you.

@magento-deployment-service
Copy link

Hi @timpea, unfortunately there is no ability to deploy Magento instance at the moment. Please try again later.

@timpea
Copy link
Author

timpea commented Mar 28, 2022

@magento give me 2.4.3-p1 instance

@magento-deployment-service
Copy link

Hi @timpea. Thank you for your request. I'm working on Magento instance for you.

@magento-deployment-service
Copy link

Hi @timpea, unfortunately there is no ability to deploy Magento instance at the moment. Please try again later.

@timpea
Copy link
Author

timpea commented Mar 28, 2022

@magento give me 2.4.3-p1 instance

@magento-deployment-service
Copy link

Hi @timpea. Thank you for your request. I'm working on Magento instance for you.

@magento-deployment-service
Copy link

Hi @timpea, unfortunately there is no ability to deploy Magento instance at the moment. Please try again later.

@timpea
Copy link
Author

timpea commented Mar 29, 2022

@magento give me 2.4.3-p1 instance

@magento-deployment-service
Copy link

Hi @timpea. Thank you for your request. I'm working on Magento instance for you.

@magento-deployment-service
Copy link

Hi @timpea, unfortunately there is no ability to deploy Magento instance at the moment. Please try again later.

@engcom-Delta
Copy link
Contributor

Hi @timpea ,
We have noticed that this issue has not been updated for a period of 14 Days.
Hence we assume that this issue is fixed now, so we are closing it.Please raise a fresh ticket or reopen this ticket if you need more assistance on this.

@visahardik
Copy link

@magento I am facing the same issue in M2.4.3-p1 instance while trying to bulk attribute update

@timpea
Copy link
Author

timpea commented Apr 14, 2022

@visahardik it appears to be fixed in 2.4.4 - 90334d9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: needs update Additional information is require, waiting for response
Projects
None yet
Development

No branches or pull requests

4 participants