Januari 31, 2010
By
Firman
I was importing project into Eclipse when I saw that there was no ant icon on .xml file. When I right click the build.xml, there was no option to run it as ant build. The solution is simple: just install Java EE Developer Tools Component.
I often need to search for files containing certain text in Linux. The following command does the magic:
grep -lir 'the text to be found' ./
I installed Eclipse PDT (Eclipse for PHP projects) and I tried to open a file with embedded applet. Eclipse crashed right away. After the crash, there was no way for me to start Eclipse again. After some searches, I stumbled upon
this blog. I deleted the content of the .settings directory as explained in the blog, but Eclipse still failed to start. Then Jason told me to remove user properties files. They could be found on the directory .metadata. This directory itself was located in the workspace directory. After I did that, Eclipse started, but I lost all of my workbench configurations and I had to redo all of the config. But it was better than not having Eclipse start at all. At least I learnt something new.
Januari 24, 2010
By
Firman
I got the bugs nailed down. Firebug helped a lot in the process. I could never imagine how hard it would be without Firebug. If you are serious Javascript programmer, you should really learn to use this.
Two tabs which are most useful to me were the console and the script tabs. The console tab lets you see in real time the flow of the program. Which function/method is being called. What error message is output. Etc.
The script tag lets you define break point and inspect the value of the variables.
Januari 22, 2010
By
Firman
OK so I have tinkered with the Apache settings. I managed to get rid of the error message in the log. I only needed to add this line to the file /etc/apache2/sites-enabled/000-default
Options +Indexes
AllowOverride All
Order allow,deny
allow from all
The magic is done by the Options +Indexes. It allows directory to be listed. But even after I did that, and no error message in the log, my module still would not show. I suspect it is because the javascript is not executing. I will debug it using firebug. I have just learnt how to use this nifty tool! I will report again later.
Januari 22, 2010
By
Firman
So I have been developing Drupal module for a while now to integrate our Java based editor into Drupal. It is fortunate that someone has already written and uploaded integration module for our previous release editor. I can learn from his module.This is the first time that I develop module for Drupal. And also the first time that I do serious PHP coding.After some time, my module was ready. I tried it out on local server but the module was not showing. I viewed the source, everything was fine, but why was it not showing? I remember reading somewhere in Drupal manual that you should see Apache error log everytime something goes awry. But I didn't know how to view the log. So I googled and I ended up with the following wise line that will show you the log in real time:tail -f /var/log/apache2/error.log
I copied that line and pasted it in the console and, voila! There went the log. It said:[Fri Jan 22 12:26:57 2010] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/drupal/sites/all/modules/editor/lib/js/, referer: http://127.0.0.1/drupal/node/add/page
How cryptic! So I googled again with the keyword "Directory index forbidden" and I stumbled on the following link on Drupal website. I will try to tinker with my Apache settings now. I will write again tonight to report the result.