Yes, whether it is right or not, that is the way cake behaves. You should
always use Model::create() before saving a new record just in case.
For the extra paranoid, you can do this on your add() action:
$this-Model-create($this-data, false);
$this-Model-save();
The second parameter (false)
Hi Vijay,
Have a look at the source of controller.php in constructClasses() and you will
see what Ralph is experiencing. Line numbers are indicative of r8204 (current
branch).
line 448:
$id = $this-passedArgs['0'];
line 452:
$this-loadModel($this-modelClass, $id);
Cheers,
Adam
-
Setup a route like this:
Router::connect('/categories/*', array('controller' = 'categories',
'action' = 'index'));
Then in your index() method of CategoriesController you can then check for
the additional params in $this-params...
This is not so dissimilar how Cake's PagesController works.
23, 2:26 pm, toka...@gmail.com toka...@gmail.com wrote:
Hi Adam,
thanks a lot, I did not realize that it is so easy... I have already
try it and it is working. :)
anyway good point with the whole path...
Tomas
On Jun 23, 12:45 pm, Adam Royle a...@sleekgeek.com.au wrote:
Setup a route
Each and every CakePHP app is like a hand-woven Persian rug - unique and
each comes with its own beautiful imperfections.
I implore you to accept our flaws as part of our personality and embrace all
that is CakePHP!
Cheers,
Adam
- Original Message -
From: Nate Brunette
that operation in a standard way?
Thanks,
Mateo
On 22 jun, 00:45, Adam Royle a...@sleekgeek.com.au wrote:
Yes. You must start and end atransactionwith the same mysql connection.
MySQL connections are automatically closed once the page has finished
executing. Aredirectstops the current page execution
Yes. You must start and end a transaction with the same mysql connection.
MySQL connections are automatically closed once the page has finished
executing. A redirect stops the current page execution.
Cheers,
Adam
- Original Message -
From: Mateo San Román sanroma...@gmail.com
To:
Put this in app/views/users/xml/index.ctp
?php
echo 'users';
echo $xml-serialize($users, array('format' = 'tags'));
echo '/users';
?
and put this in app/views/layouts/xml/default.ctp
?php
echo $xml-header();
echo $content_for_layout;
?
XML it doesn't show as XML in your browser if debug is
Look into admin routing in the cakephp cookbook.
Cheers,
Adam
On Jun 19, 12:44 pm, thatsgreat2345 thatsgreat2...@gmail.com wrote:
I'm a little confused by routes at the moment. Currently I have an
admin structure where each function such as
function users($load = null, $id = null) {
Does this work?
$this-Item-setSource($locationId.'_items');
Cheers,
Adam
On Jun 19, 12:43 pm, VisionIzoizo mauro.tr...@googlemail.com wrote:
Hi, I have one big table named 'items'. It's split into many views,
according to a custom defined criteria (location). I want to access
these views
Why certainly! In your AppController add this:
function beforeFilter() {
if (!empty($this-params['facebook'])) {
$this-viewPath = 'fbml';
}
}
And then you would have your fbml view in:
app/views/YourModel/fbml/index.ctp
and then you put your xhtml view in:
You need to handle this manually. Look at the Sanitize class for cake's
built-in methods.
http://api.cakephp.org/class/sanitize
If you don't need the user to enter any html at all, consider using the h()
method while outputting your data, which will convert any html tags to their
entities so
Message -
From: Marcel vermas...@gmail.com
To: cake-php@googlegroups.com
Sent: Wednesday, June 17, 2009 10:58 PM
Subject: Re: CakePHP XSS protection?
Adam Royle wrote:
You need to handle this manually. Look at the Sanitize class for cake's
built-in methods.
http://api.cakephp.org/class
There is no code you need to change to get ssl working with cakephp. Make
sure you have ssl setup on the site correctly with just static files first.
Cheers,
Adam
- Original Message -
From: rakesh singh rcky.ni...@gmail.com
To: CakePHP cake-php@googlegroups.com
Sent: Wednesday, June
A bit hard to diagnose without seeing any code... but is your form posting
to the login action?
And also make sure cookies are enabled in your browser.
Cheers,
Adam
- Original Message -
From: uday singh.uday...@gmail.com
To: CakePHP cake-php@googlegroups.com
Sent: Thursday, June 18,
I see from a previous email you overrode your AppHelper to automatically
prepend /fb onto all of your links which is causing the prob. Short of
re-writing your links everywhere, you could modify this method so absolute
files are not prepended with /fb.
Cheers,
Adam
- Original Message
Hi Femi,
You should really just use one query for that with a number of joins and let
the database do all the work. My advice is to get someone familiar with sql and
construct the raw query and get it running at a decent speed inside the mysql
console, and then find a way to get that sql into
and closely followed standards
on that. I honestly just wanted to avoid writing a custom query (lazy me). Was
only hoping that there was a way to avoid custom queries. Will give that a try
then.
Thanks!
Femi
Adam Royle wrote:
Hi Femi,
You should really just use one query
I am fairly certain that each related model will take care of it's own
beforeSave and afterFind callbacks, so you should just need to handle
encryption/decryption for the primary model, and each other model that is
saved/found will handle its own as well.
Cheers,
Adam
- Original Message
Wow. Sorry, I didn't read your entire email. But a few things..
1) Yes, generally you have just one table per model per controller.
2) A more flexible solution is to have your menu heirarchy to be separate
from your controller/action heriarchy. This will allow you to separate your
visual
('Transaction.jurisdiction_id ='=$id),'fields' = array
('Transaction.id','SUM(Transaction.amount) AS Amount';
I don't know if that has anything to do with why I can't any array PHP
functions like remove(), array_chunk(), array_slice() etc to work.
-sam
On Jun 15, 5:32 pm, Adam Royle
If I am doing something like this I generally just create a string and pass
it through. Make sure to encapsulate it in parenthesis () in case you have
other conditions.
$event_conditions = array(
'(Event.start BETWEEN DATE_SUB(CURDATE(), INTERVAL 1 DAY) AND
DATE_ADD(CURDATE(), INTERVAL 7
testDecrypt in
the Post model...all it did was a find('all') with recursive set to 3.
I then pr()'d the result and used die() to stop operation. All post
titles were decrypted (they were encrypted in the database) but the
user emails showed up as encrypted.
On Jun 16, 9:24 pm, Adam Royle
chmod +x /home/mileswj/cake/console/cake
then put this in cron
/home/mileswj/cake/console/cake your_shell_name -app /home/mileswj/
sc2armory.com/app/
Cheers,
Adam
On Jun 15, 6:25 pm, Miles J mileswjohn...@gmail.com wrote:
Heres my current folder setup.
/home/mileswj/cake/ (below root and
use this function, it works well...
// recursively reduces deep arrays to single-dimensional arrays
// $preserve_keys: (0=never, 1=strings, 2=always)
function array_flatten($array, $preserve_keys = 1, $return = array()) {
foreach ($array as $key = $child) {
if (is_array($child)) {
$return
cake is a shell script which needs to be chmod'ed to 755 to allow being
executed (also chmod +x will do that)
If you're getting the output of the file instead of it being executed, then
it seems you're passing the script onto something else (such as the php
interpreter) rather than executing
Sure...
Router::connect('/AppName/facebook/:controller/:action/*', array('facebook'
= 1));
then in your app controller just check for
$this-param['facebook']
- Original Message -
From: Greg Baker greg.baker@gmail.com
To: CakePHP cake-php@googlegroups.com
Sent: Tuesday, June 16,
if $this-params['facebook'] were set? Would this be possible using
routing or would I have to do something else?
On Jun 15, 10:36 pm, Adam Royle a...@sleekgeek.com.au wrote:
Sure...
Router::connect('/AppName/facebook/:controller/:action/*',
array('facebook'
= 1));
then in your app controller just
http://book.cakephp.org/view/809/find-count
- Original Message -
From: Wayne smittysand...@gmail.com
To: CakePHP cake-php@googlegroups.com
Sent: Sunday, June 14, 2009 6:55 PM
Subject: Cakephp equivalent of mysql_fetch_row
Hi,
i need a function that returns the number of rows from a
I guess it depends if you have any shared images that might be generic and
used with all languages.
If you want to override the helper, you can do it by creating an AppHelper
class in app/app_helper.php
Although this does change your functionality and you would have to duplicate
any shared
You will need to exclude the portfolio directory from being sent to your
default cake installation. Something like this might work...
IfModule mod_rewrite.c
RewriteEngine on
RewriteRule^$ app/webroot/[L]
RewriteCond %{REQUEST_URI} !^/portfolio(/|$)
RewriteRule(.*)
I found this problem too, when I was sending emails using a cron job, and
needed to link back to the site. However there is an easy workaround.
I am using the EmailTask from the Bakery, and added importing the router and
routes definitions in here.
?php
App::import('Core', 'Controller');
Something like this should work (as long as you include the
RequestHandler component). Personally, I use an extra field rank in my
table which is just an integer.
if ($this-RequestHandler-isAjax()
!empty($this-params['form']['tableId'])) {
foreach ($this-params['form']['tableId'] as
Can you be more explicit about what you are looking for? Is there
something in particular you don't know how to do?
Adam
webperson wrote:
Hello,
Does anyone know of a single sole source of free phpcake tutorials? I
have found and completed all of the ones I could find, but I am
assuming
Yes, CakePHP has a separate folder for each controllers views, but I
would imagine if you had a ton of controllers you might want to separate
them anyway?
I recommend you stick with the conventions to start with, and further
down the track if you still want to change it, you'll find a way.
Oh right I see what it's doing now. I would say that it's a bug then.
CakePHP should not generate invalid SQL queries. Although I'm pretty
sure Cake adds the id field to the field list because it is required for
recursively finding associated records, it could prob be modified to
always add
I think the majority of CakePHP users are using MySQL, so it could be a
bug in the cake's MSSQL datasource. You should do some investigating
into what query is generated, does it run if you try it through sql
server directly? If not, what needs to be changed for it to work? Then
look at the
Looking at the Security component source, you need to override the
validatePost value in SecurityComponent. The following is untested code,
but I think it should work.
function beforeFilter() {
if ($this-action == 'your_action') {
$this-Security-validatePost = false;
}
Have you looked into admin routing?
You'll just need to prefix your actions and your views with admin_ to get
it to work (and enable it in app/core.php)
And then set up a route for your admin homepage, which would point to
AdministratorsController::admin_dashboard()
Router::connect('/admin',
Both protaculous and jquery (and prob most other js libraries) have a
sortable function so you can drag and drop records (re-ordering) with
your mouse, and a serialize function so you can send the re-ordered ids
back to the server to update the database.
I'm sure you could also do the move
You might want to give some examples of your code if you want anything
more specific than what I have said.
However, if you aren't already, use Firebug to look at what URLs flash
is requesting.
And make sure you have debug = 0 when doing this so you can easily see
404 errors when they occur.
What data type are you using for your lft and rght columns?
I'm not sure if it will help you, but have a browse over my article
which has all the code to get the Tree behavior working and see if
you're doing anything differently.
I think you're on the right track with your thinking.
1) You should route to your users controller, not the pages controller
Router::connect('/search', array('controller' = 'users', 'action' =
'search'));
2) You should explicitly set your search form url.
echo
Due to the way plugin controllers work with inheritance, you can only
access the plugin's beforeFilter logic when the page is requested
through the plugin (ie. /plugin/controller/action/)
From what I can tell you want to execute plugin logic from your base app?
The proper way to do this is
Brian is right. You need to change the path to be relative to the root
of your site, not the page.
So change this:
media/jpgrotator.swf
to this:
/media/jpgrotator.swf
In all instances and it should work.
Also, if you are loading other swfs, images, text files, etc, from
inside flash,
Try debugging by putting logging statements in your code step by step and
see what you get.
$this-log('yayaya');
And you can check them inside app/tmp/logs/
Cheers,
Adam
- Original Message -
From: benjam benjamwel...@gmail.com
To: CakePHP cake-php@googlegroups.com
Sent: Saturday,
Depends on your server setup. Two solutions:
1. Write a script that is called periodically through cron that checks
an email mailbox for new messages.
2. Setup your email account to pipe to a script instead of to a mailbox.
I have used #2 and it works well because the script only runs when it
I've done it using cpanel (quite easy actually), and from some googling
it seems possible with plesk too. Just search for your control panel
name pipe email to script.
With #1, you can use php imap extension, which lets you access both pop
and imap mailboxes.
Adam
leo wrote:
Thanks, I'd
Sounds like you have a typo somewhere (maybe you've got plural instead
of singular?). Cake automatically creates models if they don't exist.
Therefore it is creating a model (an instance of AppModel) and your
method is not defined in AppModel.
Make sense?
Adam
Mr Speaker wrote:
I think I
I would probably add another model, Post, like you've mentioned. I would
also probably create a behaviour that would exist in all the sub-post
models, which would add and remove a link from the Post model on
save/delete.
Although I haven't used it myself, it looks like you could then use
I think the comments should stay, but improve the functionality to make
them more useful/constructive.
Develop a upvote/downvote system for comments. This should eliminate
stupid comments from wasting people's time, and the popular comments
should indicate what parts of the manual could be
var $hasAndBelongsToMany = array('Developer','Publisher');
- Original Message -
From: mklappen mklap...@gmail.com
To: CakePHP cake-php@googlegroups.com
Sent: Tuesday, February 17, 2009 9:24 AM
Subject: Can you have multiple hasAndBelongsToMany relationships in one
model?
Hi,
I'm
Have you checked your database connection? (Just a thought)
Also, with shells you need to ensure you execute the shell from the app
folder, or specify the path to your app in -app
Cheers,
Adam
Kyle Decot wrote:
I'm trying to create a shell but I'm running into some problems. If I
add $uses
Your syntax is not valid. Try reading up on the new form helper on the
cookbook.
http://book.cakephp.org/view/183/Creating-Forms
Cheers
Adam
simon...@gmail.com wrote:
Good Night,
I'm trying to make this code work but they are 3 problems with it.
Here are the 3 errors:
Method
I don't tend to cache data by itself, as like you've said it generally
won't save you much time vs mysql alone. I do use view caching on busy
sites for static content and also for elements, as it can give a
noticeable improvement.
I guess it really depends on your traffic and the type of site
I use svn:ignore on app/config/database.php, and only commit a generic
database.php.default file (that contains no usernames/passwords). Each
time I checkout the code (dev, staging, production) I rename
the .default file to database.php and make my edits on the server. So
ultimately no passwords
I think you might benefit from a deploy script. I have a bash script
that updates the site code from subversion and clears my cache dirs at
the same time. I have command-line access and it runs on linux, so
it's pretty easy to do that.
On Feb 9, 9:30 am, Miles J mileswjohn...@gmail.com wrote:
I do something similar and it works quite well for my purposes,
however I save my images in /files/images/, and I use behaviors to
abstract the file management away from my model.
So usually I have something like this:
Image actsAs ImageBehavior (subclass of FileBehavior)
Cheers,
Adam
On Jan
Yes, it would be great to have a fully-fledged application example,
complete with time to develop and lines of maintainable code
benchmarks. And another one which measures mental anguish experienced
by the framework.
On Jan 26, 7:38 am, Miles J mileswjohn...@gmail.com wrote:
Yes I always hate
Hi Carlosz,
#1. I find using a gui db program is much quicker than defining
everything in a text file. I use navicat and it's awesome.
However...
#2. CakePHP does have a thing called CakeSchema, which can be used to
generate table structures from a file definition. For more info, look
at the
I would recommend using routes to accomplish this - you don't need to
write to a static html file.
http://book.cakephp.org/view/542/Defining-Routes
Cheers,
Adam
On Jan 24, 6:48 pm, Sumesh G sathees...@gmail.com wrote:
thanks for your reply
i want to create the html pages with the dynamic
Can you explain why you need different tmp directories for the same
actual app? If it's for caching, etc, maybe you can use a cache prefix
dynamically?
Cheers,
Adam
Martin Westin wrote:
Hi (again),
I want to try to host one application under several domains.
One Cake
One App
Many configs
Btw, it wasn't deleted, only the version and milestone metadata
was deleted from the ticket. It is still an open ticket.
Cheers,
Adam
On Jan 19, 6:26 pm, kiang kia...@gmail.com wrote:
I submitted a ticket about adding tag feature to cache and it got
deleted
Personally I find it easier to define all associations and use
Containable or recursive = -1 to define what data I get back. It's
easier to understand for me and works fairly well, makes it quick to
develop and easy to debug.
The only potential downside is that every associated model is loaded,
This error happens when the image doesn't exist, and the request is
forwarded to cakephp. Make sure the file is there and case-sensitive
if on linux.
Cheers,
Adam
On Jan 16, 8:48 pm, g4b0 gabriele.bros...@gmail.com wrote:
Hi all,
I'm trying to put some images in /app/webroot/img/photo, but
Yes, I would say most people use the controller/action/params type
urls.
Most people's thoughts about passing the action through a POST instead
of a GET to make it more secure are moot. You can fake (and modify
variables) in a POST request just as easy as you can with GET.
Your post indicates
If it's just a simple function, then you can place it in bootstrap.php
and it will be globally available.
Cheers,
Adam
On Jan 12, 8:51 pm, Henrik Gemal henrikge...@gmail.com wrote:
I have a custom html escape function that I like to be able to use in
two views.
What's the best way to share
I've had a tree with that many records and had no issues re-ordering
it (maybe 1-2 seconds max).
I seem to remember needing to set $this-MyModel-recursive = -1;
before calling the reorder methods. Maybe that is your problem - you
might be selecting more than you need to?
Maybe you should show
Try this in your model...
class Whatever extends AppModel {
function beforeSave() {
$data = $this-data[$this-alias];
if (!empty($data['title'])) {
$data['title'] = ucwords($data['title']);
}
return parent::beforeSave();
}
}
Your could then
Maybe you could try a real tree component?
http://blogs.bigfish.tv/adam/2008/02/12/drag-and-drop-using-ext-js-with-the-cakephp-tree-behavior/
Cheers,
Adam
On Jan 9, 8:19 pm, designv...@gmail.com designv...@gmail.com
wrote:
Has anyone done aything along the lines of dynamically adding divs/
Just add a physical amount field to your orders table, and then add
a method to your Order model which calculates the order total and
updates the order. Then call that method whenever you add/modify/
delete your OrderProducts.
On Jan 6, 8:21 am, Yannis i...@netstudio.gr wrote:
I have this kind
If you're sending unique data for each request, I wouldn't bother
using the MediaView. Just output data in your views and set some
custom headers.
You can also find out about an easier way to gzip output in cakephp
here:
Todays databases are designed to handle a crapload of queries, so
don't be afraid to take advantage of this. Just make sure you've got
indexes on the right columns and your queries are using those indexes.
You could possible create another table which is optimised to hold any
database changes
It is my understanding that CakePHP is planning to migrate to jQuery
in the near future (much like the rest of the world, even my
grandmother, and she doesn't even have a computer!).
I use jQuery to add an extra row by cloning the last row, incrementing
the ids and names of the elements and
For simplicity's sake I would keep them in the one table, and
dynamically change the $validate array in my beforeValidate method of
the model to suit.
I've never used this but it may help you:
http://bakery.cakephp.org/articles/view/conditinalvalidation-behavior
Cheers,
Adam
On Dec 26 2008,
Yes, you've got the categories/products thing set up as I would do it.
With ordering, you can do it both ways:
1) Just for this association - use the 'order' key when setting up the
association in categories model... eg.
works fine, but the
second one doesn't.
I've added it to the top of the Product model, just below the $name
variable, like so:
var $name = 'Product';
var $order = 'Product.title ASC';
Any idea?
On Dec 30, 10:04 pm, Adam Royle a...@sleekgeek.com.au wrote:
Yes, you've got the categories
I don't usually care about routes for my admin controllers since no
one except administrators see them, so if it was me I wouldn't worry
about it.
However you could probably simplify your routes:
Router::connect('/admin/islandnews/:action/*', array('controller' =
'newsletters', 'admin' =
Is it possible that you can just overwrite the tag list with your HTML
equivalents?
http://bakery.cakephp.org/articles/view/overriding-specific-html-tags-before-using-helper-methods
Cheers,
Adam
On Dec 29, 8:24 am, gearvOsh mileswjohn...@gmail.com wrote:
I have not found any option or setting
Have you tried turning debug to 2 and seeing what the error is?
Cheers,
Adam
On Dec 25, 3:40 am, Jne goo...@neuveglise.net wrote:
Hi,
on my website I have a 'movie_comments' controller and a feed($id)
action.
With RC3 :http://sph3re.tv/movie_comments/feed/151.rssis outputting the proper
complaining about view
not found but it's looking for the wrong one since the feed.ctp is in
the views/movie_comments/rss/ dir as it is supposed to be.
Thanks !
Jérôme
On 25 déc, 09:48, Adam Royle a...@sleekgeek.com.au wrote:
Have you tried turning debug to 2 and seeing what the error
Controllers talk to models, not the other way round, so you would need
to call a method in your model from your controllers, passing the
params as necessary.
On Dec 23, 8:52 am, gearvOsh mileswjohn...@gmail.com wrote:
No not that. In the models beforeValidate() is it possible for me to
do like
to track the view path ?
Thank you !
Jérôme
On 25 déc, 12:14, Adam Royle a...@sleekgeek.com.au wrote:
Hmm... that's unusual. I did a quick test with one of my apps that
uses parseExtensions, upgraded it from RC3 to RC4 and it worked as
expected.
Maybe there is something else in your
Admittedly I skimmed through your post, but what sql is executed? Are
sure you sure you've attached the Containable behavior to your model?
Cheers,
Adam
On Dec 26, 1:28 pm, Aidan Lister aidanlis...@gmail.com wrote:
I'm having trouble with the Containable behavior.
My first query,
?php
I don't really understand your question... are you asking if you can
see what data is going to be saved from inside the beforeValidate()
method?
If so, look at $this-data
Cheers,
Adam
On Dec 22, 8:20 pm, gearvOsh mileswjohn...@gmail.com wrote:
Thanks, also is there a way I can get the
The best solution is to write a patch and submit it into the cake
core.
On Dec 20, 11:22 am, Jaime ja...@iteisa.com wrote:
Hi all,
I did a nice app which makes heavy use of Inflector::slug() to convert
My Strings inoto my_strings.
However, now I find that the core slug() function is not
If you look at the page title, it says PD Reality | Errors - this
indicates there were errors. Double-check to make sure you have
uploaded all files, database connection is fine, and you've cleared
the tmp folders. Set debug = 2 and it should show you what is going
wrong. Otherwise, check the app
Oh, and make sure you have writable tmp folders and mod_rewrite and
AllowOverride, etc, all the things you should check for a standard
install.
On Dec 21, 6:44 pm, Petr Vytlačil petr.vytla...@gmail.com wrote:
Hi i developing a application for my friends, i try this applicaton on
two webhosting
I was the same as you when I first started, but over time I started
seeing the usefulness of cake's magic.
You can change the label easily by doing this:
?php echo $form-input('email', array('label' = 'Your Email
Address:')); ?
Cheers,
Adam
On Dec 22, 6:58 am, justclint justcl...@gmail.com
When defining class properties you can't use expressions - only data
structures, so you need to populate the $validate array dynamically
inside the model. You can do this in beforeValidate() method in your
model, but be sure to return true.
beforeValidate() {
$this-validate['fieldName'] =
If you are upgrading from 1.1 there could be many things that are
tripping you up. You controller code looks fine, although I would
change your view code to this:
?php
echo $form-create('User');
echo $form-input('about_me', array('type' = 'textarea');
echo $form-end('Submit');
?
Also, in 1.2
What you are doing is perfectly fine, I personally use $this-helpers
[] = 'Blah'; since it's quick and easy.
Cake will only load your helper once even if it appears multiple times
in your helpers array, so don't even worry about checking for this.
Heck, just include it twice to make sure it
By the way, you can also do this:
$this-log($this) if you want to really analyse the request. :)
Cheers,
Adam
On Dec 19, 12:13 am, WebbedIT p...@webbedit.co.uk wrote:
Tested your theory that something in my page with a local relative
path was calling the page again. To do this I added an
Well, Is is not actually a plural... so... what behaviour would you
expect?
Maybe some context of where you are using this would be beneficial.
Cheers,
Adam
On Dec 19, 12:45 pm, bingo ragra...@gmail.com wrote:
hi bakers,
I just stumbled across a weird problem and not sure whether its a bug
CakePHP doesn't discern between html attributes, by default it escapes
all attribute values. If you want to change this behaviour, then you
can pass 'escape' = false as part of that second array, *however* you
will manually need to escape all other values (including the input
value I believe).
A
Hi Paul,
You can also access the validation errors directly in the view, so you
could just have this in your controller...
$this-User-save($this-data);
and something like this in your view...
?php
$response = array(
'success' = empty($this-validationErrors),
'errors' =
I use Firebug in this case to see what files are being loaded, and to
make sure I'm getting no 404s on things like js or css files, etc.
Cheers,
Adam
On Dec 13, 8:34 pm, cakephpro...@googlemail.com
cakephpro...@googlemail.com wrote:
Hello,
I'm using the unobtrusive datepicker
Hi Mr Timp,
Yes, your example looks a bit old/odd. The correct equivalent of :
$this-User-data = $this-data;
is this:
$this-User-set($this-data);
This will ensure $this-User-id is updated with the correct value.
However, having said that, most of the code you've got seems unneeded.
Replace
I can't explain why it is concatenated (certainly seems odd to me too)
but until you figure out if it's a bug or a feature, could just
manually set $this-output = ''; after your render call.
Cheers,
Adam
On Dec 13, 12:24 pm, seedifferently seedifferen...@gmail.com wrote:
Dear group,
I'm
Hi kiang,
At first I thought you were insane, because I was returning 1000 rows
in an array and all was fine... except then I tried with longer data,
and got the same problem as you experience. So I did some debugging
and have found the solution!
Cake was always returning 0 as the length of the
1 - 100 of 389 matches
Mail list logo