From what i remember this should do the trick, in your controller action
if ( $this-RequestHandler-isXML()) {
// do some xml specific code
}
Check out the documentation on Request Handling for more details.
http://book.cakephp.org/2.0/en/core-libraries/components/request-handling.html
On
Hi I joined and I am posting right now because of the lack of succes I have
seen all over the web about this issue and while looking for the solution I
found MANY production sites with this warning messages all overas this
is the first post that comes up on google when you search for this
If it only occurs on IE it might be a prolem with the user session.
Try setting Session.checkAgent to false in core.php and see if that
helps.
I had problems with sessions getting dropped in IE, with this setting
on.
On May 31, 9:33 pm, luftlinie thomasfuch...@googlemail.com wrote:
hi everyone,
If you're encountering this error in Cake 2.1.x, you probably need to copy
the AppHelper.php skeleton from:
lib/Cake/Console/Templates/skel/View/Helper/AppHelper.php
into:
app/View/Helper/AppHelper.php
I ran into this while upgrading from 1.3.x to 2.1.x.
--
Our newest site for the
I suspect this might be a bug--looking for confirmation, and/or advice
on the best place to report it.
I have a controller with no associated model. In other words,
public $uses = null;
I use FormHelper to build a form for a controller action. Because
there is no model, the form's ID and input
To the best of my knowledge, both of these are impossible in CakePHP
1.3.6:
- Use EmailComponent inside another component to send a message
- Create a controller class BETWEEN AppController and the child
controllers in the inheritance hierarchy, that uses EmailComponent to
send a message
I would
On Nov 22, 1:09 am, AD7six andydawso...@gmail.com wrote:
I'd recommend looking at the reorder method, which'll do what you want
to the data itself, unless you're wanting to sort by a different
field.
http://api.cakephp.org/view_source/tree-behavior/#l-628
Thanks, reorder() was in fact the
http://book.cakephp.org/view/1348/generatetreelist
generatetreelist() returns a pseudo-tree in a relative order, with
children under parents. I would like results wherein the peers are
also ordered, alphabetically by label. Here is a quick example if
this isn't clear:
array(
[1] = My
;
if ( isset($item['children']) )
$this-_threadedFindToTreeListR($item['children'], $table, $key,
$value, $spacer, $recursion_lvl+1, $our_results);
}
}
}
On Nov 21, 6:12 pm, Johnny Cupcake sparklew...@hotmail.com
Hi, I've noticed that CakePHP has an autoComplete helper, but I'm
having trouble figuring out how to make it work for my application:
http://book.cakephp.org/view/632/autoComplete
I have 3 controllers:
PracticeItems
PracticeInstances
PracticeSessions
A PracticeSession will have 1 or more
, and it acts as though the only bit that
qualifies as [PracticeItem][name] is the last entry in the form.
On 16 Apr, 15:20, Johnny Ferguson hyperfle...@gmail.com wrote:
Hi, I've noticed that CakePHP has an autoComplete helper, but I'm
having trouble figuring out how to make it work for my
, and it acts as though the only bit that
qualifies as [PracticeItem][name] is the last entry in the form.
On 16 Apr, 15:20, Johnny Ferguson hyperfle...@gmail.com wrote:
Hi, I've noticed that CakePHP has an autoComplete helper, but I'm
having trouble figuring out how to make it work for my
, and it acts as though the only bit that
qualifies as [PracticeItem][name] is the last entry in the form.
On 16 Apr, 15:20, Johnny Ferguson hyperfle...@gmail.com wrote:
Hi, I've noticed that CakePHP has an autoComplete helper, but I'm
having trouble figuring out how to make it work for my
practice_sessions_controller.php:
http://pastebin.com/XHw37WS0
practice_sessions/add.ctp:
http://pastebin.com/Z5fGgfxV
practice_items_controller.php: (autoCompleteName)
http://pastebin.com/SLN72D4T
On 16 Apr, 19:38, Johnny Ferguson hyperfle...@gmail.com wrote:
So I've looked further
of this helper div when invoking the
$ajax-autoComplete method?
On 16 Apr, 19:41, Johnny Ferguson hyperfle...@gmail.com wrote:
practice_sessions_controller.php:http://pastebin.com/XHw37WS0
practice_sessions/add.ctp:http://pastebin.com/Z5fGgfxV
practice_items_controller.php: (autoCompleteName
I can edit the name of the helper div with the 'div_id' option, but it
doesn't seem to let both fields use the autocomplete function. At this
point, I'm not sure how to diagnose the issue any further.
On 16 Apr, 19:48, Johnny Ferguson hyperfle...@gmail.com wrote:
digging through the DOM further
));
endif;
And see what pops up.
Jeremy Burns
jeremybu...@me.com
On 15 Apr 2010, at 05:56, Johnny Ferguson wrote:
Hi,
I'm developing an app that has database relationships.
The table in question is like so:
tbl practice_instances
id - int (primary)
created - timestamp (default
values, even though they're
showing up in my controller dump odd.
On Apr 15, 2:22 am, Johnny Ferguson hyperfle...@gmail.com wrote:
If I put the data in manually it sticks.
I don't have any validation rules.
I'll try the code you recommended.
I suppose at least if what I'm doing SHOULD work
:
function beforeSave() {
die(debug($this-data));
}
Might be interesting to see what is being passed out.
Can you show and tell more of the code that is calling the save?
Jeremy Burns
jeremybu...@me.com
On 15 Apr 2010, at 07:24, Johnny Ferguson wrote:
Now this is interesting
. Everything works now. Sorry to kill
time with a slight oversight.
On Apr 15, 3:30 pm, Johnny Ferguson hyperfle...@gmail.com wrote:
a beforeSave() in the model yields:
app/models/practice_instance.php (line 6)
Array
(
[PracticeInstance] = Array
(
[modified] = 2010-04-15 15
I'm using InnoDB to allow data associations. Do I have to note this
fact in my database.php?
Other than that, I'm at a loss as to why this problem is occurring.
My practice_items table:
int - id
varchar(255) - name
text - description
/app/controllers/practice_items_controller.php:
I've checked with the folks in the IRC, and it looks like Cake
shouldn't care if I'm using InnoDB, but my data still won't show up in
the tables regardless of Cake giving me every indication that the save
was successful.
On 14 Apr, 16:43, Johnny Ferguson hyperfle...@gmail.com wrote:
I'm using
This is part of the whole convention over configuration.
Alan
-Original Message-
From: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] On Behalf
Of Johnny Ferguson
Sent: Wednesday, April 14, 2010 2:10 PM
To: CakePHP
Subject: Re: Cake won't save my data
I've checked
Hi,
I'm developing an app that has database relationships.
The table in question is like so:
tbl practice_instances
id - int (primary)
created - timestamp (default: null)
modified - timestamp (default: null)
timeminutes - int
practice_session_id - int
practice_item_id - int
tempostart - int
Looking here:
http://book.cakephp.org/view/78/Associations-Linking-Models-Together
I'm certain my issue is due to a personal lack of understanding.
I'm trying to homebrew a simple app to keep track of my guitar
practice.
I have the following models:
PracticeItem: a specific exercise to be
. The PracticeSession
has a PracticeItem.
I'll work through developing this app, and see if my understanding
doesn't grow a little. Thanks, Gian.
On Mar 26, 3:17 pm, Gianluca gc1...@googlemail.com wrote:
Hello Johnny,
class PracticeItem extends AppModel {
}
class PracticeInstance extends AppModel
I got this same problem, and after viewing the file directly, I am
extremely disappointed that I had to go through the hassle of filling
my comp with garbage like QuickTime just to have some guy show me how
to update my PATH variable. *facepalm*
Why this isn't on a youtube video is beyond me.
On
Hi,
I've successfully set up a contact form in cakePHP, and when
validation rules in my model don't pass, the form is reloaded with all
my validation errors displayed properly. That battle was won :)
Now for the tricky part.
Can anyone think of a way to not only have the form page reload with
Hi,
I've poured over all the documentation I possibly can, and searched
the newsgroups, and haven't yet found a solution to my problem.
I'm creating a contact form which doesn't use any databases. As the
controller action never calls save(), I don't get any of the nice
automatic validation.
I accidentally hit reply to author, but for anyone else that visits
this thread:
Be sure to check out the Auth component:
http://book.cakephp.org/view/172/Authentication
It's dead simple using this to set up authentication. Coupled with the
ACL component, you have an unstoppable force on your
of an element to hold the contact form. Then
have the contact form presented in both views!
Seehttp://book.cakephp.org/view/97/Elementsfor the story on
elements :)
Later you may consider using an AJAX solution.
Enjoy,
John
On Mar 16, 9:48 pm, Johnny Ferguson hyperfle...@gmail.com wrote
-
in the contact add form case, it would be named doAddContact.
The name of the submit button can be found as a key in the $this-
params array.
Just an idea, enjoy,
John
On Mar 16, 10:27 pm, Johnny Ferguson hyperfle...@gmail.com wrote:
Ajax is definitely a working solution, but I'm somewhat
.
+ 1,000,000 bonus points to anyone who can figure this out
On Mar 16, 5:07 pm, Johnny Ferguson hyperfle...@gmail.com wrote:
Having the form submit to the index() function worked brilliantly. To
my surprise, this enabled the automagic validation messages!
All I have to do now is style the messages
Brilliant, this is almost exactly what I was looking for.
On Feb 24, 8:28 am, Christian Leskowsky
christian.leskow...@gmail.com wrote:
Here's something I haven't read yet but was written by a guy who knows his
stuff...
http://boagworld.com/websiteownersmanual/
Do go on...is there a Cake-friendly method for automated daily DB
backups? How do you accomplish it?
On Feb 24, 8:26 am, Christian Leskowsky
christian.leskow...@gmail.com wrote:
For backups you should be taking full mysql backups of your database nightly
- at least while that's feasible - and
I am most concerned about legal issues because I am least equipped to
handle those myself. While I do not necessarily expect to be sued,
frankly I do expect to be threatened with lawsuits in short order, and
I want to know exactly where I stand before that happens. (I intend
to create a
...@gmail.com wrote:
Avoid getting sued? Stop being an american work like a charm. ;)
(sorry, I could not resist)
On Feb 22, 8:39 am, Johnny Cupcake sparklew...@hotmail.com wrote:
OK, so after we have successfully built our modern, interactive
CakePHP website...where can we learn how
OK, so after we have successfully built our modern, interactive
CakePHP website...where can we learn how to actually /run/ the
website? Can you recommend any books or forums that provide a good
introduction to all the legal, administrative and technical issues?
For instance, best practices for
How can I run code on AuthComponent's successful login _event_? For
example, to record the login date/time in the database?
I've tried writing my own login() action in the controller--but by the
time that function executes, login has already been performed by the
component--so I don't know
.
On Feb 2, 1:30 pm, Miles J mileswjohn...@gmail.com wrote:
I added the this functionality to one of my plugins:
http://github.com/milesj/forum/blob/master/controllers/users_controll...
On Feb 2, 1:22 pm, Johnny Cupcake sparklew...@hotmail.com wrote:
How can I run code on AuthComponent's
(FORM_NOT_EMPTY
CREDENTIALS_NOT_ALREADY_REJECTED).
I swear, I did read the docs before I asked in the first place ;)
On Feb 2, 1:22 pm, Johnny Cupcake sparklew...@hotmail.com wrote:
How can I run code on AuthComponent's successful login _event_? For
example, to record the login date/time
Ack, my post was auto-mangled. There is a difference there: vs.
amp;. Try the Show original link on the post.
On Jan 28, 12:08 am, Jeremy Burns jeremybu...@me.com wrote:
Aren't those two outputs the same?
Jeremy Burns
On 28 Jan 2010, at 07:59, Johnny Cupcake wrote:
My code (Cake 1.2.5
., 10:00, Johnny Cupcake sparklew...@hotmail.com wrote:
Ack, my post was auto-mangled. There is a difference there: vs.
amp;. Try the Show original link on the post.
On Jan 28, 12:08 am, Jeremy Burns jeremybu...@me.com wrote:
Aren't those two outputs the same?
Jeremy Burns
On 28
, Miles J mileswjohn...@gmail.com wrote:
Yes .htaccess is required because its uses mod_rewrite. If you didn't
your URLs would be like so:
index.php?url=/items/view/
On Jan 27, 1:18 pm, Johnny Cupcake sparklew...@hotmail.com wrote:
This issue was last discussed here in 2006, as far as I can tell
...@gmail.com wrote:
On 28 ene, 23:49, Johnny Cupcake sparklew...@hotmail.com wrote:
Right, I was referring to mod_rewrite and not .htaccess in
particular.
I see the links generated by HtmlHelper are wrong too. They point to
/app/webroot/filename when Apache's root is already set to /app
This issue was last discussed here in 2006, as far as I can tell. I'd
like to know if anything has changed since then.
Are pretty URLs available without using .htaccess? For example, with
my Apache document root set to my app's webroot dir, a controller
items and an action view, and scaffolding
My code (Cake 1.2.5):
echo $html-url( array(
'controller' = 'users',
'action' = 'activate',
'?' = array('e' = 'EMAIL', 'c' = 'CODE')), TRUE );
The output:
http://localhost/index.php/users/activate?e=EMAILc=CODE
This output is wrong, right? Should be:
Wondering if there is some method of moving the SQL debug information
from the bottom of the page with some kind of variable.
This may be nitpicking, but I'm sort of irritated with how cake is
placing it outside my /html tag.
something like:
... default.ctp layout file ...
?php echo
://code.cakephp.org/wiki/1.3/migration-guide/bake-updatesnotes
about bake as bake had a fairly significant set of changes done to it
for 1.3 and the location of the templates has changed a bit.
-Mark
On Sep 29, 11:48 am, Johnny joh...@codynamic.com wrote:
I recently started playin around with the 1.3 dev
I recently started playin around with the 1.3 dev version of cake and
i'm having problems with using custom view templates for bake. I place
them in the app/vendors/shells/templates/views folder but bake ignores
them and still uses the default templates that come with cake.
In cake 1.2.5
I found this article to be usefull regarding prefix routing:
http://www.pagebakers.nl/2008/12/04/cakephp-router-and-prefixes/
It shows how you can get the right urls for paginator, links and forms
using cake's prefix functionality.
On Apr 12, 11:05 pm, Hazem Mohamed hazeim...@gmail.com wrote:
I have the following routes set up for the front end of my app:
Router::connect('/become-our-client', array('controller' = 'users',
'action' = 'register'));
Router::connect('/contact-us', array('controller' = 'contact',
'action' = 'contact_us'));
Router::connect('/latest-projects',
Scaffold is not supposed to be used in production environments.
Use bake instead to physically create the model,view and controller
files and edit those according to your needs.
On Mar 20, 5:54 pm, Alejandro Weintz Aguilar
alejan...@pixelestudios.com wrote:
Hello, I am build a large proyect
if you are using the Auth component for user authentification, you can
check if a user is logged in or not simply by using:
$session-check('Auth.User.id')
as a condition in your if clause
On Feb 19, 5:19 pm, amarradi radis...@googlemail.com wrote:
I found the solution
I set an username on an
54 matches
Mail list logo