Well I have
---
controller
--
function hide() {
echo "hello";
}
---
jquery
---
$("a.hide").click(function() {
$.post('hide', {}, function() {
alert('saved.');
});
retur
I had the same problem a while back, search the group for it.
The problem is that the first time a translation is done, i.e. the
__() function is used, the language is locked and cannot be changed
anymore for the rest of the page execution. (Actually, rightly so,
otherwise you might get half
"Executing" a controller action is just doing a page request.
If you type /myapp/controller/hide into the browser,
Controller::hide() will be executed.
If you do an AJAX request to /myapp/controller/hide,
Controller::hide() will be executed just the same.
Where's the problem? :-3
On 12 Sep 2
Hi guys,
after spending some more time I solved my problem with authError and
loginError messages of the Auth component only displaying in the
default language.
Just in case somebody has the same problem I post the solution. :-)
This is my app_controller.php file where only the L10n part and the
ok i've been looking online for several hours now and can't find
anything, so here i am!
basically I have an announcment div (#announcement) that I show on my
page. The user can click a text link, "don't show" and I want it to
slideUp, then save their setting (in a DB).
My problem is accessing t
Hi Seb,
> I have a big application to migrate to cakephp 1.2.
> I have very very a lot of problems during this migration.
>
> - When using the findBy function, the Behaviors object from cake/libs/
> model/model.php is not recognized as an object.
>
> - A lot of things does not work about the mod
Thanks Bernhard! you are right, I just wrote some code to verify that.
The function rollback/commit is defined in Model class, which made me
confused ( I thought the transaction is on the table level)
On Sep 11, 1:23 am, "Bernhard J. M. Grün"
<[EMAIL PROTECTED]> wrote:
> It is already on databas
You're doing it exactly the way you described it:
http://book.cakephp.org/view/81/belongsTo
http://book.cakephp.org/view/82/hasMany
On 12 Sep 2008, at 07:41, VitillO wrote:
>
> This is the case, i have a tables "products", "categories". Normally i
> would link a category to a product using produ
This is the case, i have a tables "products", "categories". Normally i
would link a category to a product using product.category_id, and
since a category can be assigned to many products i dont have a
product_id in the categories table. So, how can i make this
relationship between the 2 without us
I am not satisfied with this solution. For instance when I edit an
item in the list and save the changes I want to go back to the list I
had before and not to e new list with a different ordering. Alse when
I edit an item ,and I get an input error i can't go back to list with
the javascript functi
I can see your point about repeating it twice, I don't understand how
different accessibility applications work, but I know that it is part
of the WAI and Section 508 accessibility standards that all href
elements should have the title attribute, and all images should have
an alt tag, even if it i
You can override cakephp's defualt functionality in your AppHelper if
you want to do this.
I don't think it should be the standard, as there are situations where
you might not want this. Additionally, why do you need to repeat the
link text in the link title? Won't this effectively cause the
scre
I have just done a quick google search, and can't seem to see anything
about this, but I have been thinking for some time now, that for
accessibility reasons, wouldn't it make sense for the links to have a
default title, and even images have an empty alt tag by default? The
link title could defaul
Just a news update!
The LinkedIn group is on the verge of 200 members. I am very happy to
see users support the framework.
If you would like to join and show your support by increasing
CakePHP's visibility;
http://www.linkedin.com/e/gis/82040
You can also show support to CakePHP monetarily -> h
var $belongsTo = array(
'Course' => array('className' => ..., 'foreignKey' => ..., etc...),
'Student' => array('className' => ..., 'foreignKey' => ..., etc...),
... as many associations as you like ...
);
All this'll do is attach more related models in your query results.
What you're looking for is the correct spelling of $var validate =
array();
:-)
On 22 Aug 2008, at 09:07, tekomp wrote:
>
> I have an "add" function that isn't being validated using the form
> helper, even though I have the model set to validate. It just inserts
> the record and I can't figur
Hi,
I have a problem in testing my model which act as geocoded.
The funny thing (i think) is, that it works in the application
perfectly, but, in the test it throws an error message.
Fatal error: Call to a member function findByAddress() on a non-object
in /Users/alexander/Sites/musiker-sucht.d
2008/9/11 Gwoo <[EMAIL PROTECTED]>:
> There are no plans to add polymorphism. This feature is most
> definitely something that should be community implemented and
> supported. If you are having issues with the current implementation,
> the best thing would be to jump on IRC where the most complete
2008/9/11 Ian M. Jones <[EMAIL PROTECTED]>:
> Yeah, I'm looking for a Javascript event (callback hook) that I can
> use to determine whether there is no selectable record any longer
> (select list emptied), or that the selected record is selected no more.
>
> I don't think the afterUpdateElement h
So after thinking about it a
> while I came up with a database
do you have the database set up?
if so you could set up cake to bake your inital models controllers and views
student table would have id name etc
course table would have id title etc
final_grades table would have course_id stude
Hello,
I have a big application to migrate to cakephp 1.2.
I have very very a lot of problems during this migration.
- When using the findBy function, the Behaviors object from cake/libs/
model/model.php is not recognized as an object.
- A lot of things does not work about the model and the da
In the database.php if I remove it, it gives an error, if I put a bad
username, password, or server, it still says Cake is able to connect
to the database. This was not always the case when I first tried. But
now, no matter what I do, it says it can connect.
And at the bottom it always has:
1
I am still quite confused about expressing a "belongs to" relationship
to more than one table at a time. Consider this: I am writing an app
that will keep track of grades for students in multiple courses. So
my final_grades table has a course id, a student id, and a final
grade. So my understa
It is used for internationalizing your code.
On Sep 8, 3:13 pm, "Gonzalo Servat" <[EMAIL PROTECTED]> wrote:
> On Mon, Sep 8, 2008 at 4:00 PM, Action <[EMAIL PROTECTED]> wrote:
>
> > The bake console generated the following code:
>
> > $this->Session->setFlash(__('The User has been saved', true));
I am totally new to Cake and need some help understanding models. But
first let me give some background. I have a friend who is an English
teacher and she asked me if I could set something up so she can enter
grades in different weighted categories, and allow students to see
their own grades (an
Thank you very much.
I had a class called Statu I rename to Status and it is ok.
But I don't understand why it did not work because it was working well
on cake 1.1.
And since I migrate to 1.2 the problem appear.
The fact is when I rename the Statu to Status other problem apears.
But I think I ca
thanks martin. thats help me solve my problem.
On 9/11/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> There are at least two ways to stop AuthComponent from using the salt.
>
> I think the simple hacky way for you in this case is to alter that one
> line of code in Auth and keep it in your
On Thu, Sep 11, 2008 at 3:58 PM, Mark <[EMAIL PROTECTED]> wrote:
>
> Not sure, but check your hasOne, hasMany, belongsTo etc stuff... make
> sure there are no typos there.
>
Also check the name of the class .. ie. make sure you don't have a:
class Statu extends AppModel { }
... in app/mode
Oh..right under my nose this whole time. I figured that sort of logic
was supposed to go in the controller, so I've been searching this
whole time on how I should do it there..
Anyway, this fixes it and gave me a few more ideas. Thanks!
Mark
On Sep 11, 7:14 am, "[EMAIL PROTECTED]"
<[EMAIL PROTE
Not sure, but check your hasOne, hasMany, belongsTo etc stuff... make
sure there are no typos there.
On Sep 11, 7:26 am, Klesus <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have a problem with cakephp.
> I have just migrate cake php from 1.1 to 1.2 and cake php make a
> mistake with an autogenerated qu
mark_story schrieb:
hi!
Thank you very much for pushing me into the right direction!
> You need to include the Session component in the components array in
> your acl class. Your session also never gets written as you
>
> return parent::check()
>
> as you return you never get to the other code.
Have you named the controller books_controller.php?
Okto.Silaban.Net
On Thu, Sep 11, 2008 at 9:30 PM, simonking <[EMAIL PROTECTED]> wrote:
>
> I'm a newbie in cakephp.
> Recently, I practiced an example from the book "CakePHP Application
> Development". I got a problem:
>
> It is an example abou
I'm a newbie in cakephp.
Recently, I practiced an example from the book "CakePHP Application
Development". I got a problem:
It is an example about "controller without a model"
the code below:
and the index.ctp:
packt book store
but the result diplay:
Missing Controller
Error: BooksControll
I find it, $this->layout = 'Ajax'; must be $this->layout = 'ajax';
--
On 11 Eylül, 18:44, Daniel Hofstetter <[EMAIL PROTECTED]> wrote:
> Hi,
>
> > when I want to see users/index page I can see the list and
I'm having the same issue. I'm not sure that the autocomplete function
works the same way as form->input.
On Aug 21, 6:06 am, Raph <[EMAIL PROTECTED]> wrote:
> I have a problem with autocomplete function. When I use it in form,
> and I set validatin rules in coresponding model, errors under input
Hi
I'm running the latest release candidate of CakePHP on a local Windows XAMPP
installation. The web root of Apache is set to the CakePHP directory (not
app/webroot).
Whenever I use the HTML helper, it outputs URLs such as:
css/style.css
However, it should output URLs like this:
/css/style.
Hi,
I have a problem with cakephp.
I have just migrate cake php from 1.1 to 1.2 and cake php make a
mistake with an autogenerated query.
It is very strange.
look : it is the cakePhp generated query
SELECT `User`.`id`, `User`.`group_id`, `User`.`access_id`,
`User`.`status_id`, `User`.`firstname`
Hi,
I just started using the CakePHP. first let me explain what i am
trying.
i have 3 divs
tasks, description and logs.
whenever a link clicked from the tasks box its description and logs
gets displayed in the respected divs using ajax.
How i am doing:
1. showing all the records fetched from the
Hello Claudia,
This approach worked perfectly with my setup. Thank you!
- Daniel
On Sep 10, 3:39 am, Claudia <[EMAIL PROTECTED]> wrote:
> It is a bit different from your example but here is how I use between:
> $startDateCond = array('Event.start_date' => 'BETWEEN ' . UDAYSTART .
> ' AND ' . (U
Hello,
You can also download et install applications and projects developed with
cakephp:
http://cakeforge.org/
good luck
2008/9/11 Daniel Hofstetter <[EMAIL PROTECTED]>
>
> Hi,
>
> > hai all i am new for cake but i want to learn cake i want some simple
> > example code to understand this can
What you are looking for is 'required' => true,
allowEmpty is only useful for fields that are not part of the
database. Like a CAPTCHA validation portion or something of that
nature.
On Aug 21, 5:07 pm, tekomp <[EMAIL PROTECTED]> wrote:
> I have an "add" function that isn't being validated usin
Hi,
> when I want to see users/index page I can see the list and everything
> is normal
> but if I want to see users/add page the server says "the requested
> address was not found on this server"
> tmp is writable so where is the problem am I going to be crazy??
I don't know what the problem i
On Sep 10, 4:44 pm, "Marcus J. Ertl" <[EMAIL PROTECTED]> wrote:
> Hi!
>
> I'm just trying to cache the results of acl's check in the session. I
> have written a new component, inheriting from DbAcl:
>
> class CachedAclComponent extends DbAcl {
>
> function check($aro, $aco, $action = "*") {
#cake bake (command line)... builds and entire application for you
(yes, it writes code) just by looking at your DB tables
var $scaffold; makes a fully functional prototype of your application
with db connection and all the good stuff included.
can't get any easier than that ;)
On Sep 11, 10:0
I have no small example for what you are trying to do.
Basically there are two parts to this puzzle. How to get the initial
(posted) search-parameter(s) into paginate. And how to make sure the
pagination links respect your parameters. This last part is done by
setting options for the paginator in
Hi,
> hai all i am new for cake but i want to learn cake i want some simple
> example code to understand this can any one help me.
The blog tutorial is a good starting point:
http://book.cakephp.org/view/219/Blog
Good luck!
--
Daniel Hofstetter
http://cakebaker.42dh.com
--~--~-~--~---
You have to use two different Keys for the association,
something like:
var $belongsTo = array(
'Creator' => array(
'className' => 'User',
'foreignKey' => 'created_id'
),
'Modifier' => array(
'className' => 'User',
'foreignKey' => 'modified_id'
)
);
f
You should name both of your associations with different names. For
example:
Transaction model :
var $belongsTo = array(
'User_created' => array(
'className' => 'User',
'foreignKey' => 'created_id'
),
'User_modified' => array(
'className' => 'User',
'foreig
No,no, I don't have Comment controller... I have MotivesController
with Comment() action...
Save() method works well but it doesn't use validation from comment
model.!?
Maybe I should create comment_controller and define comment() action
there, then call it from my form and then after save() redi
I think he wasn't following the convention to have a table named
'Users' with at least to fields named 'username' and 'password'.
On Sep 10, 4:28 pm, Klesus <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Can you tell us how you solve the problem ? I think I have exactly
> the same :
>
> SQL Error: 1054: U
$html->image('funny.gif); <--- that creates a image tag with
'funny.gif' as the src . . . . enjoy
You can find more examples in the manual -> http://book.cakephp.org/
Searching this group and the world wide internets
On Sep 11, 5:05 am, akhilesh <[EMAIL PROTECTED]> wrote:
> hai all i am new for
$html->input(); --- that creates a textbox. enjoy
You can find more examples in the manual -> http://book.cakephp.org/
Searching this group and the world wide internets
On Sep 11, 5:05 am, akhilesh <[EMAIL PROTECTED]> wrote:
> hai all i am new for cake but i want to learn cake i want some simp
There are no plans to add polymorphism. This feature is most
definitely something that should be community implemented and
supported. If you are having issues with the current implementation,
the best thing would be to jump on IRC where the most complete help
can be found.
--~--~-~--~~
Thanks,
That explains it quite well for me.
It has been one of those thing at the back of my mind since I keep
seeing both used, seemingly, interchangeably in examples all over the
web.
I guess I do a bit of search and replace for the places I have used
this->name. :)
Martin
On Sep 11, 2:45 pm
Hi devs,
Just curious if you have any plans to natively add polymorphism
support (like the polymorphic behavior -- which I've been struggling
with)? Seems to be the one thing that's missing.
Everything else is really great, I'm absolutely loving it so far! I'm
raving about it to all my friends,
Hi guys,
I'm trying to get pagination working with filtering/conditions/where-
clause. Here's the solution I've got so far:
2,
'order' => array('Article.created' => 'desc')
);
function index() {
App::import('Sanitize');
if(isset($
Hi,
Can you tell us how you solve the problem ? I think I have exactly
the same :
SQL Error: 1054: Unknown column 'User.statu_id' in 'on clause' [CORE/
cake/libs/model/datasources/dbo_source.php, line 512]
It is real that User.statu_id does not exist. But why CakePhp build
broken query ?
Thank
Okay, so... I have Articles which belongTo Users, and Users are
Workers or Employers (via Polymorphic). Now I have a query:
return $this->Article->find('all', array('order' => 'Article.created
DESC', 'limit' => 5));
But it doesn't seem to be pulling up the associated Worker or
Employer... am I d
Hi all, i need some help.
I have two table, let's say User and Transaction with this kind of
relation :
User has some common fields :
id
username
password
Transaction :
created_id is a foreign key to model User (id)
modified_id is a foreign key to model User (id) too
how do define th
hi everybody,
when I want to see users/index page I can see the list and everything
is normal
but if I want to see users/add page the server says "the requested
address was not found on this server"
tmp is writable so where is the problem am I going to be crazy??
these are my control codes
fun
Hi Gus,
Yeah, I'm looking for a Javascript event (callback hook) that I can
use to determine whether there is no selectable record any longer
(select list emptied), or that the selected record is selected no more.
I don't think the afterUpdateElement helps, as far as I can tell it
only fir
hai all i am new for cake but i want to learn cake i want some simple
example code to understand this can any one help me.
thanks in advance.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post
There are at least two ways to stop AuthComponent from using the salt.
I think the simple hacky way for you in this case is to alter that one
line of code in Auth and keep it in your list of "small tweaks I have
done" (I have one of those).
Line 811
return Security::hash($password, null, true);
s
Hi again!
On Thu, Sep 11, 2008 at 12:08 AM, Marcin Domanski <[EMAIL PROTECTED]> wrote:
> If i were you i would think "how can i use sessions in components ?
> hmmm let me think... auth component stores info in session - maybe ill
> look at its source and find out ?"
> not long after i would find
Most of the time you'll want $this->alias
The difference appears in associations:
class Post extends AppModel {
var $belongsTo = array(
'Author' => array('className' => 'User')
);
}
When this association is active, the `User` model class will have
$this->name=='User' but $this->alias=='
Hi,
I have seen tutorials and example-code using either $this->name or
$this->alias. Which one of preferable?
Example:
$the_id = $this->data[$this->name][$this->primaryKey];
or
$the_id = $this->data[$this->alias][$this->primaryKey];
I am not clear about which one I should use in my AppModel or a
2008/9/11 luigi7up <[EMAIL PROTECTED]>
>
> Hello everyone,
>
> I have two models
>
> MOTIVE var $hasMany = array('Comment');
> COMMENT var $belongsTp=array('Motive');
>
> I want to make comments on motives so I added comment() function into
> Motive controller and in views/motive/view.php I added
I wasn't writting it by myself, but i have to fix this bug.
I don't have OptionsController, but propably PagesController will be
helpful, because the problem is when i'm on the site with page list.
There is everything okey, but when I click on existing page to edit
it, this warning appears, and al
Thanks David,
I want password in table hashing with sha1 only and without security.salt.
in another way, it will make me easy using same table with different
framework or CMS.
cause sha1 is include on most CMS / framework. Salt? i don't think so.
Cookies needed for " remember me " on login form.
Hello everyone,
I have two models
MOTIVE var $hasMany = array('Comment');
COMMENT var $belongsTp=array('Motive');
I want to make comments on motives so I added comment() function into
Motive controller and in views/motive/view.php I added following form:
echo $form->create('Motive
... the cake in cakePHP is starting to get larger than the PHP. :-))
Perhaps we should get back to business before we all gain 7 pounds.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to t
Probably in your OptionsController?. Check out the function that
matches the name of your action,
ie,
http://www.example.com/options/
or
http://www.example.com/options/index
can be found in your OptionsController (/app/controllers/
options_controller.php)
and look for the function index()
Also
but i don't know where it is genereted :/
where can it be?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this grou
I'm relatively close by in Sheffield.
On Sep 10, 11:55 pm, simonb <[EMAIL PROTECTED]> wrote:
> Anyone in the dewsbury, England, West Yorkshire area who has used cake?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"
Not quite sure I understand your particular issue, but why is the
password in your DB "pure" SHA1?
If you're using the Auth component all the way, it will hash the
password including Salt when the user registers, so the only thing
that should go into the db is SHA1(salt.password). And every
It is already on database level. In fact I don't think there is a way to
just roll back some data. You always have to roll back the whole
transaction.
2008/9/11 [EMAIL PROTECTED] <[EMAIL PROTECTED]>
>
> Hi Marcin,
>
> My question is "How to rollback on database level instead of the Model
> level
I am getting the following error when I do $this->server->register(). Help!
*Notice* (8) : Undefined index: content-type [*
APP\vendors\nusoap\lib\nusoap.php*, line *4212*]
Code | Context
$headers= array(
"accept" => "*/*",
"accept-language" => "en-us",
"ua
Hi Marcin,
My question is "How to rollback on database level instead of the Model
level".
On Sep 11, 12:53 am, "Marcin Domanski" <[EMAIL PROTECTED]> wrote:
> Please - did you even look at the api ?
> Look what commit and rollback do - its very
> simple.http://api.cakephp.org/1.2/dbo__source_8ph
Please - did you even look at the api ?
Look what commit and rollback do - its very simple.
http://api.cakephp.org/1.2/dbo__source_8php-source.html#l01529
--
Marcin Domanski
http://kabturek.info
On Thu, Sep 11, 2008 at 7:09 AM, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
>
> well, is there any
79 matches
Mail list logo