Re: Amazon simpledb

2011-11-15 Thread dtemes
Thanks, I did not know Lorenzos implementation. The sdb datasource is already able to do some basic CRUD operations and finds. Development is going slow as I spend a lot of time looking at other datasources code, and also at the core libs. I will make it available via a git repository within a fe

Re: Cake 2.0 Auth Component login method

2011-11-15 Thread Serkan Sipahi
hi, look at here: http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html -> Identifying users and logging them in -> read the notice: Warning -> In 2.0 $this->Auth->login($this->request->data) will log the user in with whatever data is posted, whereas in 1.3 $this->Auth->

Re: UnitTests - The Real World

2011-11-15 Thread Thiago Belem
Thank you Jeremy... I've just started to write TestCases to my main models, where's what I did: - Created fixtures based on database schema + provided data inside the fixture - Test the model object to see if it's an child of AppModel and Model - Test some finds - Test the new metho

Cake 2.0 Auth Component login method

2011-11-15 Thread huoxito
Hi there everybody! Could anyone please tell me why 2.0 Auth Component login method logs in the user whatever data is posted, even if the user is not on the database? I mean is this really a good idea? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check

Re: Singular controller name route

2011-11-15 Thread Sam Sherlock
Perhaps using a custom class to collect data from the app. It could not rerun data unless it has a view action - S On 15 Nov 2011 18:43, "martinp" wrote: > Thanks for the reply Jeremy, but what I'm actually looking for is a > way to do this automatically. > > In the same way that routes configu

Troubleshooting the CakeDC TinyMCE helper plugin.

2011-11-15 Thread vaughany
Hi all. I am having some trouble with the abovementioned helper plugin. Following the instructions in the github repo readme results in error messages and I have attempted to troubleshoot the reasons myself but have achieved little in the way of success. There's little on Google for this helper

Inconsistency when loading libs?

2011-11-15 Thread euromark
This worked in 1.3: a file called "icq_lib.php" App::import('Vendor', 'Tools.icq/icq'); class IcqLib extends Icq {} you could then App::import('Lib', 'IcqLib') and use the IcqLib class right away But in 2.0 most library classes are now in packages inside /Lib In my example "/Lib/Package

Re: IE hangs when loading a page

2011-11-15 Thread Yves S. Garret
Ok, one discovery. I found the last line of code before my app goes out to lunch. I inserted this code at the line #83: die("The output of having a : ".print_r($provider)); http://bin.cakephp.org/view/2137152307 As a result, I get this output. *Notice* (8)

Re: IE hangs when loading a page

2011-11-15 Thread Yves S. Garret
Oh yeah, one more thing, this is what I did with developer tools for IE (this problem exists for IE 9 as well): * Opened up my browser, which went to my homepage, bing.com. * Opened up Developer Tools by hitting F12. * Entered the URL of the site I'm working on and hit Enter. * The Developer Tools

Re: IE hangs when loading a page

2011-11-15 Thread Yves S. Garret
Just tried disabling Javascript, no dice. On Tue, Nov 15, 2011 at 1:07 PM, Yves S. Garret wrote: > Tried it, the dev tools hung with IE when I ran it and looked at the > script tab lol. > > I'll keep poking at it. I've never seen this before... > > > On Tue, Nov 15, 2011 at 10:41 AM, Mike Kartha

Re: Singular controller name route

2011-11-15 Thread martinp
Thanks for the reply Jeremy, but what I'm actually looking for is a way to do this automatically. In the same way that routes configuration is set up to handle /:controller/:action/*, I would like to set up /:controller_singular/* which would go to the view action. i.e. not naming individual cont

Re: IE hangs when loading a page

2011-11-15 Thread Yves S. Garret
Tried it, the dev tools hung with IE when I ran it and looked at the script tab lol. I'll keep poking at it. I've never seen this before... On Tue, Nov 15, 2011 at 10:41 AM, Mike Karthauser wrote: > hi yves > > On 15 Nov 2011, at 15:11, Yves S. Garret wrote: > > I know that this is IE only, sin

Re: Permission erros when following ACL 2.0 tutorials

