Note that there are some explanatory texts on larger screens.

plurals
  1. POCakephp baking view problems on mac os
    text
    copied!<p>im new to cake and i have some problems while baking... I'm using cake php 2.2.1 on a MAMP server on MAc OS. I have turned off plurar/singlar infector... And i try to bake some tables:</p> <pre><code>CREATE TABLE users ( id INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, username VARCHAR(255) NOT NULL UNIQUE, password CHAR(40) NOT NULL, email VARCHAR(40) NOT NULL, group_id INT(11) NOT NULL, created DATETIME, modified DATETIME );# MySQL returned an empty result set (i.e. zero rows). CREATE TABLE users_groups ( id INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHAR(100) NOT NULL, created DATETIME, modified DATETIME );# MySQL returned an empty result set (i.e. zero rows). CREATE TABLE novosti ( id INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, url VARCHAR(255) NOT NULL UNIQUE KEY, user_id INT(11) NOT NULL, title VARCHAR(255) NOT NULL, body TEXT, published INT(1) DEFAULT 1, created DATETIME, modified DATETIME );# MySQL returned an empty result set (i.e. zero rows). CREATE TABLE meta ( id INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, controller VARCHAR(255) NOT NULL UNIQUE KEY, action_name VARCHAR(255) NOT NULL, action_id VARCHAR(255), title VARCHAR(255) NOT NULL, keywords VARCHAR(255) NOT NULL, description VARCHAR(255) NOT NULL, created DATETIME, modified DATETIME );# MySQL returned an empty result set (i.e. zero rows). </code></pre> <p>So when i "cake bake all" - "users_groups" i dont get errors, but if "cake bake all" other 3 tables i get the same error, so i get a model and a controller file but not the view file... So the problem is in baking view files.. Here is my console log: </p> <pre><code>What would you like to Bake? (D/M/V/C/P/F/T/Q) &gt; v --------------------------------------------------------------- Bake View Path: /Applications/MAMP/htdocs/app/View/ --------------------------------------------------------------- Use Database Config: (default/test) [default] &gt; Possible Controllers based on your current database: --------------------------------------------------------------- 1. Meta 2. Novosti 3. Users 4. UsersGroups Enter a number from the list above, type in the name of another controller, or 'q' to exit [q] &gt; 1 Would you like bake to build your views interactively? Warning: Choosing no will overwrite Meta views if it exist. (y/n) [n] &gt; y Would you like to create some CRUD views (index, add, view, edit) for this controller? NOTE: Before doing so, you'll need to create your controller and model classes (including associated models). (y/n) [y] &gt; y Would you like to create the views for admin routing? (y/n) [n] &gt; n Error: Table action for model Action was not found in datasource default. #0 /Applications/MAMP/htdocs/lib/Cake/Model/Model.php(3180): Model-&gt;setSource('action') #1 /Applications/MAMP/htdocs/lib/Cake/Model/Model.php(1301): Model-&gt;getDataSource() #2 /Applications/MAMP/htdocs/lib/Cake/Model/Model.php(1389): Model-&gt;schema() #3 /Applications/MAMP/htdocs/lib/Cake/Model/Model.php(1375): Model-&gt;hasField('title', false) #4 /Applications/MAMP/htdocs/lib/Cake/Model/Model.php(863): Model-&gt;hasField(Array) #5 /Applications/MAMP/htdocs/lib/Cake/Console/Command/Task/ViewTask.php(459): Model-&gt;__get('displayField') #6 /Applications/MAMP/htdocs/lib/Cake/Console/Command/Task/ViewTask.php(284): ViewTask-&gt;_associations(Object(Meta)) #7 /Applications/MAMP/htdocs/lib/Cake/Console/Command/Task/ViewTask.php(223): ViewTask-&gt;_loadController() #8 /Applications/MAMP/htdocs/lib/Cake/Console/Command/Task/ViewTask.php(90): ViewTask-&gt;_interactive() #9 /Applications/MAMP/htdocs/lib/Cake/Console/Command/BakeShell.php(110): ViewTask-&gt;execute() #10 /Applications/MAMP/htdocs/lib/Cake/Console/Command/BakeShell.php(131): BakeShell-&gt;main() #11 /Applications/MAMP/htdocs/lib/Cake/Console/Command/BakeShell.php(131): BakeShell-&gt;main() #12 /Applications/MAMP/htdocs/lib/Cake/Console/Shell.php(393): BakeShell-&gt;main() #13 /Applications/MAMP/htdocs/lib/Cake/Console/ShellDispatcher.php(201): Shell-&gt;runCommand(NULL, Array) #14 /Applications/MAMP/htdocs/lib/Cake/Console/ShellDispatcher.php(69): ShellDispatcher-&gt;dispatch() #15 /Applications/MAMP/htdocs/app/Console/cake.php(33): ShellDispatcher::run(Array) #16 {main} </code></pre> <p>Help plz guys %)</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload