~~ERROR msg~~
Warning (512): DbAcl::check() - Failed ARO/ACO node lookup in
permissions check. Node references:
Aro: User::44
Aco: Post [CORE\cake\libs\controller\components\acl.php, line 273]
~~
The error is shown above. I solved this accidentally, maybe someone
could rectify if my solution is
Hi cricket ! you're awesome, thanks your working and explanation
solved the puzzle I had..
Amit, I will check that link out..thanks too.
Regards,
Maxim
On Dec 30, 12:54 pm, Amit Badkas wrote:
> Hi,
>
> By default, Auth component redirects to referrer page (if set) otherwise to
> the page set i
Hi,
The code doesn't seem to be as per CakePHP standard. However, you need to
handle onchange event of a select to save the selected option (probably
using an AJAX request).
Amit Badkas
PHP Applications for E-Biz: http://www.sanisoft.com
On Thu, Dec 30, 2010 at 12:58 AM, roundrightfarm
wrote:
Bit of a moot point for me... was using Username as an example, but its
actually not a username, so the only validation rule I have on the field is
isUnique...
also not using localization...
having said that, would be nice if the model validation rules supported
returning the input string in the m
Hi,
You said that first and last iterations failed to insert. Was there any
errors outputted? Try to
output $this->Enrollment->Appointment->validationErrors array for failed
data. Please remember to test this with debug level 2 so that it will output
errors (if any) as well as SQL queries.
Amit B
I guess I got your question correctly, what u want to do is Pre-Populate the
form on loading
I think you have to see the EDIT function in the BLOG tutorial of cakePHP.
There we actually PRE-POPULATE the data on the EDIT page .
Thanks
Karthikeyan P
On Thu, Dec 30, 2010 at 8:14 AM, Steve Mallett w
John
I think the class name conventions are correct as the code is a generated
one ..I didn't write the code.It was generated by "cake bake" command .
*" Model 'Comment' has a 'comments' table, not a 'Comments'
table. "*
I have not defined anywhere as *Comments* Table..I have done as *comments
Hi,
By default, Auth component redirects to referrer page (if set) otherwise to
the page set in loginRedirect. So you may need to overwrite
'Auth.redirect' session
parameter.
FYI, please have a look at http://book.cakephp.org/view/1270/loginRedirect
Amit Badkas
PHP Applications for E-Biz: http:
> Go to /orders/add and add some
> orders to the database.
Hi, may I know does it mean going to app/views/orders/add.ctp
which is a file we need to manually create or does it auto-create ?
>Is your app called 'app' ?
I'm not sure what you mean, my root folder is named cakephp, in there
I have:
Hi John L and John lyles,
Fixed it by simply creating the table following John L's table's
description. After that I got undefined PHP error which I placed what
John L's fix in his last post. I ran cake report> and I got empty
results:
C:\wamp\www\cakephp>cake report
♀
Welcome to CakePHP v1.3.6
Hi,
How do I pass data to a Form from the URL?
I have add.ctp:
Form->input('url', array(
'type' => 'text',
'value' => $this->params['url']
));
?>
Hitting localhost/links/add?url=http://cakephp.org produces the following error:
On Tue, Dec 28, 2010 at 5:22 PM, gilsilas wrote:
> hey,
>
> I want to send mail from different controllers in my application,
> and I wondering how to do that without declare the Email component
> data ( smtpOptions, from, etc ) in any method I want to send mail
> from.
>
> The app_controller is n
http://book.cakephp.org/view/1030/Complex-Find-Conditions
That should help you, read through how to build complex conditions
with subqueries and build the conditions array described. Once you
have your conditions array just pass it to $this-
>paginate($conditions); You should be all set.
Hope t
If the model names are Post and User then the table names should be
'posts' and 'users' lowercased. The field name is 'user_id' not
'UserId'. Model 'Comment' has a 'comments' table, not a 'Comments'
table. You have to respect CakePHP's File and Classname conventions,
see section 2.4.1 in the manual
>> But wouldn't this error message be displayed when *any* validation error
>> with the username field occurs? What if I also have validation checks for
>> whether it's >>empty, whether it's too short, whether it includes invalid
>> characters? Anyway, wouldn't I want to specify validation error
Hello,
Indexing the foreign keys would be ideal too..
Also you could override the core paginateCount, so its will not join 6 tables
at the count(*) query
http://book.cakephp.org/view/1237/Custom-Query-Pagination
I did it this way, its handled by the 'extra':
controller:
$this
On Dec 29, 2010, at 05:32, Aniruddh wrote:
> I need to work in an existing project developed in cake PHP 1.2. I am
> trying to configure my project in my local system. But i am unable to
> see the template in my first page. when i submit my first page form,
> it says Object not found!
>
> The p
On Dec 29, 2010, at 13:00, arron wrote:
> So i have a relationship table that has 6 tables the primary id is
> indexed as well as the models that paginate is using .
>
>
> The problem i am having with pagination is when i edit a row or add a
> row the SELECT COUNT(*) query takes forever aroun
On Dec 29, 2010, at 11:24, john lyles wrote:
> If your form looked something like this you would get the result you
> are looking for:
> echo $this->Form->input('username', array('error' =>
> $this->data['User']['username'] . ' is taken'));
And of course if you wanted that to be localizable:
e
I have a drop down menu in a view and I'm wondering
if i can send data based on the selected result to my database when it
is selected onmouseup.
the s are populated from the optional_share_products table.
I'd like to send data about the selected product (actually Item.id) to
the optional_share_u
So i have a relationship table that has 6 tables the primary id is
indexed as well as the models that paginate is using .
The problem i am having with pagination is when i edit a row or add a
row the SELECT COUNT(*) query takes forever around 11956MS it also
maxes out my CPU for about 8 seconds
I have a table of a number of issues
id, number, year, user_id
1 | 1 | 2009 | 1
2 | 2 | 2009 | 1
3 | 3 | 2009 | 1
4 | 1 | 2010 | 1
5 | 2 | 2010 | 1
and for each user_id I want to retrieve the greatest number grouped by
year.
I could solve my problem with the following query:
SELECT `Issue`.`id`
I have created a Blog Application using a base table as 'Posts'. Later
Model-Associated with another table 'Users' with 'belongsTo'
relationship like below in the MODEL
var $belongsTo = array(
'User' => array(
'className' => 'User',
'foreignKey' => 'user_id',
'conditions' => '',
'fields' => '',
'o
Hi,
I need to work in an existing project developed in cake PHP 1.2. I am
trying to configure my project in my local system. But i am unable to
see the template in my first page. when i submit my first page form,
it says Object not found!
The project was in the server like :
http://sitename.co
Hi everyone,
I just need some help on inserting records using loops.
To give you an overview, I have programs that run for a certain number
of days and this code will insert a separate row for each appointment
record. The problem is that the loop fails at the first iteration.
Another weird thing
hey,
I want to send mail from different controllers in my application,
and I wondering how to do that without declare the Email component
data ( smtpOptions, from, etc ) in any method I want to send mail
from.
The app_controller is not an option because the Email component is use
only in few cont
Larry pointed this out earlier
>
>
>> you might add a new table to your database, it is easier to create the
>> controller/model combination while you are creating all of the fields in
>> your new table and see how it is working instead of going to the command
>> line every change you make.
>
>
> s
Larry pointed this out earlier
> you might add a new table to your database, it is easier to create the
> controller/model combination while you are creating all of the fields in
> your new table and see how it is working instead of going to the command
> line every change you make.
scaffolding
On Wed, Dec 29, 2010 at 2:46 PM, Dave Maharaj wrote:
> Ok well if someFunction is getting the $id of being asked and the conditions
> are getting the record where $id = Model.id and Model.user_id = Auth then is
> that not checking? How is that different than read id then compare the data?
>
> If t
Ok well if someFunction is getting the $id of being asked and the conditions
are getting the record where $id = Model.id and Model.user_id = Auth then is
that not checking? How is that different than read id then compare the data?
If there is no "match" with id and auth nothing is pulled correct..
Ok, so i'm trying to break old habits of putting all my javascript in a
file, and have decided to try out the JS helper.
Basic rundown is a form with a select, that loads other elements of the form
via Js->request based on the selection in the select box.
is there a way to get the value of the se
thanks!
On Thu, Dec 30, 2010 at 3:24 AM, john lyles wrote:
> You can override the error message using FormHelper :http://
> book.cakephp.org/view/1401/options-error
> If your form looked something like this you would get the result you
> are looking for:
> echo $this->Form->input('username', arra
On Tue, Dec 28, 2010 at 11:58 PM, John Maxim wrote:
> Users_controllers.php:
>
>
> var $name = 'Users';
>
> /*some codes in between*/
>
> function login()
> {
> if(!empty($this->data))
> {
> // If the username/password match
> if($this->Auth->log
On Wed, Dec 29, 2010 at 12:23 AM, Dave Maharaj wrote:
>
> Because in the first example the $id will read from the db no matter what as
> long as $id is passed and $id is in the db so your going to the db no matter
> what and reading the data.
> In my way with $data = $this->Model->someFunction( $i
Why is scaffolding an option when baking since baking CRUD actions and views
is so easy? This I never understood
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You received this message because you are subscribed to the Google Gr
Why is scaffolding an option when baking since baking when CRUD actions and
views is so easy? This I never understood
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You received this message because you are subscribed to the Goog
This table works for the tutorial:
CREATE TABLE orders(
id INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
amount DEC(5,2),
created DATETIME,
shipped DATETIME
);
Then bake the model, controller and views. Go to /orders/add and add some
orders to the database. Assuming the cake command is in your PA
Do you have a model called Order and a database table called orders?
And if you do, does your table have the fields the error message says
are missing. The tutorial doesn't say (but maybe it should this stuff
needs to exist).
On Dec 29, 12:36 pm, john lyles wrote:
> Is your app called 'app' ? Als
Is your app called 'app' ? Also if you do only the first step of the
tutorial, this part,
and then do: cake report, what happens then?
On Dec 29, 11:33 am, John Maxim wrote:
> I'm suspecting something's wrong with my paths:
> ~~~
> ♀
> Welcome to CakePHP v1.3.6 Console
> -
You can override the error message using FormHelper :http://
book.cakephp.org/view/1401/options-error
If your form looked something like this you would get the result you
are looking for:
echo $this->Form->input('username', array('error' => $this-
>data['User']['username'] . ' is taken'));
On Dec
I find scaffold is useful when mucking about with the data model...
once i'm happy with that i go back and bake out the basic CRUD and go from
there.
On Thu, Dec 30, 2010 at 2:26 AM, John Maxim wrote:
> Hi everyone,
>
> Thanks I'm learning Bake at the moment. I thought scaffolding can be
> used
You are not telling it to look in the right place. You are giving a
location of .message but in fact it is located at div.message, the div
in this case being div id="content". Remove this div and then .message
would make sense. It also matters if you put your styles before or
after you include the
I'm suspecting something's wrong with my paths:
~~~
♀
Welcome to CakePHP v1.3.6 Console
---
Current Paths:
-app: app
-working: C:\wamp\www\cakephp\app
-root: C:\wamp\www\cakephp
-core: C:\wamp\www\cakephp
Changing Paths:
your working
Hi everyone,
Thanks I'm learning Bake at the moment. I thought scaffolding can be
used for production. Anyway thanks for clarifying.
Regards,
Maxim
On Dec 30, 12:12 am, "Larry E. Masters" wrote:
> I would not use scaffolding in production, it was never intended for that
> purpose. It has nothin
http://book.cakephp.org/view/1107/Creating-Shells-Tasks
Hi,
While going through the tutorial above, as I run
>cake report
Error: Missing database table 'orders' for model 'Order'
-
Do we need to create one ? I created one but just to find out more
errors after running the second
I would not use scaffolding in production, it was never intended for that
purpose. It has nothing to do with security or being unstable.
The only purpose for scaffolding is to prototype and develop your
models/database.
Bake is used to get you closer to a production code base. You can customize
y
Hi,
I'm trying to make my validation messages a little more meaningful.
I would like to include the failed input in the validation message itself.
So rather than a message like "That username is already taken"
I would like to show "The username is already taken"
Is this possible?
Check out th
Hello,
I want to change the appearance of the default message (edit success).
I have put the following code in the standard layout:
.message
{
position:absolute;
top:0px;
left:100px;
width:300px;
font-size:14px;
background-color:green;
}
It works but the backgroun
Thanks Sam, that youtube tutorial helped. I'm continuing with the link
you sent earlier, right after finishing the cookbook soon..hopefully.
Regards,
Maxim
On Dec 29, 10:07 pm, Sam Sherlock wrote:
> setting cake for commandline is easy - don't be put off
>
> it take minutes
>
> windows or *nix (
yes sir. i got it...
The bottm line is.. The naming CONVENTIONS must be kept in mind...
I got errors about undefined variables in my view. And when i Corrected some
variable names in the controller, it worked fine!!!
On Wed, Dec 29, 2010 at 7:58 PM, Renato de Freitas Freire <
renat...@gmail.com>
Hi John,
The main difference between scaffold and bake is bake will generate the PHP
code (model, controller,view) and you can customize it how you want. When
I'm developing I start using bake to generate all CRUD and after I start to
change the generated code.
If the scaffolding is OK for you (w
Scaffold was implemented before bake was added to the core so it has stayed.
There are cases when you might add a new table to your database, it is
easier to create the controller/model combination while you are creating all
of the fields in your new table and see how it is working instead of goin
E point is: Cakephp IS PHP.
Of course you can use cake + php.
There is no meaning your question.
Did you even tried to do what you are asking?
You have the full power of your application in your hands.
If you want to write some specific code (html or php), just do it!
Got it?
On Wednesday, De
setting cake for commandline is easy - don't be put off
it take minutes
windows or *nix (these require quicktime - I think)
http://cakephp.org/screencasts
or (windows setup on youtube)
http://www.youtube.com/watch?v=21Rt9HgITig&feature=related
you won't regret setting this up - it opens so many
Hi Sam,
I tried quite a number of times logging in IRC on cake but there were
always connection failure or something..given up and use googlegroup
as of now..
I can't carry on with the link you recommended; it asks me to be
familiar with console, I'm not, I don't know what/how exactly to begin
wi
Hi,
I used scaffolding.. it was quite easy and fast. But I learned that
Bake is a better way...
Any comment why there is scaffold in the first place since it would be
replaced with Bake later on when developing a programme?
Regards,
Maxim
Check out the new CakePHP Questions site http://cakeqs.
you'll find that ACL is a heavy task.
setting up a dummy application (own db files etc) -- deleting and
reinstating things over and over will make things clearer
trail and error extremely useful when learning ACL. if you back up the db
in between and compare what differences after doing things
Thanks Sam, it's clearer now...but still struggling with Acl; I was
confused when I hear the word "populate" a general term. In oracle, I
populated db/tables/sql scripts in a batch file, last time. So it
brought me a meaning of the same when I hear it again. Now I know it
could mean using command l
Hi John,
you want to setup cake so you can use it from commandline
bake is one part of cakes commandline
also acl too: (output from commandline)
$ cake acl
Available ACL commands:
- create
- delete
- setParent
- getPath
- check
- grant
Hi Chris,
You need to adjust the way you update in controller
function admin_points()
{
if($this->data)
{
$this->FocikiUser->id = 'id which you want to update';
$this-> FocikiUser->setField('featured_video_points
',$this->data['User']['featured_video_points']);
}
$result=$this->F
Hi guys, How yo.. guys doinnn...
I need help calling "$point" from User Table... I'm getting this
error...
Notice (8): Undefined index: data [CORE/app/controllers/
videos_controller.php, line 17] Apparently, I admit,.. lol... I don't
know how to do this in CAKE. Can some one please help... This is
Another reason to use the form helper is the error handling
if your marking the form yourself you'd lose this.
Taking the time to learn to use the form helper really pays off.
- S
On 29 December 2010 04:08, cricket wrote:
> On Tue, Dec 28, 2010 at 3:27 PM, euromark
> wrote:
> > no, you c
Is Bake continued from scaffolding ? can I jump straight to learn
Bake ?
Must we use Bake to populate the Acl tables ?
Regards,
Maxim
On Dec 29, 6:12 pm, Amit Badkas wrote:
> Hi,
>
> My question was 'are the ACL tables (aros, acos and aros_acos) populated
> correctly?', please refer
> tohttp:
Hi,
My question was 'are the ACL tables (aros, acos and aros_acos) populated
correctly?', please refer to
http://book.cakephp.org/view/1543/Simple-Acl-controlled-Application to
understand how to populate ACL tables.
Amit Badkas
PHP Applications for E-Biz: http://www.sanisoft.com
On Wed, Dec 2
Hi,
Can anyone tell me how to get data(scrap it) from google adword keyword tool
for a particular keyword?
Thanks and Regards,
Amit
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You received this message because you are subscr
Thanks Amit,
Yes, the first undefined: is solved, I posted a post before yours. I
ran the DB sql scripts with no error. The sql is as follow:
CREATE TABLE acos (
id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT,
parent_id INTEGER(10) DEFAULT NULL,
model VARCHAR(255) DEFAULT '',
forei
> Notice (8): Undefined index: content [APP\views\posts\index.ctp, line
> 7]
~
Solved the error above, just minor mistake..
Now left unsolved is:
> Warning (512): DbAcl::check() - Failed ARO/ACO node lookup in
> permissions check. Node references:
> Aro: User::44
> Aco: Post [CORE\cake\
Hi,
About 'Undefined index: content' error, you should already know how to fix
it.
About 'DbAcl::check() - Failed ARO/ACO node lookup in permissions check'
error, are the ACL tables (aros, acos and aros_acos) populated correctly?
Amit Badkas
PHP Applications for E-Biz: http://www.sanisoft.com
Hi Amit, Thanks...!
I just put it in the controllers components--access.php:
--
user = $this->Auth->user();
}
function check($aco, $action='*'){
if(!empty($this->user) && $this->Acl->check('User::'.$this-
>user['User']['id'], $aco, $action)){
Hi,
Have you had AccessComponent class defined in
app/controllers/components/access.php?
Amit Badkas
PHP Applications for E-Biz: http://www.sanisoft.com
On Wed, Dec 29, 2010 at 1:30 PM, John Maxim wrote:
> class AccessHelper extends Helper{
>var $helpers = array("Session");
>
Access = new AccessComponent();
App::import('Component', 'Auth');
$this->Auth = new AuthComponent();
$this->Auth->Session = $this->Session;
$this->user = $this->Auth->user();
}
function check($aco, $action='*'){
71 matches
Mail list logo