samdark / yii2-shop

Example project implementing simple shop using Yii 2.0
Other
461 stars 236 forks source link

How can I create categories #21

Closed ThinkALot closed 7 years ago

ThinkALot commented 9 years ago

I am logged in, and I'm in the back end. The first thing I do is click the Categories tab, and then I click the Create Category green button. The Parent dropdown list has just one choice: Root. In the title field, I enter "cat 1" without quotes. Then I click the Create button, and I get this error:

Bad Request (#400) Unable to verify your data submission. The above error occurred while the Web server was processing your request. Please contact us if you think this is a server error. Thank you.

What am I doing wrong?

samdark commented 9 years ago

Either you've disabled cookies or configured your web server in a wrong way.

samdark commented 9 years ago

Or you have it at http://localhost/ which some browsers can't set cookie for.

ThinkALot commented 9 years ago

But the signup form did work. Why would one form work, but not the other?

As an additional test, in MyPhpAdmin, I manually created a new category and a new product. They both appeared in the products form after I refreshed it. But when I tried to create another new product in the form, I got the 400 error again.

Also, in the front end, I successfully placed an order for the product that I created in MyPhpAdmin. Now I'm able to see my order in the back end. But when I try to edit it in the back end, I get a 400 error again.

So apparently, the front end forms work, but the back end forms do not.

I'm using a recent version of Xampp on Win 7.

ThinkALot commented 9 years ago

Here is the log message for the 400 error:

exception 'yii\web\BadRequestHttpException' with message 'Unable to verify your data submission.' in E:\xampp\htdocs\yii2shop\vendor\yiisoft\yii2\web\Controller.php:110 Stack trace:

0 E:\xampp\htdocs\yii2shop\vendor\yiisoft\yii2\base\Controller.php(149): yii\web\Controller->beforeAction(Object(yii\base\InlineAction))

1 E:\xampp\htdocs\yii2shop\vendor\yiisoft\yii2\base\Module.php(455): yii\base\Controller->runAction('update', Array)

2 E:\xampp\htdocs\yii2shop\vendor\yiisoft\yii2\web\Application.php(83): yii\base\Module->runAction('order/update', Array)

3 E:\xampp\htdocs\yii2shop\vendor\yiisoft\yii2\base\Application.php(375): yii\web\Application->handleRequest(Object(yii\web\Request))

4 E:\xampp\htdocs\yii2shop\backend\web\index.php(18): yii\base\Application->run()

5 {main}

vikas225 commented 8 years ago

Interface 'yz\shoppingcart\CartPositionInterface' not found how can in get it

vikas225 commented 8 years ago

complete code is not here

samdark commented 8 years ago

via Composer.

vikas225 commented 8 years ago

Thanx for reply i have done successfully On 02-Apr-2016 6:14 pm, "Alexander Makarov" notifications@github.com wrote:

via Composer.

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/samdark/yii2-shop/issues/21#issuecomment-204708227