Re: Session->setFlash error

2010-07-09 Thread matzeh...@googlemail.com
Isn´t the ->flash a methode of 1.3 ? Do you use 1.2 core? As I know in 1.2 you have to ->setflash and a redirect... On 9 Jul., 21:51, gautam lakum wrote: > I am getting this error in my default.ctp layout. > > Notice (8): Undefined variable: session [APP\views\layouts > \default.ctp, line 74] >

Re: Wrapping form elements inside ?

2010-07-09 Thread matzeh...@googlemail.com
Hi, with the option 'div'=>false you can disable the surrounding div Container. But adding a p with the form helper.. hm.. On 10 Jul., 01:27, saidbakr wrote: > Hi > > How could I Wrapping forms Elements inside p tag instead of div tag? Check out the new CakePHP Questions site http://cakeqs.org

Re: Javascript Helper modification. Opinions, please.

2010-07-09 Thread nurvzy
That's a good idea, although the JavascriptHelper is deprecated now. As such, I would put in a feature request for the JsHelper via lighthouse. Nick On Jul 9, 1:05 pm, Geoff Oliver wrote: > Hello, > > I've been working with Cake for a few years and I really like it. > Lately, I've run into a bit

Re: Problems with blog tutorial Warning (512): SQL Error: 1064:

2010-07-09 Thread nurvzy
It's possible what you meant to do was this: $this->Post->id = $id; Because you're doing a blind read() after the fact. If you're going to remove that line you'll need to be sure to pass in the id to read() like so: $this->Post->read(null, $id); Hope that helps, Nick On Jul 9, 11:25 pm, nurvz

Re: Cake 1.2 / 1.3: how to Instantiate helper with options?

2010-07-09 Thread nurvzy
As far as I know you can't set the default input options at the constructor level. Although I haven't dug into the code in a while to make sure of that. If I'm wrong, someone will correct me. You can go the MyFormHelper class route, which may be the *best* option IMHO. Just overwrite the create

Re: Problems with blog tutorial Warning (512): SQL Error: 1064:

2010-07-09 Thread nurvzy
Indeed, the error is because you have $this->Post->edit($id); in your controller. If the method name is not found cake sends the method name as an SQL query by default. Simply remove that line and you should be all set. I encourage you to make sure you type in your controller code as it's laid o

Re: Memcached

2010-07-09 Thread iamcam (Cameron Perry)
Cache an item, assuming the cache is working, turn memcached off, then try to read it on the next request. That will tell you right away if memcache is working. On Jul 9, 7:05 pm, Hugo M wrote: > I've configured memcached as caching system in CakePHP, how can I test it? > Because I tried to get c

Memcached

2010-07-09 Thread Hugo M
I've configured memcached as caching system in CakePHP, how can I test it? Because I tried to get contents from the keys I put on the cache and the telnet console returns nothing. But the cache seems to be working ok. I put in the configuration prefix = '' and I search the keys in this way: get MY

Auth component not showing login errors

