Re: Undefined variable in view

2010-09-03 Thread Richard
Hello Milos, thanks for you reply! If I define the variable in the controller as follows it states again that it's undefined in the view. $this-set('categories', 'TestValue'); When I echo the variable in the controller everything looks alright: var_dump($this-viewVars['categories']); However

Re: Component code

2010-09-03 Thread alaxos
Hello, You can call a model function from a component. Here's a way to do it: - class MyComponent { private $controller; public function initialize($controller) { $this-controller = $controller; } public

autotesting with web test cases - brainstorming

2010-09-03 Thread euromark
our application gets bigger and bigger every time we change a component we make sure the test cases for it pass but often times there might be some unforeseen consequences for the output in the views. i was wondering how this could me automated ideas: - level 1: build a crawler and index all

Re: Lots of cakephp warnings in the log

2010-09-03 Thread Thunderstriker
ok i looked in to this a bit more this only happens when I'm not in debug mode and this is becous in the error handling function fron debugger there is this: if (error_reporting() == 0 || $code === 2048 || $code === 8192) { return; } and in the normal production error handling: if ($code ===

AW: Undefined variable in view

2010-09-03 Thread Anja Liebermann
And how about var_dump($categories); In the view? Anja -Ursprüngliche Nachricht- Von: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] Im Auftrag von Richard Gesendet: Freitag, 3. September 2010 09:25 An: CakePHP Betreff: Re: Undefined variable in view Hello Milos, thanks

Re: Ajax Pagination - rearrange pages after item deleting

2010-09-03 Thread Mariano C.
Yes, this is what I do actually. collection() function create my paginated list, after object removing I recall collection() function but this display first page of list, even if during deleting process I was at page 3. On 3 Set, 06:22, Miloš Vučinić milosvuci...@gmail.com wrote: I think you

Re: Undefined variable in view

2010-09-03 Thread Richard
Hello Anja, I also did that, returns also 'Undefined variable'. However I found a way, I added the following function to the controller: function beforeRender() { parent::beforeRender(); $this-set('categories', $this-Category-find('all', array('recursive'=0))); } This works now as

Re: autotesting with web test cases - brainstorming