2011-11-15 Thread Paul Vaughan
I often find that when I change something in the code (although I am unsure what, exactly), the permissions change in app/tmp and I get the same error as you. Also I get errors when cake baking. What I do is run: sudo chmod -R a+rwx /var/www/cakephp/app/tmp (your path may be different, the import

Re: Concurrency control

2011-11-15 Thread 0x20h
Am 14.11.2011 17:14, schrieb phpMagpie: > Not sure if there is an existing behaviour, but if you create a > created and modified field Cake will automagically update them. Check > these to see if they have been updated since form load et voila. Looking at the modified date does guarantee mutual ex

Re: Using REST In CakePHP 2.0

2011-11-15 Thread Matteo Landi
-- http://www.matteolandi.net On Nov 15, 2011 6:09 PM, "Will" <000w.s.s@gmail.com> wrote: > For the benefit of anyone else reading this, you can format the result > of a call to $this->Model->find('all) with the following function: > > /** function _get_xml_array > * > * This function tak

Complex Field Conditions escaped

2011-11-15 Thread michaelf
When I use Model.Field/100 as field I now get it represented as `Model.Field/100 as field` in my SQL query. When I take out the `` it works. Cakephp never used to do that. What is going on? How do I fix this? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org

Permission erros when following ACL 2.0 tutorials

2011-11-15 Thread bigjimmi
Hi all, I'm being plagued with permission errors when trying to follow the ACL 2.0 tutorial. I've made my tmp directory and all contents NOT read only. Warning (512): SplFileInfo::openFile(C:\wamp\www\CakeAclTest\app\tmp \cache\models\cake_model_default_aros_acos) [splfileinfo.openfile]: failed

CakePHP creates wrong routes for reverse proxy

2011-11-15 Thread Steffen
Hello, My CakePHP application is accesible through a mod_alias rule in the apache config. Due to this fact its accesible on the root of the apache folder. For example: apps.example.com/app1/ The Application works without problems on this URL but it don't work for a reverse proxy. The reverse pro

Re: Using REST In CakePHP 2.0

2011-11-15 Thread Will
For the benefit of anyone else reading this, you can format the result of a call to $this->Model->find('all) with the following function: /** function _get_xml_array * * This function takes in an input from $this->Model->find() and reutrns an array * that is properly strucutred so that

Re: paginated comments not showing up in view

2011-11-15 Thread Daniel
I got it working I used: foreach ($comments as $comment): ... and then: $comment['Comment']['id'] $comment['Comment']['post_id'] etc. -- 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 oth

step loops in WizardComponent

2011-11-15 Thread Ernesto
hi all. i'm trying to code a multi-page form using WizardComponent. here's my step array $this->Wizard->steps = array( "order" //here the user selects the customer, the shipping type etc "article" => array( "code" //the article.id is selected "color" //colors are loaded ba

Re: paginated comments not showing up in view

2011-11-15 Thread Daniel
On Nov 15, 12:00 pm, phpMagpie wrote: > try echo debug($comments); in your view to see if the array does contain > any data. > > HTH, Paul. I found the problem, an if statement in the view was stopping the code for the table from executing: I changed it to: Now I have a new error related to th

Re: Custom Datasource

2011-11-15 Thread RhythmicDevil
I got it working finally. This is what I ended up with: database.php public $gti = array( 'datasource' => 'GtiSource', 'url' => 'http://swright-dev:1337/' ); Model public $useDbConfig = 'gti'; Datasource filename: GtiSource.php class : GtiSource Although the filename:

Re: CakePHP 2.0.3 out of the oven

2011-11-15 Thread Thiago Belem
http://bakery.cakephp.org/articles/lorenzo/2011/10/16/cakephp_2_0_released Embraced the *PSR-0* recommendation for file naming. Now all your classes map to a file with the same name. Less things to remember! -- ***Thiago Belem* Desenvolvedor Rio de Janeiro - RJ - Brasil +55 (21) 8865.9250 thiag

Re: Custom Datasource

2011-11-15 Thread RhythmicDevil
So I was using the wrong model method. I was using Model::read() instead of Model::find(). Read did not throw an error. But Find() does. Now I get this: Datasource class gti could not be found. On Nov 15, 10:26 am, RhythmicDevil wrote: > Hi All, > I am having some issues understanding the namin

Re: IE hangs when loading a page

2011-11-15 Thread Mike Karthauser
hi yves On 15 Nov 2011, at 15:11, Yves S. Garret wrote: > I know that this is IE only, since I tried it in Chrome and it worked. > Basically, I go to the page that I'm developing and the browser just hangs. > Very weird. In Chrome, it loads without an issue. Has anyone seen IE do > this be

Re: Singular controller name route

2011-11-15 Thread jeremyharris
Check out: http://book.cakephp.org/view/945/Routes-Configuration There's examples for your very request about halfway through. -- 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 wi

Re: UnitTests - The Real World

2011-11-15 Thread jeremyharris
You may want to just browse around some plugins that you use to see what's tested, or even the core tests. They give you a good idea. Basically you want to test against certain scenarios to make sure your code can handle them properly. Sure, if you *just* use baked code there's not much to test

Custom Datasource

2011-11-15 Thread RhythmicDevil
Hi All, I am having some issues understanding the naming conventions for a custom datasource. datasource file name: gti_api_source.php class name GtiApiSource Database Config var $gti_api = array( 'driver' => 'gti_api', 'url' => 'http://swright-dev:1337/',

Re: Using REST In CakePHP 2.0

2011-11-15 Thread jeremyharris
The docs on the cake website are built from the github repo. If you browse around the github repo, you'll see all the docs in there. In particular, this one speaks about contributing: https://github.com/cakephp/docs/blob/master/en/contributing/documentation.rst As you can see, you can edit righ

IE hangs when loading a page

2011-11-15 Thread Yves S. Garret
I know that this is IE only, since I tried it in Chrome and it worked. Basically, I go to the page that I'm developing and the browser just hangs. Very weird. In Chrome, it loads without an issue. Has anyone seen IE do this before? How did you get around it? I can post the code if you want, b

Lib Package names in 2.0

2011-11-15 Thread euromark
I was wondering how you manage your Lib classes now in cake2.0 Seems like putting them in /Lib directly is kind of deprecated. They should belong to a package so to speak. /Lib/ZodiacLib.php becomes then (using Misc Package) /Lib/Misc/ZodiacLib.php and instead of using App::import('Lib', 'PluginN

Re: CakePHP 2.0.3 out of the oven

2011-11-15 Thread RhythmicDevil
What drove the decision to change the naming conventions? On Nov 13, 8:28 pm, José Lorenzo wrote: > The CakePHP core team is proud to announce the immediate availability of > CakePHP 2.0.3 [1]. A lot has happened in the PHP world since our last > release, this new version incorporates all needed

Re: How to paginate "subtable" in a view?

2011-11-15 Thread phpMagpie
Use contain: $this->paginate = array( 'Post'=> array( 'limit'=> 2, 'page'=> 1, 'order'=> array('Post.created'=> 'desc'), 'conditions' => array('Post.category_id' => $id), 'contain'=>array() // ) ); $this->set('posts', $this->paginate('Post')); O

Re: paginated comments not showing up in view

2011-11-15 Thread phpMagpie
try echo debug($comments); in your view to see if the array does contain any data. HTH, Paul. -- 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 questio

Singular controller name route

2011-11-15 Thread martinp
Has anyone seen or achieved routing whereby all controller view actions can be accessed via the singular name of the controller? e.g. /pages/view/1 can be accessed by page/1; posts/view/1 by post/1; etc I know route classes are possible, I know it's possible to use the inflector, but I haven't be

Re: onClick in button

2011-11-15 Thread phpMagpie
> but it doesn't work why?? - How does it not work, what actually happens? - Are you running FireBug or something so you can debug what is happening, or if the event is being fired at all? HTH, Paul -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.o

Re: How to Calculate time differences in the modal class?

2011-11-15 Thread Graham Weldon
$virtualFields = array( 'difference' => 'HOUR(TIMEDIFF(end, start))' ); Cheers, Graham Weldon http://grahamweldon.com e. gra...@grahamweldon.com p. (+61) 0407 017 293 Skype: grahamweldon On Tuesday, 15 November 2011 at 8:13 PM, Gerrit wrote: > Hello, > > I've start and end field as datetime i

How to Calculate time differences in the modal class?

2011-11-15 Thread Gerrit
Hello, I've start and end field as datetime in my database. Now I want to calculate the difference in hours as a virtual field. Is that possible?? Thx! -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakep

Re: Concurrency control

2011-11-15 Thread Ernesto
that's exactly what i'm doing. :) -- 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 cake-php+u