Wednesday, October 31, 2012

Restore deleted PANEL Ubuntu/Debian(Top or Bottom)

I was trying to remove some icon off my Debian desktop's top panel when this happened. I right clicked on that top panel and clicked 'Delete this panel' without thinking much and wooosh.. my panel is no more! :)

The following link outlined these few tips for me to recover my panel

1. gconftool-2 – -shutdown

2. rm -rf ~/.gconf/apps/panel

3. pkill gnome-panel

Reboot


source: http://aftami.wordpress.com/2010/02/13/restore-deleted-panel-ubuntudebiantop-or-bottom/
Read More

Wednesday, October 17, 2012

CakeEmail Error: Call to a member function subject() on a non-object

I was trying this on CakePHP version 2.2.3 Stable. CakePHP has introduced the new CakeEmail replacing the email component. So in order to use it i put this in my controller.

-------------------------------------------------------------
App::uses('CakeEmail', 'Network/Email'); //at the top of page

class MyController extends AppController {

public function test(){
$email = new CakeEmail('smtp');

$result = $email->from('sender@example.com')
->to('you@example.com')
->message('message')
->subject('About')
->send('my message');
->send();

debug($result);
}
-------------------------------------------------------------
When I ran it, it just wouldn't work! As it turns out the problem is with the 'message' function. Some bug is preventing from using it. Just uncomment that and put you message inside send() like this:
        
-------------------------------------------------------------
$email = new CakeEmail('smtp');

$result = $email->from('sender@example.com')
->to('you@example.com')
->message('message')
->subject('About')
//->send('my message'); --> commented out
->send('my message'); --> message was put here
-------------------------------------------------------------
And it works. So here I'm blogging it hoping it would help save someone's day. Cheers
Read More

About Me

Popular Posts

Designed By Seo Blogger Templates