Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Bake of controller error in 2.3.0-RC2 and 2.2.5.
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
David Chappel  
View profile  
 More options Jan 25, 2:57 pm
From: David Chappel <david.chap...@gmail.com>
Date: Fri, 25 Jan 2013 11:57:29 -0800 (PST)
Local: Fri, Jan 25 2013 2:57 pm
Subject: Bake of controller error in 2.3.0-RC2 and 2.2.5.

When I bake a certain controller, I get an issue where the sql has a
directory added.  Any ideas?
(The [app directory] part is my edit.  The directory is correct.)

.........AS "Folder" LEFT JOIN "public"."folders" AS "ParentFolder" ON
("Folder"."parent_id" = "ParentFolder"."id") LEFT JOIN "public"."users" AS
"User" ON ("Folder"."user_id" = "User"."id") LEFT JOIN
"public"."content_access_roles" AS "ContentAccessRole" ON
("Folder"."content_access_role_id" = "ContentAccessRole"."id")  WHERE
"Folder"."id" = '[app directory]/lib/Cake/Console/Templates/default'    
LIMIT 1

Yes, it actually throw the Templates/default directory name and full path
into the SQL string. Which postgresql throws up on.

Error: SQLSTATE[22P02]: Invalid text representation: 7 ERROR:  invalid
input syntax for integer: "[app
directory]/lib/Cake/Console/Templates/default"
LINE 1: ...ic"."folders" AS "Folder"   WHERE "Folder"."id" = '[app
directory]...
                                                             ^
#0 [app directory]/lib/Cake/Model/Datasource/DboSource.php(459):
PDOStatement->execute(Array)
#1 [app directory]/lib/Cake/Model/Datasource/DboSource.php(425):
DboSource->_execute('SELECT "Folder"...', Array)
#2 [app directory]/lib/Cake/Model/Datasource/DboSource.php(669):
DboSource->execute('SELECT "Folder"...', Array, Array)
#3 [app directory]/lib/Cake/Model/Datasource/DboSource.php(1080):
DboSource->fetchAll('SELECT "Folder"...', false)
#4 [app directory]/lib/Cake/Model/Model.php(2642):
DboSource->read(Object(Folder), Array)
#5 [app directory]/lib/Cake/Model/Model.php(1519): Model->find('first',
Array)
#6 [app directory]/lib/Cake/Console/Command/Task/TemplateTask.php(76):
Model->read()
#7 [app directory]/lib/Cake/Console/Command/Task/TemplateTask.php(51):
TemplateTask->_findThemes()
#8 [app directory]/lib/Cake/Console/Shell.php(443):
TemplateTask->initialize()
#9 [app directory]/lib/Cake/Console/Command/Task/ControllerTask.php(293):
Shell->__get('Template')
#10 [app directory]/lib/Cake/Console/Command/Task/ControllerTask.php(178):
ControllerTask->bakeActions('Folders', NULL, true)
#11 [app directory]/lib/Cake/Console/Command/Task/ControllerTask.php(61):
ControllerTask->_interactive()
#12 [app directory]/lib/Cake/Console/Command/BakeShell.php(113):
ControllerTask->execute()
#13 [app directory]/lib/Cake/Console/Shell.php(395): BakeShell->main()
#14 [app directory]/lib/Cake/Console/ShellDispatcher.php(201):
Shell->runCommand(NULL, Array)
#15 [app directory]/lib/Cake/Console/ShellDispatcher.php(69):
ShellDispatcher->dispatch()
#16 [app directory]/app/Console/cake.php(33): ShellDispatcher::run(Array)
#17 {main}

My Postgres table:

CREATE TABLE folders(
    id serial NOT NULL PRIMARY KEY,
    parent_id integer DEFAULT NULL, -- tree behaviour
    lft integer default NULL,
    rght integer default NULL,
    is_valid boolean default true,
    title varchar(255),
    creation_date timestamp default NOW(),
    user_id integer REFERENCES users(id),
    xml_import_field varchar(255),
    ordinal integer default 0,
    content_access_role_id integer
);


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David Chappel  
View profile  
 More options Jan 26, 7:03 am
From: David Chappel <david.chap...@gmail.com>
Date: Sat, 26 Jan 2013 04:03:00 -0800 (PST)
Subject: Bake of controller error in 2.3.0-RC2 and 2.2.5.

Changing the table name from "folders" to "foolders" corrects the issue, thanks.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
AD7six  
View profile  
 More options Jan 26, 1:31 pm
From: AD7six <andydawso...@gmail.com>
Date: Sat, 26 Jan 2013 10:31:39 -0800 (PST)
Local: Sat, Jan 26 2013 1:31 pm
Subject: Re: Bake of controller error in 2.3.0-RC2 and 2.2.5.

Folder is an internal class name,

As you may have realized - you cannot have a model named Folder.

AD


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »