in below post my answer got's deleted.

How to get the attribute id by attribute code in magento 2

The accepted answer gets updated after my post so how you guys consider my answer as copied

You can see here in revision history https://magento.stackexchange.com/posts/226913/revisions

And for further note I checked that method in core and then answer

vendor/magento/module-eav/Model/ResourceModel/Entity/Attribute.php In above file I checked getIdByCode method and answered as its require two params

1 Answer 1


Your answer was deleted because It looked almost exactly as a previously posted answer.

  • 1
    please see answer revision history, he had updated his post, after my answer , you see in , he is wrong , magento.stackexchange.com/revisions/226913/2
    – Divyesh
    Commented May 22, 2018 at 8:49
  • 1
    Yes, this question has the almost same code. first user posted the answer first
    – Amit Bera Mod
    Commented May 22, 2018 at 9:10
  • @AmitBera But he has updated his answer after my answer. so how my answer is copied ?
    – Divyesh
    Commented May 22, 2018 at 9:12
  • 1
    But Sir, @Divyesh has posted the answer and then accepted user has updated post
    – kunj
    Commented May 22, 2018 at 9:12
  • 3
    this is the original post: magento.stackexchange.com/revisions/226913/1
    – Marius Mod
    Commented May 22, 2018 at 9:18
  • 1
    Thanks for clarification, But when i saw this answer , the answer was wrong, so i updated my correct answer, But this incident demotivate me to help people at here, Thanks
    – Divyesh
    Commented May 22, 2018 at 9:27
  • 4
    I'm sorry this demotivates you. It shouldn't. There are thousands of questions you can answer and one deleted answer should not demotivate you. I had deleted answers in the past and a lot of people did.
    – Marius Mod
    Commented May 22, 2018 at 9:37
  • 1
    @Marius , I can't believe that someone has deleted your answer Commented May 23, 2018 at 4:40
  • 2
    @MurtuzaZabuawala Why not? I screw up from time to time.
    – Marius Mod
    Commented May 23, 2018 at 6:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .