gallery model and image model has blinded..but when i retrive images
from galleries_controller i cant see any result..and see this error
Warning (2): Invalid argument supplied for foreach() [APP\views
\galleries\view.ctp, line 35]
function view($id = null) {
if (!$id) {
On Wednesday, January 11, 2012 1:29:39 PM UTC+7, OJ Tibi - @ojtibi wrote:
Thiago, a HABTM join table by nature has disposable records as used by
CakePHP. For example, every time you rebuild how the Tags are linked to
Articles or vice-versa, the records from the `articles_tags` table that
This isn't working :\
Here's my Behavior
?php
class CleanableBehavior extends ModelBehavior {
function beforeValidate ($model) {
foreach ($model-data as $modelAlias = $modelData) {
if (isset($model-hasMany[$modelAlias])) {
foreach ($modelData
as miles said
best at the very top of your file
?php
HERE
On 11 Jan., 03:32, jmail ad...@jmail.pl wrote:
H. That is strange. Why is that working on other controller for
admin?
Where should I put this App::uses? Can I put this somwhere in
AppController?
I have added that into the
Dear all,
thank you for your help...
I found out that i simply just mess up the folder structure.
The hint with baking the code is just the best.
I'll will start with baking and refining afterwards.
This Thread is solved now, thanks to all
Christian
On 7 Jan., 12:33,
This line duplicates layout:
echo $this-requestAction($url, array('bare'=false , 'layout'=
'/templates/business/default.ctp', 'return'));
Anyway, you should wrap views with layouts, this view/layout/requestAction
logic looks messy.
Can you write what are you trying to accomplish and paste
It would be cool to see a plugin that did this. Or, feel free to post an
RFC ticket on lighthouse. Like Thiago said, it would be great if you also
backed it up with code :)
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions
Try something like this: https://github.com/jeremyharris/cacher
It's a plugin I wrote that caches query results, exactly as you want.
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help
Oops, I meant to have you set it in the controller, like this:
// in the controller
$this-Model-set($this-data);
$this-Model-saveAll();
This puts the $data into Model-data (which honestly, saveAll should do).
If this doesn't work then maybe something else is going on, because I've
modified the
Hi all,
I want to change the default layout in 2.0.5 but the only instruction
I can find is to create: APP/View/Layouts/default.ctp.
But I want to edit the existing one, so that I can see clearly how
it's already structured, not to define my own brand new one from
scratch.
It seems this was
It's the same as it always was; grab the one from the main Cake library and
paste into the location you mention below, then edit away.
Jeremy Burns
Class Outfit
http://www.classoutfit.com
On 11 Jan 2012, at 15:26:04, burntcake wrote:
Hi all,
I want to change the default layout in 2.0.5
at this point it's simpler to override the saveAll() function in my AppModel
function saveAll ($data = null, $options = array()) {
//some loops to clear the unused records
return parent::saveAll($data, $options);
}
but that's what i'm trying to avoid :)
--
Our newest site for the
Sadly, yeah. It's truly odd that modifying $this-data didn't stick.
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from
FYI it's here (the same as your app structure): / lib / Cake / View /
Layouts / default.ctp
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related
Thanks for your replies, I was looking in the app dir as specified (I
don't have an APP) dir, not in lib/Cake/View/Layouts... I'm not sure
why the default page specifies a (seemingly) different dir.
Thanks,
Glen.
--
Our newest site for the community: CakePHP Video Tutorials
On Jan 11, 5:22 pm, burntcake glen_corco...@yahoo.com wrote:
Thanks for your replies, I was looking in the app dir as specified (I
don't have an APP) dir, not in lib/Cake/View/Layouts... I'm not sure
why the default page specifies a (seemingly) different dir.
out of curiosity - did the idea
Hi, I'm new to cakephp and I want to know more about transactions in
saveAll().
This is my script:
?php
...
$this-BranchRequest-query('SET AUTOCOMMIT = OFF');
$this-BranchRequest-begin();
if(!$this-Count-save($this-count_header))
{
$this-BranchRequest-rollback();
see atomic option for saveAll()
2012/1/11 Patrick emailnya.patr...@gmail.com:
Hi, I'm new to cakephp and I want to know more about transactions in
saveAll().
This is my script:
?php
...
$this-BranchRequest-query('SET AUTOCOMMIT = OFF');
$this-BranchRequest-begin();
Just place it in bootstrap so all pages inherit it.
On Jan 11, 2:54 am, euromark dereurom...@googlemail.com wrote:
as miles said
best at the very top of your file
?php
HERE
On 11 Jan., 03:32, jmail ad...@jmail.pl wrote:
H. That is strange. Why is that working on other
I've tried changing the 'atomic' option to 'false', but apparently
there is no difference.
Still can't rollback() when saveAll() fails or when the save($this-
count_code) fails.
When I replace saveAll() with save(), it can rollback as I want, from
begin().
But with save() function, I could't save
lol, yeah I wrote it myself, hence MyClass.
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
probably the problem ist that 'atomic' should be boolean false, not the
string 'false' which will be evaluated to
(bool) true...
Am 11.01.2012 19:01, schrieb Patrick:
I've tried changing the 'atomic' option to 'false', but apparently
there is no difference.
Still can't rollback() when
Hi I have exactly the same problem, did you figure out something ?
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from
Hi All,
I'm looking for a way to pass a multidimensional array through named
arguments.
Array
(
[state] = NY
[city] = Array
(
[0] = New York
[1] = Brooklyn
)
)
When i do
It is possible in 2.0
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
Hi there, I am migrating my base app from 1.3x to 2.0.5. I have copied
a lot of my code and I am changing where is necessary...
Auth component is configured, but it is allowing any username/password
to log in and message of invalid username is not appearing.
Link to my code:
This is built into 2.0, but not 1.3. So... no. You might be able to use
Set::flatten() and pass those instead, then unflatten them in the
controller. Here's some code for unflattening that I wrote a while back:
public function unflatten($data, $separator = '.') {
$result = array();
foreach
You can try something like I suggested here:
https://groups.google.com/forum/?hl=en#!topic/cake-php/DtQaksHP1ic
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their
Thank you very much for your response Jeremy, could you where should I put
this function and when should i call it ?
On Wed, Jan 11, 2012 at 1:47 PM, jeremyharris funeralm...@gmail.com wrote:
You can try something like I suggested here:
http://book.cakephp.org/2.0/en/tutorials-and-examples/blog-auth-example/auth.html
check this
it was some changes created :)
--
Lep pozdrav, Tilen Majerle
http://majerle.eu
2012/1/11 Glauco Custódio glauco.custo...@gmail.com
Hi there, I am migrating my base app from 1.3x to 2.0.5. I have
It should probably go in the controller, since it's dealing with the
params. Maybe call it in beforeFilter to massage the params?
Personally, I would avoid magically converting them because you may come up
with unwanted results. Instead, I would call it when I know I flattened the
parameters
Thanks Jeremy I will try
On Wed, Jan 11, 2012 at 2:15 PM, jeremyharris funeralm...@gmail.com wrote:
It should probably go in the controller, since it's dealing with the
params. Maybe call it in beforeFilter to massage the params?
Personally, I would avoid magically converting them because
This looks perfect Jeremy. Thanks!
On Jan 11, 6:54 am, jeremyharris funeralm...@gmail.com wrote:
Try something like this: https://github.com/jeremyharris/cacher
It's a plugin I wrote that caches query results, exactly as you want.
--
Our newest site for the community: CakePHP Video
Cool, hope it works out for you!
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
@jeremy - Now that is sick. Was trying for so long to cache SQL data
via a behavior but never thought to use a datasource as well. Will
give this a try.
On Jan 11, 1:23 pm, jeremyharris funeralm...@gmail.com wrote:
Cool, hope it works out for you!
--
Our newest site for the community: CakePHP
Works perfectly, thanks again!
On Wed, Jan 11, 2012 at 2:50 PM, Peter Brown pe...@sponsorhub.com wrote:
Thanks Jeremy I will try
On Wed, Jan 11, 2012 at 2:15 PM, jeremyharris funeralm...@gmail.comwrote:
It should probably go in the controller, since it's dealing with the
params. Maybe
Cool! Make sure to read the notes about the cache not being accurate when
joined data is deleted.
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related
Glad I could help!
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
I am using the plugin cakeDC Utils (CSVImport - Link Below) with
cakephp 2.0.4 and everything works however when the csv is imported it
is adding in an additional blank record at the end, does anyone else
have this issue and know how I can fix it?
Thanks
LINK: https://github.com/CakeDC/utils
39 matches
Mail list logo