Creating Models from existing tables doesn't work
-
Kris Jordan
- State changed from new to open
Interesting and unable to reproduce. Which internet browser are you using? This is likely an issue with the Javascript client side improperly submitting the form.
-
Schirkan
Hello,
I'm using the latest version of Firefox, but I don't think, that's the problem.
I think I found the problem in the HTML-code:
<h3><input name="tableExists" value="__yes__" type="radio"> Table does not exist.</h3> [...] <h3><input name="tableExists" value="__no__" type="radio"> Table already exists.</h3>I think the values have to be interchanged.
This was the corresponding Request & Response
POST /recess/recess/apps/app/SnippetsApplication/model/gen HTTP/1.1 Host: schirkan.de User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.0.6) Gecko/2009011913 Firefox/3.0.6 (.NET CLR 3.5.30729) FirePHP/0.2.1 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Referer: http://schirkan.de/recess/recess/apps/app/SnippetsApplication/model/gen Cookie: PHPSESSID=0dc1b4d4729ea232389568a9f83b0d2d Content-Type: application/x-www-form-urlencoded Content-Length: 91 modelName=Category&tableExists=no&existingDataSource=Default&existingTableName=sn_categorys HTTP/1.x 500 Internal Server Error Date: Thu, 05 Feb 2009 21:00:40 GMT Server: Apache/2.2.3 (Debian) mod_ssl/2.2.3 OpenSSL/0.9.8c X-Powered-By: PHP/5.2.6-0.dotdeb.1 Connection: close Transfer-Encoding: chunked Content-Type: text/html -
Luiz Alberto Zaiats
Just wondering why:
modelName=Category&tableExists=no&existingDataSource=Default&existingTableName=sn_categorys
Doesn't make sense to me... How could it have a tableExists=no and a existingTableName=sn_categorys ?
LZ
-
Kris Jordan
- Milestone changed from 0.11.1 to 0.12
Moving this ticket to the next maintenance release due out shortly: 0.11.2
-
Kris Jordan
- State changed from open to resolved
Fixed the pointed out logic error in commit 8611f453
Still don't believe this is at the root of your problem as the post content does not have a fields[] array. This leads me to suspect something in the jQuery went wrong but I've tested in the latest Firefox release without fail.
-
simon.rycroft
This problem still exists for me in version 0.20. Replicated in in Firefox and IE.
If I try to create a model based on an existing database I get:
Undefined index: fields
Location: Line 208 of D:\xampp\htdocs\recess\recess\recess\apps\tools\controllers\RecessToolsAppsController.class.php
Any ideas please?
-
simon.rycroft
Well I think I just found a bug :-(
If you select an existing datasource and click 'Generate Model' it errors out with 'undefined index'.
However if you go back the the 'ew Model Helper' page, select 'Table does not exist' and then change it to 'Table already exists' the model will be generated correctly.
I'm surprised more people haven't reported this.
-
ehpc
- Milestone order changed from 0 to 0
Have the same issue in 0.20. Firefox 3.6.6. And unlike simon.rycroft, I cannot get it to work...
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.