2010-07-09 Thread Hugo M
Hi all! I'm having a problem with the Auth component, is not showing login errors :S. Here's my code: *App controller:* var $components = array('Auth', 'Session'); function beforeFilter() { $this->Auth->logoutRedirect = array('controller' => 'deliveries', 'action' => 'index');

Re: Something like ActiveMerchant?

2010-07-09 Thread Andreas
Hi, I am currently developing a port of Active Merchant on PHP. I 've also add a few gateways for testing such as PaypalExpress, Hsbc, Authorize.net(partial), Centinel 3D secure(partial), and Eurobank(Greek bank). I am planning to make a public repository on github or google project hosting, whe

Problems with blog tutorial Warning (512): SQL Error: 1064:

2010-07-09 Thread BlaineRumsey
Hello, I am new to cake and I am trying to complete the blog tutorial in the manual for 1.3 for getting started. I am at the edit post section and I am having a problem. When I click edit I get and sql syntax error. 1064: You have an error in your SQL syntax; check the manual that corresponds

Javascript Helper modification. Opinions, please.

2010-07-09 Thread Geoff Oliver
Hello, I've been working with Cake for a few years and I really like it. Lately, I've run into a bit of a problem with the way that the Javascript Helper handles some things. Specifically, the "link" function and it's $inline parameter. The issue I'm having is this... In an element, I am linking

Passing values to functions...

2010-07-09 Thread Phadreus
I'm a Cake noob, could someone help me out with this question? I'm pretty sure this is a syntax issue: What I am trying to do is click a link and pass a variable back to a function in my controller. Here's the controller code: set('posts',$this->Blogpost->find('all')); }

Cake 1.2 / 1.3: how to Instantiate helper with options?

2010-07-09 Thread BlueAngel
Hi there everyone, I would like to know if it's possible to instantiate a helper in a controller with configuration options (like one can with components, or with model behaviors). What I'd like to do is pre-set certain options for the Form helper (div => false) for example, instead of having to

Re: last login field addition causing auth component to fail?

2010-07-09 Thread Anthony
I suppose that's what I get for trying to find something to c&p from the internet. After looking further into I found a similar way to do it, Instead of using saveField, I modified things to just use save and everything works as expected. On Jul 9, 5:17 pm, Anthony wrote: > Sorry, I also meant

Re: Current URL ?

2010-07-09 Thread saidbakr
Thank you for your valuable help. I would like to take your opinion about something related to this post, I asked for this question to maintain a highlighting navigation for the current page. The navigation is maintained by an element called from the default layout. I passed to the element a param

Wrapping form elements inside ?

2010-07-09 Thread saidbakr
Hi How could I Wrapping forms Elements inside p tag instead of div tag? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this gr

Re: Current URL ?

2010-07-09 Thread cricket
In the view, $this->here http://api.cakephp.org/class/view In the controller, $this->base and $this->action http://api.cakephp.org/class/controller On Fri, Jul 9, 2010 at 6:44 PM, saidbakr wrote: > Hi, > > Is there any method to get the current URL of the application, either > from view or the c

Current URL ?

2010-07-09 Thread saidbakr
Hi, Is there any method to get the current URL of the application, either from view or the controller? For example: suppose we are at the follwoing url of the application http://mysite.com/posts/view/12 I want to get this url? Check out the new CakePHP Questions site http://cakeqs.org and help

Re: last login field addition causing auth component to fail?

2010-07-09 Thread Anthony
Sorry, I also meant to add (before being distracted by my stupid keyboard) was to explain this section of code I used above. I was thinking I could fix it using this: $this->User->id = $id; $this->User->group_id = $this->Session->read('Auth.User.group_id'); $this->User->saveField('last_login', da

Re: last login field addition causing auth component to fail?

2010-07-09 Thread Anthony
Ok, now that the 's' problem is taken care of... This is in my users model: function parentNode() { if (!$this->id && empty($this->data)) { return null; } $data = $this->data; if (empty($this->data)) { $data = $this->read(); } if (empty($data['User']['group

last login field addition causing auth component to fail?

2010-07-09 Thread Anthony
I've been working on this for a few days now and something just isn't right. My first thought was to simply add something like this in the user controllers login action: but it was never getting called. So I went back to my app_controller and disabled my loginRedirect setting and added the red

Re: Session->setFlash error

2010-07-09 Thread gautam lakum
Thanks jeremy, it is working now. On Jul 9, 1:28 pm, Jeremy Burns | Class Outfit wrote: > If you are on 1.3, don't forget to add the Session helper and Session > component to your app_controller. > > Jeremy Burns > Class Outfit > > jeremybu...@classoutfit.comhttp://www.classoutfit.com > > On 9 J

Re: Session->setFlash error

2010-07-09 Thread Jeremy Burns | Class Outfit
If you are on 1.3, don't forget to add the Session helper and Session component to your app_controller. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 9 Jul 2010, at 20:51, gautam lakum wrote: > I am getting this error in my default.ctp layout. > > > Noti

Session->setFlash error

2010-07-09 Thread gautam lakum
I am getting this error in my default.ctp layout. Notice (8): Undefined variable: session [APP\views\layouts \default.ctp, line 74] Code | Context Fatal error: Call to a member function flash() on a non-object in C: \wamp\www\rentcar1\app\views\layouts\default.ctp on line 74 This is the layout

Re: Combine JS, Jquery and Prototype + Scriptaculous on views/layout/default.ctp

2010-07-09 Thread Miles J
You should try to avoid using multiple JS frameworks in a single app. If you cant avoid it, use noConflict within each framework. On Jul 9, 10:10 am, kjc wrote: > Maybe You have to try this: > > http://api.jquery.com/jQuery.noConflict/ > > On 9 Lip, 06:51, Louie Miranda wrote: > > > I tried to a

CSV Helper not rendering on web host, but works on localhost

2010-07-09 Thread CapeTownGuy
Hi, I'm using the CSV helper and it works fine on my localhost, however as soon as I upload to a web host, it stops working. The only clue I could glean is that the content type is different on the web host, however I have no idea why it changes from the correct mime type on localhost to text/html

Re: cookie value not returned properly

2010-07-09 Thread yolandapadilla
additional testing and new info: the problem is that cookie value is being encrypted but when we call cookie.read the decrypt function thinks the value is not encrypted and is not decrypting the value If I do a cookie.write with $encrypt = false it works but I really don't want release an app wit

Re: Combine JS, Jquery and Prototype + Scriptaculous on views/layout/default.ctp

2010-07-09 Thread kjc
Maybe You have to try this: http://api.jquery.com/jQuery.noConflict/ On 9 Lip, 06:51, Louie Miranda wrote: > I tried to add first two js script > > echo $html->script('prototype'); > echo $html->script('scriptaculous'); > > and created my app/controller/ and views on a 1.3 framework. > > And the

Re: Large Session size

2010-07-09 Thread dtemes
that is a big session size indeed. if you are using sessions to cache some user data my suggestion would be to use a proper cache engine like memcached or apc. File io is one of the bottlenecks that can make scaling harder in the future but as many others say, scaling is something to look at when y

Re: Weird Core Problem with Cake1.3.2

2010-07-09 Thread euromark
i mean /app/webroot/index.php: echo 'XXX'; // is echoed! (OK) if (!include(CORE_PATH . 'cake' . DS . 'bootstrap.php')) { die('WEBROOT-INDEX boostrap missing'); // not echoed trigger_error("CakePHP core could not be found. Check the value of CAKE_CO

Re: Weird Core Problem with Cake1.3.2

2010-07-09 Thread euromark
sure like Configure::write('Routing.prefixes', array('admin')); but before cake can actually start to dispatch, its already dead so no log changes are made one thing, though (core.php): define('LOG_ERROR', 2); what is recommended for max. debug output? On 9 Jul., 18:05, ohcibi wrote: > the c

Re: Weird Core Problem with Cake1.3.2

2010-07-09 Thread ohcibi
the core.php changed as well, did you changed it? also check tmp/logs (tail -f tmp/logs/error.log or debug.log during a page request should offer something) On 9 Jul., 17:51, euromark wrote: > we use the new version of index.php > and with debug=2 there are NO errors > > AND the app + core work o

Re: Weird Core Problem with Cake1.3.2

2010-07-09 Thread euromark
we use the new version of index.php and with debug=2 there are NO errors AND the app + core work on other windows and linux servers its just that special linux server it doesnt work on anybody with similar issues? maybe because its 64bit? or LinuxCustomBuild? On 9 Jul., 17:39, Jeremy Burns | Cla

Re: Weird Core Problem with Cake1.3.2

2010-07-09 Thread Jeremy Burns | Class Outfit
Not sure I can really help, but the white screen of death when debug = 0 is the sign of a bug that is stopping the site processing. Changing it to 1 or 2 lets it go on either to display the error or in some cases move past it and work. I think /app/webroot/index.php changed between 1.2 and 1.3 -

Making an AJAX call while waiting for another AJAX call.

2010-07-09 Thread shantamg
I have one script that is taking a long time processing many records. So, I have the script update a session variable when it loops, and I make periodic AJAX calls using javascript's setInerval() which check that session variable and update a progress bar. It works great, but I can't figure out how

Weird Core Problem with Cake1.3.2

2010-07-09 Thread euromark
We are heaving the weirdest problems after updating to from 1.2 to 1.3.2 on our business server! The project works fine on local Windows as well as on a debian test server (root server). Both with debug 0 and debug 2. But on the live server it works only in debug 2. Everything is the same - only t

Input Id Array in the view

2010-07-09 Thread Matt Y
Is there a limit on the number of times you can nest input fields within an array? For example can I not create an input like this. echo $form->input('1.2.3.4.5.6.7.8.id') and be able to refer to it like this. $this->data[1][2][3][4][5][6][7][8][id] Thanks for your help. Check out the new Cak

Re: validation messages

2010-07-09 Thread Mike Karthauser
you are better doing function checkCheese($cheese) { if ($cheese !='tilsit') { return "Never at the end of the week, sir. Always get it fresh first thing on Monday."; } if ($cheese !='caerphilly') { return "Ah well, it's been on order for two weeks, sir. I was expecting it this morni

Re: Media Plugin - Getting Started

2010-07-09 Thread David Persson
The current documentation in the media plugin wiki isn't yet updated to match with the upcoming 1.3 version of the plugin. The new version will relax and (hopefully) simplify the expected directory structure. All support for assets (css and js) is going to be removed and moved back into the hands o

Re: Media Plugin - Getting Started

2010-07-09 Thread David Persson
Hi Marco, It looks like you're using the current stable version of the plugin, which is totally fine. If you're plans allow you may also want to try the upcoming version which you'll find in the "1.3" branch of the repo. It doesn't have any documentation so you may be better off working with the s

Re: validation messages

2010-07-09 Thread grigri
Your should just be able to return the string... function checkCheese(tilsit, caerphilly, cheddar) { if (!tilsit) { return "Never at the end of the week, sir. Always get it fresh first thing on Monday."; } if (!caerphilly) { return "Ah well, it's been on order for two weeks, sir. I w

Re: Database associations

2010-07-09 Thread grigri
This should work: class Contact extends AppModel { var $hasMany = array( 'Call' => array( 'foreignKey' => false, 'conditions' => array( 'Call.number = Contact.number' ) ) ); } hth grigri On Jul 9, 12:06 am, Justin Beeler wrote: > I'm working with two tables

validation messages

2010-07-09 Thread emanuele
Hello pals, I ve my own validation method. The method checks three fields. Is there any possibility to customize the message of error depending on the failure condtions? For istance: function myfunc(a, b, c) { if(!a) set a message for a; elseif(!b) set a message for b; elseif(!c) set a message fo

Re: REST and SecurityComponent - how to properly secure appilaction?

2010-07-09 Thread red
I've forgot... 2 additional question: 1. If I need index() action for API I define function index() in Orders Controller. But then it works for normal request from browser / app/orders/index. Ok, there is no view for this action, but is this ok? 2. Maybe I should define additional global routing p

REST and SecurityComponent - how to properly secure appilaction?

2010-07-09 Thread red
Hi, I wan't to secure my REST API with basic access authentication. My app also contains normal open-public views and admin panel (also secured with SecurityComponent and basic authentication). I've put this peace of code to the controller: public function beforeFilter() { parent::beforeFilter

Re: Processing an Email Bounce back in CakePHP and Postfix

2010-07-09 Thread tristan_ph
In case someone stuble on this issue, I've already solve this problem. On postfix configuration (usually located at /etc/postfix/main.cf) I've add this two line: notify_classes = resource, software, bounce 2bounce_notice_recipient = sysad...@example.com On Jul 5, 9:28 pm, tristan_ph wrote: > Hi

Re: Media Plugin - Getting Started

2010-07-09 Thread marco.rizze...@gmail.com
Hi I would ask another question about media plugin: In my attachment model I have this configuration for Media.Transfer: 'Media.Transfer' => array( 'trustClient' => false, 'destinationFile' => ':Medium.short::DS:attachments:DS::Model.id::DS:attachment.:Source.extension:', 'baseDirec

Cake1.3, Paginate with fulltext search is having problems when going to page 2 and so on?

2010-07-09 Thread Louie Miranda
My code here at the bin (controller/action): http://bin.cakephp.org/saved/60040 View of that controller: http://bin.cakephp.org/view/87988950 Is capturing data using. > $keywords = trim ($this->data['Publication'][ > 'keywords']); > And passing it to paginate with fullt