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

Fixed upload, update & delete product image #6510

Merged
merged 2 commits into from Sep 28, 2016

Conversation

@aleeks
Copy link
Contributor

commented Sep 28, 2016

Questions Answers
Branch? develop
Description? Fixed all process for image product (upload, update, delete)
Type? bug fix
Category? BO
BC breaks? no
Deprecations? no
Fixed ticket? http://forge.prestashop.com/browse/BOOM-1579
How to test? Try to play with image process!

Thank's to @mickaelandrieu after him PR : #5912 It's report (a lot) bugs because some logic isn't good

Most of time, it's JS issue.
An url : admin_product_image_form: path: /product/image/form/{idImage}

In the twig :
url-update="{{ path('admin_product_image_form') }}"

In the JS, the url is constructed manually :
url: dropZoneElem.find('foo').attr('url-update') + '/' + id

Before, it was working but it's not good. Now with token, we have to construct good url at the begining

So, as possible :
Twig :
url-update="{{ path('admin_product_image_form', {'idImage': image.id}) }}"
JS :
url: dropZoneElem.find('foo').attr('url-update')

@mickaelandrieu
Copy link
Member

left a comment

Good job !

@mickaelandrieu mickaelandrieu merged commit 14389d5 into PrestaShop:develop Sep 28, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@dSkrbic dSkrbic added the QA ✔️ label Sep 28, 2016

@aleeks aleeks deleted the aleeks:upload_image branch Sep 30, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.