redooor / redminportal

A Laravel package as a backend administrating tool for Content Management and Ecommerce sites.
MIT License
43 stars 16 forks source link

error occurs when create new category #37

Closed feryonline closed 9 years ago

feryonline commented 9 years ago

I'm sorry for my bad english!

when i try to create new category this error occurs:

Illuminate \ Database \ QueryException (23000)

SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (laravel42_redminportal.categories, CONSTRAINT categories_category_id_foreign FOREIGN KEY (category_id) REFERENCES categories (id)) (SQL: insert into categories (name, short_description, long_description, active, order, options, category_id, updated_at, created_at) values (My Category, Test cat, Test Category, 1, 0, {"name":null,"short_description":null,"long_description":null}, 0, 2014-12-26 16:02:38, 2014-12-26 16:02:38))

kongnir commented 9 years ago

Hi @feryonline, May I know which version or commit are you at? Are you using SQLite or MySQL?

feryonline commented 9 years ago

Hi @kongnir I have installed latest version of the RedminPortal at localhost with this specifications:

XAMPP 1.8.3 PHP 5.5.15 Database server: Server: 127.0.0.1 via TCP/IP Server type: MySQL Server version: 5.6.20 - MySQL Community Server (GPL) Protocol version: 10 Server charset: UTF-8 Unicode (utf8)

thank you for your attention

kongnir commented 9 years ago

Thanks @feryonline. I'll try to replicate your environment and see if I can reproduce the same error.

kongnir commented 9 years ago

@feryonline, I've found the problem and resolved it at commit 3b79d34. Please sync to the latest commit and see if it resolves the issue. Let me know if it works so I can close this issue.

feryonline commented 9 years ago

thank you very much dear @kongnir , this problem is solved!

I'm new in laravel and I'm going to build a eshop site like digikala.com, demo.sylius.org, shop.ca, ..... can i build it with RedminPortal?

kongnir commented 9 years ago

Hi @feryonline, RedminPortal provides the backend for content management. You can build anything with it. But for an online store, you may need other third party plugins like PayPal payment gateway to allow online purchases. RedminPortal doesn't provide that built-in.

feryonline commented 9 years ago

Thanks @kongnir , I'm going to use https://github.com/Crinsane/LaravelShoppingcart or https://github.com/moltin/laravel-cart with RedminPortal for build an online store.

Or if you have any best solution to build this with laravel, please tell me.

kongnir commented 9 years ago

Hi @feryonline, moltin/laravel-cart looks abandoned, the last update was 7 months ago. Crinsane/LaravelShoppingcart looks promising, but note that RedminPortal is still using Laravel 4.2, so you should try Crinsane/LaravelShoppingcart v1.2 instead. Laravel 5 is still under development. We'll probably upgrade to it when it's officially released.

feryonline commented 9 years ago

Thank you very much @kongnir