Sunday, 25 May 2014

Odoo/OpenERP opererp-server file

Since few days, working with OpenERP backend section. I did some coding changes in Python but was not able to restart OpenERP service due to commented and wrong python file openerp-server. File was at following location of my server : /etc/init.d/openerp-server

Checked over internet and didn't find any relevant answer which could have solved my problem. After spending few hours i corrected my file that's running successfully now. Please check attached file here.


Hopefully it will someone else's issue as well.

Thanks!!!!!!!!!!! Enjoy Programming :)

Tuesday, 13 May 2014

CakePHP TinyMCE Validation Problem

In development world, daily we face lot of problems, some are big while some are minor. Sometimes it takes a lot of time to fix small one than bigger ones. Similar to this, today I faced a small issue with TinyMCE in CakePHP. It was to set an attribute and to figure it out itself took couple of hours of mine. Then I decided to share it with my readers, thinking that it may save those couple of hours of someone else at some point of time.

Problem :

TinyMCE notempty validation was not working fine and it was showing following message on console.

An invalid form control with name='page [description]' is not focusable

Solution : Set required attribute to be false in view file. For example :

                <div class="umstyle3"><?php echo __('Page Description');?></div>
                <div class="umstyle4" ><?php echo $this->Form->input("description" ,array('rows' => 15, 'label' => false, 'div' => false, 'class'=>"umstyle5 w400p", 'required' => false))?></div>                                               

Reason : CakePHP validation rule automatically adds a required attribute to the field. So we have to remove it.

Hopefully, it will help someone.

If you guys are facing any other problem with CakePHP TinyMCE integration please let know. May be, I can help.

Thanks!!!!!!!! Enjoy Programming J

Sunday, 11 May 2014

Aptana IDE

Recently, I attended GDG meet in Chandigarh and 2nd time heard about Aptana IDE. So decided to download and use the same. Downloaded Aptana Studio 3.4.2 from here, installed and run it on my machine. First screen would look like this.

Aptana Studio 3.4.0 is an open source Web development IDE being used by lot of developers across world. This powerful tool is having features like intellisense, integrated debugger and good version control system that gives you the precision control to create the applications you need without wasting time or running multiple programs simultaneously.

Aptana Studio 3.4.0 makes it easy to develop, test, debug and publish your applications within a single environment. If you code in PHP, Python , HTML, CSS, Ruby, Javascript or other languages, Aptana is what you need for top-quality results. If you need to move back and forth between Windows and Mac OS, Aptana makes it happen.

If you have used Netbeans or Eclipse before in development, then you will not feel much difference among them in their appearance. It suits well to Eclipse users. 

Following are the features of Aptana IDE :

1)  Intellisense (Code Assistance) is the biggest feature of Aptana. While editing, Code 
     Assist not only displays a list of matching tags, but it also includes graphical information 
     about the level of support for each element in the major web browsers.

2)  Git implementation is too easy using Aptana. It supports FTP as well.

3)  Integrated Debugger is another great feature in Aptana. There is a fully integrated Ruby & Rails debugger that has all of the features that you would expect from a professional grade product, including the ability to set breakpoints, inspect variables, control execution, etc…Surprisingly weaker is JavaScript debugging.

4)  Aptana Studio is available for all major operating systems (Windows/ Mac OS/ Linux).

5)  It gives you Linux like Console on Windows and can run git commands from Terminal.

So overall, it’s a great open source web development IDE to work with. At least give a try to it.

Thanks!!!!!!!!!!! Enjoy Programming :)

Saturday, 3 May 2014

Magento : Admin backend 404 not found

Have you imported database to new server and you are not able to access Magento admin panel? and it's showing you 404 not found error?

If yes, try to run following commands from phpmyadmin.

UPDATE core_store SET store_id = 0 WHERE code='admin';
UPDATE core_store_group SET group_id = 0 WHERE name='Default';
UPDATE core_website SET website_id = 0 WHERE code='admin';
UPDATE customer_group SET customer_group_id = 0 WHERE customer_group_code='NOT LOGGED IN';

It worked for me. Hopefully, this will work for you guys as well.

The reason for this error is that store_id and website_id for admin should be set to 0 (zero). But, when you import database to new server, somehow these values are not set to 0.

Thanks!!!!!!!! Enjoy Programming :)

Reference Links :