Hello John,
Felix deals with this issue in his slides from the CakeFest 2008:
http://www.thinkingphp.org/2008/02/26/with-jquery-cakephp-to-world-domination-slides/
(Starting at slide 22)
Regards, Christoph
On 8 Apr., 05:59, John R [EMAIL PROTECTED] wrote:
Is there an easy way with Cake to
Hi all!
While I was working on my local workstation, I've noticed something
strange, which might be related to the Cake core.
First of all, I'd like to point out that everything is working okay on
my live site, so it's definitely not my code causing the problem (my
live site is not in a
in Cake 1.2, I need some clarifications on ACL:
In the following code segment:
$aro-create();
$aro-save(array(
'model'='User',
'foreign_key'=null,
'parent_id'=null,
'alias'='Admin'));
1) what does the model refer to?
2) foreign key?
3) do we need to specify the id?
I think what you want for select options is this :
---
generateList(string $conditions, string $order, int $limit, string
$keyPath, string $valuePath)
This function is a shortcut to getting a list of key value pairs -
especially handy for creating an HTML select tag from a
Hello ...
I'm currently dealing with the same issue so I can share what've found
out and where I'm still stuck ... well, not really stuck, more where
my solution is not as neat as I'd like it to be.
In your controller you have to catch the filter, haven't found out how
to pass this
Does the Alias have to be unique? If so, then I was thinking that the alias
should be the Id of my Users table, not the name (which is not unique). In
this case, would the alias and the foreign_key of the aro be the same?
On Tue, Apr 8, 2008 at 12:43 AM, bob [EMAIL PROTECTED] wrote:
in Cake
Hi,
Am I getting this right? With the ACL component, AROs inherit their
permissions like this:
Group [denied something]
|- User [allowed something]
In this case, the explicitly granted permission on the User overrides
the general Group setting, allowing the User something specifically.
1) what does the model refer to?
2) foreign key?
As every model can have an ARO, using the pair (model,foreign_key) you
can associate an ARO with any other model in your application. This is
called polymorphic association (almost by AD7Six, here
Bug #3851,
https://trac.cakephp.org/ticket/3851
https://trac.cakephp.org/changeset/6342
It's fixed in current versions.
On Tue, Apr 8, 2008 at 6:01 AM, David Christopher Zentgraf
[EMAIL PROTECTED] wrote:
Hi,
Am I getting this right? With the ACL component, AROs inherit their
Those URLs are not loading for me right now,
but I'm experiencing this on a Nightly from April 5th (I think).
cake/libs/controller/components/acl.php:
/* SVN FILE: $Id: acl.php 6491 2008-03-01 03:12:12Z nate $ */
...
On 8 Apr 2008, at 20:17, Dardo Sordi Bogado wrote:
Bug #3851,
Can you post the SQL generated?
On Tue, Apr 8, 2008 at 8:47 AM, David Christopher Zentgraf
[EMAIL PROTECTED] wrote:
Those URLs are not loading for me right now,
but I'm experiencing this on a Nightly from April 5th (I think).
cake/libs/controller/components/acl.php:
/* SVN FILE: $Id:
For a locale-based solution, has anyone tried just using the \w
metachar, as in : `/^\w+$/` ?
According to the php docs:
A word character is any letter or digit or the underscore character,
that is, any character which can be part of a Perl word.
The definition of letters and digits is
SELECT `Aro`.`id`, `Aro`.`parent_id`, `Aro`.`model`,
`Aro`.`foreign_key`, `Aro`.`alias` FROM `aros` AS `Aro` LEFT JOIN
`aros` AS `Aro0` ON (`Aro`.`lft` = `Aro0`.`lft` AND `Aro`.`rght` =
`Aro0`.`rght`) WHERE `Aro0`.`model` = 'User' AND `Aro0`.`foreign_key`
= 3 ORDER BY `Aro`.`lft` DESC
It's looks exactly as the bug described.
Look in cake/libs/controller/components/acl.php
method check,
look for === -1, change to == -1. If it isn't there, probably you
need to put a couple of pr() and start debugging :(.
Before that, try with an fresh install of the latest svn.
On Tue,
Hi grigri,
I've just tried your solution : as in : `/^\w+$/`
It doesn't work... if I type some French accented characters or - in
an input called prenom.
Here is my $validate rule :
public $validate = array(
'prenom' = array(
Hi.
So the problem is this. I fetch data for a model which has a couple of
relations (hasMany, belongsTo...) and all of this end up in the data
array. And then i present this data in my edit form, where some of
this data is suppos to be edited, and some is suppos to be there just
to support the
No '=== -1' in there. :(
I'll look over it tomorrow and will probably reopen the ticket.
(What's up with cakephp.org right now? It's not loading... Is it just
me?)
Chrs,
Dav
On 8 Apr 2008, at 22:23, Dardo Sordi Bogado wrote:
It's looks exactly as the bug described.
Look in
Hello
The problem is that a model has some fields that the user may never
edit. I don't show them in the /edit view so they don't get posted (by
default). But manualy adding some of those private fields will result
in illegal save. I've noticed the secure method in the api of the
FormHelper to
In your call to $model-save() you can set the fields that can be
updated. All other fields will be ignored ...
On Tue, Apr 8, 2008 at 3:37 PM, Marcel [EMAIL PROTECTED] wrote:
Hello
The problem is that a model has some fields that the user may never
edit. I don't show them in the /edit
To use the FormHelper's secure method, just include the Security
component in your controller: it works automagically.
On Apr 8, 2:40 pm, Bert Van den Brande [EMAIL PROTECTED] wrote:
In your call to $model-save() you can set the fields that can be
updated. All other fields will be ignored ...
Yeah. Of course.
http://www.buscapets.com.br/files/php_speedy_cake.zip
I'll create a helper or anything like this and write a article at bakery.
Don't forgot to modify the index.php
Bye!
On Mon, Apr 7, 2008 at 2:14 PM, Axel Ariel Arroyo Braconi
[EMAIL PROTECTED] wrote:
can you post the
Haha, sweet ...
this link proves to be very helpfull
http://nik.chankov.net/2008/03/01/filtering-component-for-your-tables/
Point is, I did get pagination to work like I wanted but it seemed
ugly to me, not the kind of extremely elegant and short style I've
gotten used to with cake
see if anything in here helps you guys out:
http://groups.google.com/group/cake-php/browse_thread/thread/5ebdcf1115c9e4b2
On Apr 7, 12:07 pm, Kyle Decot [EMAIL PROTECTED] wrote:
I am creating a skatepark directory website, and I want to include a
filter/search box where you can search parks
Thanks for your anwsers!
@Bert: Think that method is pretty straight forward, havn't checked it
yet but I'm sure that will work without any problems
@grigri: Seems like it doesn't do it's job like it should in my
situation, do I need to configure something?
I think it has something to do with
Larry: Sorry, I did not see your message at first (google web-
interface). Here is what my Mac spits out:
int(4294967295)
int(2500072158)
int(-1794895138)
My Apache/PHP setup is out of the box Apple-standard. Apache-confs
are only added to setup vhosts and to allow Cake's .htaccess files to
take
I am very new to cakePHP and have been running the examples given in
the sites. I tried running a simple bookmark page by creating a
bookmarks table, bookmark model and a bookmarks_controller. The table
contains a id field which is auto_increment. When I try to insert a
new record, It gives me
Thanks for the answer, but meanwhile I have solved the problem.
I have tested some more, created forms with plain PHP/HTML and
searched the web.
My main system is Mandriva, I have tried the same tests with Ubuntu as
well. There it worked. 5000 fields - no problem.
To make it short:
Mandriva's
Hi, thanks for replying:
I did write the code just the way you did before, but I had the same
bug. Actually, the view is rendered perfectly, the way I wrote my code
is not the problem. Don't mind about the code, I found a weird
solution, and it's definitely a CakePhp bug. I found a guy that had
Now I'm confusedCDMoyer, you posted the link to the ticket, but did you
read it?
One reply says you need to reset(), the other reply says that the header
problem was fixed 6 months ago...
Right, this is not the header issue, and just like in the bug I
linked, reset() is not the ideal
Hi,
i would like to ask if there is anything like approximate match in
cakephp ?
lets say i have an eshop, and i am looking at product nokia 6120c, and
i want to show somewhere down other products such as nokia 3100, nokia
3310 and so ( 1 word match, not whole query)
or lets say i want to show
Where is one supposed to put generally applicable functions that
should be available throughout the application, or better still;
across several applications?
What I would prefer is to have a class, or several classes, containing
static functions, like:
?php
class StringFunctions
{
public
Martin,
I have already fixed this in the core. Please update to the latest branch
1.2.x.x from svn.
Related ticket: https://trac.cakephp.org/ticket/4420
--
/**
* @author Larry E. Masters
* @var string $userName
* @param string $realName
* @returns string aka PhpNut
* @access public
*/
On Tue,
Marcelius,
I have fixed the issues with multiple record forms in the latest svn branch
version of 1.2.x.x
You can grab the latest nightly release with the fixes:
http://cakephp.org/downloads/index/nightly/1.2.x.x
Everything should work properly if you are using the security component and
the
I don't get itWhat does the URL have to do with saveField?
How are you populating that $idItem variable? That right there would
be your problem.
This is not definitely a CakePHP bug unless you can provide more
information.
Why are we using saveField() in a viewItem anyway? But I digress,
OK, gotcha...
Posting fixes here isn't going to help dude...You heed to head over to trac
and submit a NEW ticket...
On Tue, Apr 8, 2008 at 1:05 AM, CDMoyer [EMAIL PROTECTED] wrote:
Now I'm confusedCDMoyer, you posted the link to the ticket, but did
you
read it?
One reply says you
Just curious ..
The only features I really use in an editor are code highlighting and
FTP ... all of the crazy PHP IDEs are incredibly bloated for me. What
do you all use?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
In the interim I guess you can just set your body manually in the
loop.
On Apr 8, 1:05 am, CDMoyer [EMAIL PROTECTED] wrote:
Now I'm confusedCDMoyer, you posted the link to the ticket, but did you
read it?
One reply says you need to reset(), the other reply says that the header
This has been discussed before.
Short answer: bootstrap.php
See the following:
http://groups.google.com/group/cake-php/search?group=cake-phpq=globally+available+functionqt_g=Search+this+group
http://img246.imageshack.us/my.php?image=usefulbookhj0.jpg
On Apr 8, 10:41 am, stefanb [EMAIL
On Apr 8, 2008, at 10:09 AM, John R wrote:
Just curious ..
The only features I really use in an editor are code highlighting and
FTP ... all of the crazy PHP IDEs are incredibly bloated for me. What
do you all use?
This topic has been covered a few times before - check the list
Hello guys,
I'm trying to use countercache to count the number of visible comments
a post has. This means that the count should only be added when the
active field is set to 1 (it's a sort of comment moderation system),
it's not a problem to set that up using counterScope.
So of course I've
that entirely based on how you write your app; that's not really
something a framework should/would do for you
On Apr 8, 4:50 am, qwecko [EMAIL PROTECTED] wrote:
Hi,
i would like to ask if there is anything like approximate match in
cakephp ?
lets say i have an eshop, and i am looking at
Sorry, my suggestions were for Cake1.2 only. I can't help you with the
older version.
On Mon, Apr 7, 2008 at 9:21 PM, fukawi2 [EMAIL PROTECTED] wrote:
Thanks b logica - I'm getting closer :)
I had to change the line above to this:
$this-set('brigades', $this-Member-Brigade-findAll());
If using a fairly newish MySQl you can use SOUNDS LIKE in your
query. Search around for MySQL soundex.
On Tue, Apr 8, 2008 at 4:50 AM, qwecko [EMAIL PROTECTED] wrote:
Hi,
i would like to ask if there is anything like approximate match in
cakephp ?
lets say i have an eshop, and i am
On Apr 8, 3:05 am, CDMoyer [EMAIL PROTECTED] wrote:
Now I'm confusedCDMoyer, you posted the link to the ticket, but did you
read it?
One reply says you need to reset(), the other reply says that the header
problem was fixed 6 months ago...
Right, this is not the header issue, and
Posting fixes here isn't going to help dude...You heed to head over to trac
and submit a NEW ticket...
I'm just following the instructions on Trac that say to always mail
the list first if you
think something is a bug. ;)
In the interim I guess you can just set your body manually in the
loop.
Does anyone have any idea?
On 7 abr, 20:25, elHobbit [EMAIL PROTECTED] wrote:
Thanks b logica.
But, I really need to use the validation rules in the User model.
I'll try to overwrite the validation rules for the fields I'm not
using in this view.
Anyway, I think the problem isn't that,
Also research about fulltext indexes, but this clearly outside the
scope of the framework.
On Tue, Apr 8, 2008 at 2:13 PM, b logica [EMAIL PROTECTED] wrote:
If using a fairly newish MySQl you can use SOUNDS LIKE in your
query. Search around for MySQL soundex.
On Tue, Apr 8, 2008 at
Try adding the line RewriteBase /cake/ (without quotes) to
your .htaccess file in the app/webroot folder.
-Joel.
On Apr 8, 3:28 am, dr. Hannibal Lecter [EMAIL PROTECTED] wrote:
Hi all!
While I was working on my local workstation, I've noticed something
strange, which might be related to
I have noticed this behavior as well.
It's because in Model::saveAll, the call to Model::save uses this-
data[$this-alias] instead of $this-data.
therefore if you have a data array that looks like
array(
'Model1' = array(data)
'Model2' = array(data)
)
and you call Model1-saveAll, guess what?
Hi,
I have the following structure:
Article belongsTo Cat
Cat hasMany Article
Now the problem is the size of my articles table (its got 180,000
entries). So to not auto-load 180,000 entries when doing a $this-Cat-
find(something) I had to disable recursion on my Cat (well, I
actually unbound
I talked to two PHP developers about creating a social networking sit
for a specific niche, and one recommended using a script (Dzoic or
Dolphin by Boonex) while the other one recommended using CakePHP or
CodeIgniter. The first guy argued that the scripts have everything in
place and they have
Hi group,
I have a complicated controller function that saves a couple of models
with a hasMany/belongsTo relationship. Since the models are dependent,
I have to save the parent before I can save the child.
What happens if my database server crashes in the middle of these
operations? My
can the Model be null. I only need the ACL to prevent guests and users
from accessing the Admin pages, and allow admin to access the Admin pages.
In this case, I have many controllers with Admin pages. Should I define ACOs
for each controller? Or have 1 ACO for all controllers?
On Tue, Apr 8,
What about a mix of the two: http://noserub.com/ ?
On Tue, Apr 8, 2008 at 5:12 PM, foongoos [EMAIL PROTECTED] wrote:
I talked to two PHP developers about creating a social networking sit
for a specific niche, and one recommended using a script (Dzoic or
Dolphin by Boonex) while the other
Choose one:
Model::id or unique alias.
Auth and the ACL Behavior works great with Model::id.
On Tue, Apr 8, 2008 at 7:11 PM, bob [EMAIL PROTECTED] wrote:
can the Model be null. I only need the ACL to prevent guests and users
from accessing the Admin pages, and allow admin to access the
countercache ?
On Tue, Apr 8, 2008 at 6:16 PM, Arne-Kolja Bachstein [EMAIL PROTECTED] wrote:
Hi,
I have the following structure:
Article belongsTo Cat
Cat hasMany Article
Now the problem is the size of my articles table (its got 180,000
entries). So to not auto-load 180,000
So we may decide to use EITHER 1) model and foreign_key columns or 2) alias
but not both right?
thanks
On Tue, Apr 8, 2008 at 3:14 PM, Dardo Sordi Bogado [EMAIL PROTECTED]
wrote:
Choose one:
Model::id or unique alias.
Auth and the ACL Behavior works great with Model::id.
On Tue, Apr 8,
I think I'm confusing myself. I've read several posts, but haven't
got the right solution.
I have a model called Properties that facilitates the addition,
deletion, or editing of a property.
Each property has 300 questions tied to it.
These question answers (boolean true/false) are found in
On Tue, Apr 8, 2008 at 5:51 PM, Matt [EMAIL PROTECTED] wrote:
How are database commits managed so that the parent save is rolled
back if the child save fails? If Cake handles this automagically, is
there a way to manually control it in non-standard situations?
I'm guessing that there is
for example look at
http://api.cakephp.org/1.2/class_dbo_mysql.html#3a64483094ce5a2e6c921e937245ae54
Model::begin()
Model::commit()
Model::rollback()
On Tue, Apr 8, 2008 at 11:51 PM, Matt [EMAIL PROTECTED] wrote:
Hi group,
I have a complicated controller function that saves a couple of
On Tue, Apr 8, 2008 at 7:26 PM, Marcin Domanski [EMAIL PROTECTED] wrote:
for example look at
http://api.cakephp.org/1.2/class_dbo_mysql.html#3a64483094ce5a2e6c921e937245ae54
Model::begin()
Model::commit()
Model::rollback()
Ignorance is bliss!
Something in the back of my mind told
I'm trying to work on LDAP auth and according to the tutorials I've
read it seems like I should be able to avoid having a db table for my
model by setting $useTable = false; For some reeason, however, this
doesn't appear to be working - I get this error: Error: Database table
users for model
Ignorance is bliss!
Chris you ignorant ;)
Something in the back of my mind told me that there was support. Of
course, your database has to support it but these days both MySQL and
Postgres do.
From what i see in the api most dbos support it so probably the dbs
support them too :)
btw
is it /app/models/user.php ?
Apart from that it should work - my guess would be - typo somewhere?
As for the ldap auth - maybe you can cach [EMAIL PROTECTED] he said [1]
something about making the AuthComponent with LDAP.
[1] http://logs.cakephp.nu/cakephp/chat.log.2008-04-08#line_18_08_adj
On
So I have a projects table and a categories table. Then I have a
projects_categories junction table for them. Well I need to be able to
associate an image to a projects category. So I put an image_id into
the projects_categories table. I can select things fine with this
layout but when I goto
We had a great response from the boards, and in only 2 days we have
amassed a growing community of members.
I hope that those of you who are LinkedIn members will consider
joining as well. If your not a LinkedIn member you should really
consider that in itself, but thats for another board.
Thanks for your reply Bert.
Okay... I've changed my Controller to do this:
$this-set('brigades', $this-Member-Brigade-generateList());
And my SELECT is built successfully using this:
$html-selectTag('Member/brigade_id', $brigades, null, array(), true)
BUT, I get this error on the page:
Hey, after reading through the tempdocs and such, I just started
setting up my cake environment. I'm having a little problem with
setting up my paths. This is my file system structure...
htdocs
/cake
/hhe
/app
/webroot
So Far I've tried changing the paths in
(Using distribution
Actually, I've come to my senses and I am going to use the development
setup for this. After reading some earlier posts on using 1 cake
install for multiple apps, it made me rethink my goals.
--~--~-~--~~~---~--~~
You received this message because you are
Tried with the latest Nightly (08.04.08), dumped all my tables,
set everything up again, still the same.
Opened a ticket for it: https://trac.cakephp.org/ticket/4450
On 8 Apr 2008, at 22:23, Dardo Sordi Bogado wrote:
It's looks exactly as the bug described.
Look in
Posted a possible fix in https://trac.cakephp.org/ticket/4450 .
Replace the loop on line 313 of cake/libs/controller/components/acl.php:
foreach ($perms as $perm) {
// The inner part stays, only the enclosing loop can go!
}
with:
$perm = $perms[count($perms) - 1];
Feedback would be
On Wed, Apr 9, 2008 at 5:16 AM, Marcin Domanski [EMAIL PROTECTED] wrote:
From what i see in the api most dbos support it so probably the dbs
support them too :)
True, If you are using a transaction supported DB tables then even saveAll
supports transactions
Tarique
--
Perfect. I got it now. It works as you indicated with no missing
controller error.
Side question, how would you get this to work if you weren't using
mod_rewrite (anything in the routes.php that you could configure for
that?). Mostly just curious...
Thanks,
G Kramer
On Apr 7, 5:24 am,
On Apr 8, 3:04 pm, grigri [EMAIL PROTECTED] wrote:
For a locale-based solution, has anyone tried just using the \w
metachar, as in : `/^\w+$/` ?
Does this work?
From what I could tell in PCRE's docs, how PCRE behaves is dependent
on how it is compiled. At least the i-modifier is, according
74 matches
Mail list logo