On Jun 2, 7:45 pm, brian wrote:
> Model::create() doesn't actually create a new DB record, it just sets
> up the model instance. You have to use save() for that.
>
> What i've done in the past when moving an existing project to Cake is
> to create a (non-cake) script that simply moves the data f
At /joesmith/update/systems/, if you can debug the data you should be
able to save it. What exactly happens, a white page?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send e
Hi Bryan,
I don't quite understand how to do the echo password thingy. the
password is to be displayed in the textbox, something akin to
document.getElementById("password"); should i put it under $html-
>input?
On May 27, 3:28 pm, Bryan Paddock wrote:
> Hi Gangzheng,
> Use the core ajax helper
This is what gets passed in the save
data[System][System]
data[System][System][] 13
data[System][System][] 11
data[System][System][] 3
data[System][System][] 4
data[System][System][] 2
data[System][System][] 14
-Original Message-
From: Miles J [mailto:mileswjohn...@gmail.
Actually nvm I think I read it wrong.
Whats the content passed during the ajax request (find it with
Firebug).
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cak
Not sure I fully understand "Your Ajax fields need to be wrapped in data[]"
The form looks like this:
create(array('type' => 'post','action' => 'update')); ?>
Select from the options below
input($model_table,
array('multiple'=>'checkbox',
'label'=>false
If you are doing it that way, theres no possible way for your data to
show up in $this->data. Your ajax fields need to be wrapped in data[],
else it should show up in $this->params['form'].
--~--~-~--~~~---~--~~
You received this message because you are subscribed t
$(document).ready(function() {
$('#UserUpdateForm').bind('submit', function() {
var numRand = Math.floor(Math.random()*10);
var queryString =
$('#UserUpdateForm').formSerialize();
$(this).ajaxSubmit({
You could write your own view class to get this done. Base it off the
cake/libs/view/view.php
--~--~-~--~~~---~--~~
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
Can I see your js ajax code.
--~--~-~--~~~---~--~~
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 group, send email to
cake-php+unsu
Nope...still same thing. I will just secure the form myself and add security
to the controllers that need them individually for now.
Thanks again for your insight and fast response.
Dave
-Original Message-
From: brian [mailto:bally.z...@gmail.com]
Sent: June-02-09 11:28 PM
To: cake-php
On Tue, Jun 2, 2009 at 9:37 PM, Dave Maharaj :: WidePixels.com
wrote:
>
> My Ajax functions are in different controllers but I added
>
> function beforeFilter()
> {
> parent::beforeFilter();
> if ($this->params['action'] == 'update_systems')
> {
>
I need to know of a way to intercept the output from my view file
before it merges that content with the default layout. How can I get
the view file contents so that I can manipulate them as I need to?
On Jun 2, 6:58 pm, timtrice wrote:
> I actually almost have it (I think).
>
> I'm trying to c
Hi All,
I'm working on a project at the moment which has a main site then sub
sites for venue franchises. The venue sub sites are effectively the
same as the main site but the news items etc are filtered to be only
for that particular venue.
The way I have this setup at the moment is as follows
My Ajax functions are in different controllers but I added
function beforeFilter()
{
parent::beforeFilter();
if ($this->params['action'] == 'update_systems')
{
$this->Security->validatePost = false;
}
}
but
Security component does not work in conjunction with Ajax.
If all your ajax requests are in a controller called Ajax, simply
place this in the beforeFilter().
/**
* Executed before each action
*/
function beforeFilter() {
parent::beforeFilter();
// Turn debug off for ajax calls
Co
I been trying all day to get a form to submit Ajax and nothing. I removed
the security component and it worked perfectly. I have not modified the form
in any way but when I add the security component it never saves the data.
The form is submitted Ajax. Is there something i am missing?
Form:
cre
What about going to
/items/index
Or another action?
--~--~-~--~~~---~--~~
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 group, sen
I actually almost have it (I think).
I'm trying to catch the output before it's actually ouput. That's
where I need to mix with the xsl and the stylesheet. The problem is I
can't find the actual content. If I load the file into a variable,
set that variable, I can catch it in beforeRender. Th
I don't understand why you would want (or need) to do this. Could you
post the table schema for products as wel the repository table?
On Tue, Jun 2, 2009 at 2:54 AM, Darshan wrote:
>
> hi,
>
> i am new to cakephp.
>
> i am working on a project in which we have two tables
>
> one is product and t
Model::create() doesn't actually create a new DB record, it just sets
up the model instance. You have to use save() for that.
What i've done in the past when moving an existing project to Cake is
to create a (non-cake) script that simply moves the data from one
database to the other, the latter D
yes
for example i created the
items_controller.php
item.php
when going to
http://localhost/cake/items
i get the missing controller error
On Jun 3, 1:37 am, Miles J wrote:
> So are you saying /users/login/ (Users controller, login action) would
> throw a missing users controller error?
--~--~
So are you saying /users/login/ (Users controller, login action) would
throw a missing users controller error?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake
i have setip cake on a wamp server
mod_rewrite is on
i can see the cakephp default index
i setup all the config files
but still cant access the controller beyond the www/cake/
very frustrating cant even run a simple tutorial :(
your advise guys
--~--~-~--~~~---~--~
On Jun 2, 6:13 pm, dyml wrote:
> Anyway, i hope you understood what i meant. How can i do this, is it
> possible to select data from multiple tables in one model?
Forgive me if this is an oversimplification of your problem, but it
sounds like you need to establish some associations between y
So hello there.
I have a table of businesses (restaurants, etc.) in my old framework,
and I'm trying to remake things with Cake (I'm catching on but still
shaky) so I've set up 3 new tables to house the data which used to be
all in this one "businesses" table: "writeups", "locations" and (of
cou
Hello!
I am trying to make a "latest events" function. I want it to pick all
posts from two tables, sort them by created date and send them to the
view... In the view they should be able to show together with their
comments( i found a solution that wasent "cakeish" that merged the two
finds, but
Maybe you simply have to preprocess the array before send it to the
view.
Like this:
posts_raw = $this->Post->find('all', array('order'=>
'Post.id ASC'));
if (isset($posts_raw['Post'])) {
$this->set('posts', $post_raw['Post']);
}
Try it and tell me!
Greetings.
On 2 jun, 23:18, mxmtycoder wr
Hi,
I'm new with cakephp,
I've been following the blog posts tutorial and some other pages about
exporting to json
here is a fragment of the controller
var $name = 'Posts';
var $components = array('RequestHandler');
var $helpers = array('Html','Javascript','Ajax');
Been trying this to no avail
I have 3 HABTM tables that belong to a User. (PROGRAMS, SYSTEMS,
APPLICATIONS)
I simply want to create 3 forms where the User can update selections for
each HABTM table. Is this possible rather than 1 form for the User to update
everything.
Make a form that will
On Tue, Jun 2, 2009 at 4:24 PM, Miles J wrote:
>
> If this is what your file looks like:
>
> $ cat persistent/itemlinkregistry.php
>
>
> Its not saving it correctly because there is no object stored there.
Yes, this is what it looks like. I've been combing through the code
(mine & Cake's) tryin
If this is what your file looks like:
$ cat persistent/itemlinkregistry.php
Its not saving it correctly because there is no object stored there.
$persistModel is very buggy, your best bet is to disable it for now.
--~--~-~--~~~---~--~~
You received this message b
On Mon, Jun 1, 2009 at 8:20 PM, Dave Maharaj :: WidePixels.com
wrote:
>
> i am trying to submit a form using jQuery and no luck.
>
> I load the form first into a div.
>
> $("a.edit_user").click(function(){
> var data_id = $(this).attr('id');
> $("#loading").show(function(){
> alert(data
I'm suddenly (no changes made in the past week) getting a white screen
after (successfully) adding records, due to headers already sent. The
trouble is a couple of warnings related to persistence/caching that
I'm unable to figure out.
Unfortunately, this is only occurring on the server. I'm unabl
I've checked the code. The place I am getting the error is here:
css('reset') ?>
css('style') ?>
It can't find the html helper.
On Jun 2, 12:32 pm, Miles J wrote:
> That is not a missing helper problem, its actually another error that
> is thrown.
>
> I have had this happen to me a few times,
Ok lets see here:
Controller action - Should set() an array to the view and in the view
you parse the array to xml (this is your xml file). You would then
also set which xslt file it should be aswell.
function index() {
$this->set('users', $this->User->find('all'));
$this->set('x
That is not a missing helper problem, its actually another error that
is thrown.
I have had this happen to me a few times, try double checking your
layout.ctp code. Im not sure if that was it though.
--~--~-~--~~~---~--~~
You received this message because you are s
Hey all -
Pretty basic question, but I can't seem to find the answer anywhere.
I'm creating a set of test fixtures, and for some reason it keeps
pluralizing "faculty" to "faculties". What can I do to prevent this?
Here's my code:
app/models/faculty.php
app/tests/fixtures/faculty_fixture.php
'
APP CONTROLLER
function beforeRender(){
if($this->params['controller']=='frontends'){
// This do nothing
$viewPaths = array(CAKE_CORE_INCLUDE_PATH .'\shared
items\views');
// This do nothing
define('LAYOUTS','C:'.DS
Hey,
yeah I thought of that but this would acutally do the following:
instead of selecting an hour and the minute, it would populate my
select with values like this:
09:00
09:15
09:30
...
I guess that would be ok even if I had many many options in my array.
BTW could you give me a hint how to bu
I have developed and app with CakePHP on my mac with MAMP. All was
working well until I needed to upload the code to the server. Now when
I go to access the page, I get the following error:
Notice (8): Undefined variable: html [APP/views/layouts/default.ctp,
line 10]
Fatal error: Call to a membe
Hi,
Thanks for your reply, your suggetsion quickly pointed my in the right
direction. Virtual hosts is what i needed and easily found windows and
xamp config details on google.
if anyone runs into the same problem, please first consider having
your sites rest in different directories using virtu
John,
The version, according to version.txt is 1.2.0.6311 beta.
I'm trying to place this app into an empty table cell, so it matches
the look and feel of the rest of the site. The code for the images is
standard HTML, with the assumption that the images folder is in
webroot. For example:
Marti
On Mon, Jun 1, 2009 at 1:20 PM, cake_baker wrote:
>
> ok here is the full the details
>
> i'm using a star rating plugin that need user.id in the Session
>
> define('RATING_SESSION_USER_ID', 'User.id');
This defines the session key? You can get Auth's session info using
$this->Session->read('Aut
On Tue, Jun 2, 2009 at 2:00 PM, Petter wrote:
>
> On Jun 2, 3:29 pm, Marcelo Andrade wrote:
>> (..)
>> Did you try to put a foreignKey like upload_id in your Car, House
>> models? In this case your associations should be "Car belongsTo Upload"
>> and "Upload hasOne Car", "Upload hasOne House" a
On Jun 2, 3:29 pm, Marcelo Andrade wrote:
> On Mon, Jun 1, 2009 at 5:41 AM, Petter
> wrote:
>
> > Hello, all.
>
> > I have a model for image uploads. Each upload belongs to one other
> > model, such as Car or House. Currently, I solve this by using one
> > hasAndBelongsToMany for each model t
Pretty sure this was fixed in 1.2.1. Check the group stickies.
-Mark
On Jun 2, 4:49 am, Marc wrote:
> Hi all,
>
> I was wondering if anyone had come across the issues discussed on this
> blog:
>
> http://rajeshanbiah.blogspot.com/2008/12/cakephp-security-issue-even-...
>
> I happened to stumble
I have 3 HABTM for a user. I broke the generic baked form up into 3 forms
where a user can edit their selected options (forms are all checkboxes with
no user input or ability to edit actual options) individually rather than
big form. This form now gets submitted via Ajax and that's working fine.
I
Yes I edited the array and it looks similar to the one you have below and it
works.
Thanks for your time and help.
Dave
-Original Message-
From: Marcelo Andrade [mailto:mfandr...@gmail.com]
Sent: June-02-09 11:22 AM
To: cake-php@googlegroups.com
Subject: Re: Form still tries to find a
Cool tip!
But no am just testing in Firefox right now and its happening. I removed my
"gzip components", headers for cache and still same thing.
Dave
-Original Message-
From: rich...@home [mailto:richardath...@gmail.com]
Sent: June-02-09 8:11 AM
To: CakePHP
Subject: Re: Cache Views?
Clemens,
Use $this->data['Picture']['File']['tmp_name'] as src, create a scaled
image file and use it to set up $this->data['Picture']. Here's the
function I use:
private function scaleImage($srcpath, $args) {
// cache functionality, no extra charge
if (f
CakePHP is PHP. You can use whatever language constructs that PHP
provides you, including try/catch blocks for operations that could
throw exceptions.
-j.
sharmaji wrote:
> Hi,
> Is there any use of try and catch block in cake php? if yes, please
> suggest me how can i implement that?
> currentl
Hi all,
I've been wracking my (tiny) brains trying to find a solution to this
problem, I'm hoping someone here has come across the problem and found
a solution or can think of one.
I have a form with some $ajax->autoComplete controls along with other
standard controls, and I also have a $ajax->o
These might be helpful to you, Balanza.
http://www.davidgolding.net/screencast-movies/
On Jun 1, 7:49 pm, Balanza wrote:
> Hi there,
>
> I'm new in cake and I'm baking my first application.
>
> While setting up my work-environment, a question came up: is it
> possible to run more than an applica
Are you using the ClassRegistry or manually importing classes
(specifically Models) using App::import anywhere ?
What version of CakePHP are you running?
-j.
pauloamgomes wrote:
> Hi all,
>
> when i activate persistent model to true in my application, it breaks
> my models, I'm getting the foll
You don't post any mysql error or what the query looked like (it
usually tells you what is wrong).
A shot in the dark but it could be this simple: array('((DAYNAME
(Model.field)))' => 'Monday');
On Jun 2, 12:46 pm, toby1kenobi wrote:
> Hi there,
>
> Is it possible to use MySQL's DAYNAME func
hi.
i can already upload pictures to my mysql database in blob format. i
want to add an automatical resize when uploading. my code:
$fileData = fread(fopen($this->data['Picture']['File']['tmp_name'], "r
+"), $this->data['Picture']['File']['size']);
$this->data['Picture']['name'] = $this->data['
Hi guys,
I've never been successful to get HABTM to work. I've tried so many
sites such as this:
http://www.packtpub.com/article/working-with-complex-associations-using-cakephp
and never got it to work. According to the number of rows, it gets the
correct number of rows, and when I tried the res
On Jun 2, 4:22 am, Miles J wrote:
> Tinyints do not work in CakePHP, you must use smallint.
only tinyint(1) is considered a boolean by cake.
anything else (tinyint(2)) is what it says it is.
AD
--~--~-~--~~~---~--~~
You received this message because you are sub
Hi all,
I was wondering if anyone had come across the issues discussed on this
blog:
http://rajeshanbiah.blogspot.com/2008/12/cakephp-security-issue-even-in.html
I happened to stumble onto the post, and was wondering what these
issues were.
Thanks.
--~--~-~--~~~---
hi,
i am new to cakephp.
i am working on a project in which we have two tables
one is product and the other is product repository,
both the tables have same structure.
what i want to do is create a repository for product so that we don't
have to put all
product information again and again, a
On Mon, Jun 1, 2009 at 2:23 PM, Dave Maharaj :: WidePixels.com
wrote:
> I have created 1 form which has
>
> create(array('type' => 'post',
> 'options' => array(
> 'model'=>'User',
> 'url' => array(
> 'controller' => 'users',
> 'action' => 'update'
> )
>
On Mon, Jun 1, 2009 at 12:43 PM, cshehadi wrote:
>
> For the record, yes, now that I check the server error logs (as
> opposed to the Virtual Host error logs) I see that there is a
> segmentation fault. Not sure I've got the stomach for an apache/php
> reinstall on a busy server however. Thanks
I want to integrate XSL into my applications. Obviously it's simple
enough as far as writing the XSL into my view files which is how I'd
prefer it. It's at this point, though, that I get stuck. I'd like to
add an additional directory structure to my view folders:
/view
.../posts
.../.../index.
On Mon, Jun 1, 2009 at 5:41 AM, Petter wrote:
>
> Hello, all.
>
> I have a model for image uploads. Each upload belongs to one other
> model, such as Car or House. Currently, I solve this by using one
> hasAndBelongsToMany for each model that has images, which works, but
> is obviously not ideal.
On Mon, Jun 1, 2009 at 5:57 AM, randalle2 wrote:
>
> Hello guys,
>
> Can anybody help me why I get this error?
>
> Notice (8): Array to string conversion...
>
> I try to explode a url, here is the code:
> $var = $this->params["url"];
> $res = explode("/", $var);
>
> then
> I debug the $res...
>
>
Balanza, are you talking about your app files or your core cake
files? I and I'd say most CakePHP developers have the core cake
directory separated from their application directories...all within
their server directory. In other words, my strucutre is like this:
www/
.../cake
.../website1
.../w
On Sun, May 31, 2009 at 9:45 PM, Dave Maharaj :: WidePixels.com
wrote:
> This is fairly simple question but I think saying it in my head and hearing
> it sounds wrong and confusing me further.
>
> "User" signs up and selects the "Group" they are going to belong to as they
> can only belong to one
$scaffold doesn't really have anything to do with it. But you can
hide SQL log by changing your debug setting (in /app/config/core.php)
from 2 to 1 or less.
On Jun 2, 4:52 am, cake_eater101 wrote:
> When I delete the $scoffold variable from any given controller, I
> still see the SQL query summ
http://us3.php.net/manual/en/language.exceptions.php
On Jun 1, 9:25 am, sharmaji <04.um...@gmail.com> wrote:
> Hi,
> Is there any use of try and catch block in cake php? if yes, please
> suggest me how can i implement that?
> currently i am using php version 5.2
> Thanks!
--~--~-~--~---
Hi I develop simple CMS, but it will be multisite system.
One core (controller, admin, frontend views, models)
User: (frontend layout, css, images)
Pleas is any idea how I can chagne path for on layout in any action in
controller?
Path must be in some adr for example: /root/cake/layout/frontend.c
I've written a forum plugin for my cakePHP based CMS, it is not
designed to be used in any cake app, but maybe you can use it. You can
get the forum from http://github.com/dakota/CMScout-Forums/tree/master
and the whole CMS from http://github.com/dakota/CMScout/tree/master
I am looking for people
Hi there,
Is it possible to use MySQL's DAYNAME function in the where clause
of a call to 'find'? i.e. something a bit like:
$this->paginate['conditions'] = array('DAYNAME(Model.field)' =>
'Monday');
The above doesn't work (which is what I was expecting) but I haven't
managed to find an equ
Are you using IE?
IE has an annoying habbit of caching ajax responses, and the only
reliable way to get round it is to append a random string to the end
of the request url as an additional parameter.
/controller/model/param1/param2/my_random_param/
On Jun 2, 5:59 am, "Dave Maharaj :: WidePixels
I think you may have the parameters for Form::create() mixed up a bit.
Try:
create('User', array('url'=>array
('controller'=>'users','action'=>'update'))); ?>
On Jun 1, 7:23 pm, "Dave Maharaj :: WidePixels.com"
wrote:
> I have created 1 form which has
>
> create(array('type' => 'post',
>
In the view:
';
echo ''.$product['Product']['name'].'';
// echo more fields here
echo '';
}
?>
That will output a basic table of products and the data you want to
present.
On Jun 2, 1:29 am, dflow wrote:
> starting off cakephp
> how do you echo a simple mysql query for exampl
Hi,
Mod rewrite is used so that Cake can "fake" folders on the server (as
the browser sees it).
example.com/ - The browser things you are in the root folder on the
server.
example.com/pages/home - The browser things you are in the pages
folder on the server.
example.com/pages/home/ - The browser
I always keep multiple sites as virtual hosts in Apache (the A in WAMP/
XAMPP) and combine that with fake hostnames.
(/ets/hosts on *nix, no idea how Windows do it)
hostnames, all pointing to localhost might be
portfolio.site
great.site
tutorials.site
If you then setup Apache in your *amp to us
78 matches
Mail list logo