goFrendiAsgard / No-CMS

No-CMS, A CodeIgniter Based CMS Framework
299 stars 199 forks source link

nordrassil generator #53

Closed izdrail closed 11 years ago

izdrail commented 11 years ago

HY i'm tring to create a module using nordrassil ,but i have very big problems ....

i have a site tabel with 3 columns : site_id ,name,category_id i have a category tabel with two coloms category_id category name

i follow your tutorial and doo the thig with the lookup tabel

the module is creeated succesful , but when i enter into the module and try to add data ..i recive an error from grocery crud ,that the tabels dosent exist , on the link you can find the generated module ... i thing is a problem with the cms_helper http://www18.zippyshare.com/v/42737135/file.html

goFrendiAsgard commented 11 years ago

Hi Necuratu, I've inspect your attached module. The problem laid on assets/db/install.sql and assets/db/uninstall.sql Do you write them manually, or do you use nordrassil to generate them? The newest version of Nordrassil should generate something like this:

CREATE TABLE `{{ complete_table_name:site_siteuri }}` (
  `site_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `site_name` varchar(100),
  `category_id` int(10),
  PRIMARY KEY (`site_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*split*/

CREATE TABLE `{{ complete_table_name:site_categorii }}` (
  `category_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `category_name` varchar(100),
  PRIMARY KEY (`category_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

Are you sure that you've use the newest stable version from https://github.com/goFrendiAsgard/No-CMS?

Thanks

izdrail commented 11 years ago

yes i've seen in your example.php ...but is not generating like this .... ok maybe i have an old version of nodrasil ...i will try to update and return back

goFrendiAsgard commented 11 years ago

Or maybe you have your old files not writable. In this case, doing chmod 777 or simply delete the old generated module might solve the problem.

Okay, please tell me if you still face this problem.

izdrail commented 11 years ago

is the same ,i've downlaod the lates one instaled created a new module but is the same thing it's creeating the sql files like that ...

goFrendiAsgard commented 11 years ago

Okay confirmed. Do you let project's table prefix blank? For temporary work-around, set the project table prefix into 'site' Thanks for reporting this.

izdrail commented 11 years ago

yes this is what i'm dooing ... i leave that blank ....

goFrendiAsgard commented 11 years ago

Okay, I've fix this bug, commit to development branch, do some test, and merge it to master branch. So you can download the bug-fix here https://github.com/goFrendiAsgard/No-CMS . Tell me if you still have a problem, or have another problem :)

izdrail commented 11 years ago

made the update but still dosent work .. maybe i'm dooing something wrong

goFrendiAsgard commented 11 years ago

Is the sql generated correctly?

izdrail commented 11 years ago

whait becuase i'm testing some thing ...i think now the problem is if i add the tabel prefix on the project template

goFrendiAsgard commented 11 years ago

testing something? What do you do?

izdrail commented 11 years ago

ok ,i replay ,it's working now ...perfect i was tring to create the module without the name on tabel prefix ...

goFrendiAsgard commented 11 years ago

great :+1:

izdrail commented 11 years ago

great work you dooing with this cms .. i was thinking to create a shop module for him..in the near future ...but now i whant to play with your python framework also ...