2010-09-03 Thread euromark
juhuu at least the crawler works now after a few minutes he found all 3500 public urls the testsuite then iterates over this array and performs some basic tests it seems all 3500 pages dont produce any fatal errors, errors, warnings or notices :) not sure how to test the backend (user, admin

Re: Undefined variable in view

2010-09-03 Thread euromark
if it is not passed this part of the code in your action is NOT REACHED try die('XYZ') right in front of it you will see that it is probably not even invoked maybe some return in front of it? On 3 Sep., 14:10, Richard richard_j...@hotmail.com wrote: Hello Anja, I also did that, returns

How to determine if the current page is a Flash() or not

2010-09-03 Thread Ernesto
Hello. is there any way to determine if the current page is loaded by a controller::flash() call? i'm working in the controller::beforeRender(). Thx Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message

Question about ACL

2010-09-03 Thread Roland Pish
Hi there. I'm starting with a project which will need the use of ACL to control permissions. These are the tables involved in permissions: Users (a user always will belong to a group) Groups Operations Permissions will be established only between Groups and Operations like: Group 1 are granted

Re: Ajax Pagination - rearrange pages after item deleting

2010-09-03 Thread cricket
On Fri, Sep 3, 2010 at 6:35 AM, Mariano C. mariano.calan...@gmail.com wrote: Yes, this is what I do actually. collection() function create my paginated list, after object removing I recall collection() function but this display first page of list, even if during deleting process I was at page

Re: How to determine if the current page is a Flash() or not

2010-09-03 Thread cricket
You could probably check $this-Session for that, although I'm not sure, offhand, what to look for. On Fri, Sep 3, 2010 at 10:10 AM, Ernesto e.fanz...@gmail.com wrote: Hello. is there any way to determine if the current page is loaded by a controller::flash() call? i'm working in the

Excel file uploading and converting to csv

2010-09-03 Thread Muthuvel Subramani
hello I am new to cakephp.. i need to import files from excel to mysql database.. so for this i need to upload the excel file... after uploading i need to convert excel to csv file.. after converting to csv, i need to import csv file to mysql.. how should i approach for this scenario.. thanks..

Re: Excel file uploading and converting to csv

2010-09-03 Thread Sam
You can export to csv directly from excel. http://vegdave.wordpress.com/2007/05/19/import-a-csv-file-to-mysql-via-phpmyadmin/ On Sep 3, 2:11 pm, Muthuvel Subramani jmsmuthu...@gmail.com wrote: hello I am new to cakephp.. i need to import files from excel to mysql database.. so for this i need

Re: autotesting with web test cases - brainstorming

2010-09-03 Thread Sam
Just curious, What did you use to crawl the urls? On Sep 3, 8:09 am, euromark dereurom...@googlemail.com wrote: juhuu at least the crawler works now after a few minutes he found all 3500 public urls the testsuite then iterates over this array and performs some basic tests it seems all 3500

my happiness!

2010-09-03 Thread Sohei Okamoto
Dear friend, A good news for you! I bought a laptop from Frioffere. Luckily, I was one of their first 100 customers that day, so they sold it to me at half price. Only 5 days later, I received my laptop. It is really high-quality. Same products, much lower prices! Share my happiness quickly. Come

Re: Ajax Pagination - rearrange pages after item deleting

2010-09-03 Thread ohcibi
put something like $(#itemlist).load(/items/index/page:$page #itemlist); into your delete function On 2 Sep., 16:36, Mariano C. mariano.calan...@gmail.com wrote: Suppose to have 3 page, I delete an object from page 2, so I would take the first element from page 3 and use it as last element of

Re: autotesting with web test cases - brainstorming

2010-09-03 Thread euromark
a self written crawler basically it collects all links and puts them into two arrays a worklist and a all links list after a while there are no new links so the worklist empties itself as soon as its empty the crawler is done On 3 Sep., 21:25, Sam s...@masterscommission360.com wrote: Just

Alternate Pagination question

2010-09-03 Thread Dave Maharaj
Has anyone created, thought of , started on the idea of an alphabetical character paging system? So rather than 1 | 2 | 3 it spits out A |B |C? The ABC part seems rather simple just getting the letters to be links if there are records for that letter seems to be the real issue. Any ideas

RE: Alternate Pagination question

2010-09-03 Thread Dave Maharaj
Sorry , my first thought would be to do a looping find-first of each letter and so if it found a record starting with A set that link true, if nothing for B then just the letter no link and co on... The only problem I see is 26 queries just to build the paging links. Other ideas?

cakePHP + openid on windows XP

2010-09-03 Thread Dmitry Shevchenko
Hi I have use openId component from cakebaker (http://code.42dh.com/ openid/) and when I'm trying to authentificate fom google I'm getting an errors: handleOpenIDResponse Notice (8): Undefined variable: sregContents [APP\controllers \users_controller.php, line 229] Auth_OpenID_FailureResponse

Query help

2010-09-03 Thread Dave Maharaj
I have this query in the model $params = array( 'conditions' = array( 'Profile.company LIKE' = $i.'*'), 'fields' = array( 'Profile.company', 'Profile.id'), 'contain' = false); $this-find('first', $params); Where $i is a single letter so I am trying to get the first record

Null date fields in scaffolding

2010-09-03 Thread aries
Hello, I'd like to have date fields that allow null values to default to a null selection in the date/time menus when generating pages from the admin scaffold. I found ticket 5702 that suggests a patch, but that's for Cake 1.2, I wasn't able to work out a fix for 1.3. Has anyone worked this out

Re: Query help

2010-09-03 Thread Blackymetal
You should use % instead of * On Sep 3, 4:49 pm, Dave Maharaj m...@davemaharaj.com wrote: I have this query in the model $params = array( 'conditions' = array( 'Profile.company LIKE' = $i.'*'), 'fields' = array( 'Profile.company', 'Profile.id'), 'contain' = false);

Re: Query help

2010-09-03 Thread Andras Kende
Dave, 'conditions' = array('Profile.company LIKE' = $i . '%'), http://dev.mysql.com/doc/refman/5.0/en/string-comparison-functions.html Andras Kende http://www.kende.com/ On Sep 3, 2010, at 5:49 PM, Dave Maharaj wrote: I have this query in the model $params = array( 'conditions' = array(

Re: Alternate Pagination question

2010-09-03 Thread Sam
The most efficient way database-wise would be to have a char(1) database column that you populate with whatever the first letter of the field you're using... that way it could be indexed and easily counted. It would be slightly slower when saving data but (I assume) much faster retrieving it. If