When I call the rules https://storeId.mybigcommerce.com/api/v2/products/productId/rules for a product that has the rules applied from the option set I get a 204 No Content error.
Is this something temporary? Does anybody have the same issue?
Actual links:
https://store-9j2twtgd.mybigcommerce.com/api/v2/products/54/rules
https://store-9j2twtgd.mybigcommerce.com/api/v2/products/54
i faced the same issues with a couple other API requests. What i realized is that due to content negotiation, you have to state the format in which you cant your response.
For example if i want a specific product, i have to do
https://storeId.mybigcommerce.com/api/v2/products/productId.json
In this same regard, i would suggest that you do same with the rules resource. so try out
https://storeId.mybigcommerce.com/api/v2/products/productId/rules.json
Hope this works.
Related
I would like to see if anyone else already had this problem. I'm really struggling to find out an solution for that, so that's why I've decided to call for help.
So, i have this Ownbackup API endpoint:
Ownbackup API
Here's the link for the API documentation: https://cdn2.hubspot.net/hubfs/2571574/api%20document-1.html#tag/Enhanced-Sandbox-Seeding/paths/~1api~1v1~1sbs~1templates~1{template_id}~1seed/post
But for me it wasn't too helpful.
The point in here is that my organization has hundreds of validations rules. And I would like to know if there is any parameter that this API understands in order to disable ALL validation rules, without the need of passing the name of each one of the file names in the request body.
Keep in mind that the format for this request is multipart/form-data.
Thank you all!
So, I've reached out for Owbackup support and they told me that i can actually use "disable_validation_rules" set to true, so this way the All validation rules get disabled and the triggers not, also it does not require me to specify which validations rules should be disabled.
I'm letting this answer in here, in order someone else comes across this problem!
Cheers!
I need a little help here, i hope someone here can help me for a hint or clue.
First of all, I'm not programmer. I'm just web admin who can use cms and basic html.
I was using PrestaShop for my online shop. In the backend, I can't upload new product image anymore.
The error just blank without any sign for me. Here for the screenshot:
I appreciate it, if someone can help me, thanks, and sorry for my english.
#PanjiWiyono This errors don't really give us a quality information, but this is a start. In your JS code should be a ajax query that has an error when converting results to json (first error). You should check what's the exact error that this request is returning by inspecting in browser developer console.
If you detect that the second error is in fact, the response of this ajax query, well now we almost have the problem.
The second error should be related to data size. Check this: Error while sending QUERY packet
Anyway, you should check DbPDO.php class. You can use debug_backtrace function to display the complete stack, but definitly if error is related to a basic PHP class issue you will have not help knowing wich classes are in calling stack.
Good luck.
Simple solution
maybe a extra module is in a conflict with the prestashop core files. go to advanced parameters, performance and disable third party modules and try again.
other option is reupload admin folder with other name and
js folder check again
hope it will work for you
I was building my API when this question came out:
I am making an API to set or get stuff, for the example i try to set but i have two field with error, what's the best way to answer the errors ?
Answer only one error ?
Answer all the errors ?
In my opinion, answer all the errors is the best solution but not for my boss .
What's the best for this kind of work ?
Definitely all validation errors should be pass back to client.
Moreover, you should specify code of errors, while error message can vary for different situation. Standard error codes can help you to create
tests for your api.
Also you should add versioning for your api from the beginning, because when you open your api for clients it should be stable. And incompatible changes can be done only in next version
of your api
Is there any setting for url limit in Yii 2?
Some of my urls are over 300 characters and I get a 403 Forbidden code;
http://website/servicii-de-proiectare-asistenta-tehnica-din-partea-proiectantului-pe-perioada-derularii-lucrarilor-si-executie-de-lucrari-pentru-proiectul-%E2%80%9Emodernizare-drumuri-comunale-dc----dc----si-dc---a-de-pe-raza-comunei-lunca-judetul-boto-ani%E2%80%9D-863506-switch.html
If I shorten the url, it works.
this is my urlmanager rule:
'<title:(.*)>-<id:([0-9]+)>-access-not-granted.html' => 'member/licitatii/access-not-granted',
I tried to find some information regarding this issue and surprisingly enough, I didn't found a thing regarding URL length permitted.
However, I found a Yii way to solve your issue: Short URL Yii extension presented here - http://www.yiiframework.com/extension/google-url-shortener/
Also, please read this documentation that better explains how Yii treats URL routs: http://www.larryullman.com/2013/02/18/understanding-routes-in-the-yii-framework/
I know this does not solve your problem directly, but hope it gets you somewhere!
L.E: Here you have the bitly extension for Short URL's: http://www.yiiframework.com/extension/bitly-url-shortener/
Keep on coding,
Ares.
Why would that rule apply to your URL? From what I can see your URL will never trigger that rule.
I do not think there is a limit with the string of the URL in Yii2, try deleting some of the first part of the string to test this. try with an url like
http://website/proiectul-%E2%80%9Emodernizare-drumuri-comunale-dc----dc----si-dc---a-de-pe-raza-comunei-lunca-judetul-boto-ani%E2%80%9D-863506-switch.html
You might have problems because you have diacritics in the URL, try without them.
I have completed setting up the Magento Rest API and been able to retrieve a list of product without any errors using the API Example code Magento provides. However when I try to use the create a simple product example provided at http://www.magentocommerce.com/api/rest/introduction.html#RESTAPIIntroduction-Overview
I get the below error.
{"messages":{"error":[{"code":400,"message":"Missing \"media_gallery\" in request."}
I have looked everywhere and can't seem to find out how to fix the error. I don't see any reference here http://www.magentocommerce.com/api/rest/Resources/Products/products.html#RESTAPI-Resource-Products-HTTPMethod-POST-products saying media_gallery is required in the request.
Can anyone shed some light on this error and how to fix it?
I've been looking that up as well, but you can always modify that attribute in magento's administration and just turn it off (catalog/attributes/manage attributes), as in make it NOT required.
Cheers