magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.48k stars 9.29k forks source link

M2.1.7 - REST API can only update images once #10000

Closed erikrijn closed 7 years ago

erikrijn commented 7 years ago

Tested on Magento 2.1.7 with PHP7.

  1. Create a new product image via the REST API.
  2. The POST method return the ID of the created image.
  3. Update the image by SKU and ID, using the REST API.
  4. The PUT returns 'true' and the changes are visible on the front-end.
  5. Now do another update by SKU and ID, using the REST API.
  6. It throws the exception:

{"message":"There is no image with provided ID.","trace":"#0 [internal function]: Magento\Catalog\Model\Product\Gallery\GalleryManagement->update('2192-S', Object(Magento\Catalog\Model\Product\Gallery\Entry))\n#1 \/var\/www\/html\/vendor\/magento\/module-webapi\/Controller\/Rest.php(307): call_user_func_array(Array, Array)\n#2 \/var\/www\/html\/vendor\/magento\/module-webapi\/Controller\/Rest.php(216): Magento\Webapi\Controller\Rest->processApiRequest()\n#3 \/var\/www\/html\/var\/generation\/Magento\/Webapi\/Controller\/Rest\/Interceptor.php(37): Magento\Webapi\Controller\Rest->dispatch(Object(Magento\Framework\App\Request\Http))\n#4 \/var\/www\/html\/vendor\/magento\/framework\/App\/Http.php(135): Magento\Webapi\Controller\Rest\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))\n#5 \/var\/www\/html\/vendor\/magento\/framework\/App\/Bootstrap.php(258): Magento\Framework\App\Http->launch()\n#6 \/var\/www\/html\/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))\n#7 {main}"}

I can reproduce this bug with every image, and I've tried multiple installations. Even a clean one without any 3rd party extensions installed.

Edit: 2017-06-23: After trying to update an image twice, the image cannot be deleted anymore via the admin backend. So the image becomes permanent.

smoskaluk commented 7 years ago

@erikrijn Please add more details to your description of the steps you followed when identifying this issue. Please write all API calls that you were using. Screenshots would be helpful, too.

veloraven commented 7 years ago

According to contributor guide, tickets without response for two weeks should be closed. If this issue still reproducible please feel free to create the new one: format new issue according to the Issue reporting guidelines: with steps to reproduce, actual result and expected result and specify Magento version.

erikrijn commented 7 years ago

I will not be responding to any tickets anymore. Neither will I report bugs in the future. Every ticket stays open for months, and after that I always get the same response. Please provide more detailed information. In this case you haven't even tried to reproduce my steps. They we're complete and reproducible 100% of the time. Therefore I conclude that you don't care about improving your product. Instead, you care about matching dumb KPI goals for closing tickets. I'll fix the bugs myself for my customers and not contribute anymore. It is a waste of time on my part. I hear this same story from almost every developer I talk to in The Netherlands. Many have stopped contributing for this reason.

Regards, Erik van Rijn

On Jul 25, 2017 10:16 AM, "Olga Moyseyenko" notifications@github.com wrote:

According to contributor guide http://devdocs.magento.com/guides/v2.1/contributor-guide/contributing.html, tickets without response for two weeks should be closed. If this issue still reproducible please feel free to create the new one: format new issue according to the Issue reporting guidelines https://github.com/magento/magento2/wiki/Issue-reporting-guidelines: with steps to reproduce, actual result and expected result and specify Magento version.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/magento/magento2/issues/10000#issuecomment-317664388, or mute the thread https://github.com/notifications/unsubscribe-auth/ANbZGEXX35ZtaBBFFYHKOjLn57VWIvZjks5sRaRYgaJpZM4N_9_E .

orlangur commented 7 years ago

Unreasonable closing could sometimes happen and is really demotivating but

Please add more details to your description of the steps you followed when identifying this issue. Please write all API calls that you were using. Screenshots would be helpful, too.

is perfectly valid and indicates the issue is just not reproducible with steps provided.

erikrijn commented 7 years ago

It is 100% reproducible. I've fixed the error in your codebase myself for our customers. If you don't even want to take the time to make 2 API calls (POST/PUT), then just leave the bug in there.

On Wed, Sep 20, 2017 at 1:35 PM, Vlad Veselov notifications@github.com wrote:

Unreasonable closing could sometimes happen and is really demotivating but

Please add more details to your description of the steps you followed when identifying this issue. Please write all API calls that you were using. Screenshots would be helpful, too.

is perfectly valid and indicates the issue is just not reproducible with steps provided.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/magento/magento2/issues/10000#issuecomment-330824939, or mute the thread https://github.com/notifications/unsubscribe-auth/ANbZGEZd5y1k-IVykV5T_O_ZOH4CJ-39ks5skPiNgaJpZM4N_9_E .

orlangur commented 7 years ago

@erikrijn glad to know you managed to solve it for your clients. Best what you could do in such case to improve Magento is to propose a PR. They are processed pretty fast nowadays.

I understand your frustration and that you probably don't have motivation to make a PR. In such case would be nice if you share some patch with us so that anyone interested may turn it into PR.