Showing posts with label Drupal. Show all posts
Showing posts with label Drupal. Show all posts

Wednesday, December 29, 2010

Drupal warning: table Semaphore doesn't exist.

If you recently upgraded your Drupal installation you might have landed at this error. I was working on the website Relationship-talks.com and I stumbled on this error. I tried to solve it at my own but it was a dirty work to see exactly where that table was missing. A lot of searching on internet finally revealed the working solution. The reason as specified by the error message is that the table Semaphore is missing.

Monday, September 13, 2010

Drupal crashed after update.php run

I recently had an issue with my Drupal installation. After I run the update.php script my installation crashed. I only installed a few modules but then that should not have crashed it as the modules run fine on my other websites. Being an optimistic person I did not have a backup of my database to fall back on. I was totally royally screwed as that was a website for school and it should not have gone down at any cost. 


It took me some time to get back to my senses and think calmly as to why Drupal will behave so erratically. I tried running the update.php script again but the error would not go away. I tried deleting the module and updating but even that wouldn't help. 


Then I looked into the settings.php that resides in sites/default folder. I changed my memory limit for php by changing the line ini_set('memory_limit', '32M'); to have 64 Megabytes of memory for my installation. I ran update.php again and the website worked fine. 


Here, I would like to tell you that the update.php script was running fine every time I tried it but just that it wouldn't let me access my home page or any other admin page for that matter. Hope this will help someone.  

Sunday, July 25, 2010

Drupal Calendar showing wrong dates for anonymous users

If you are here reading this article it means your anonymous users are seeing wrong dates, probably a back date. However, when you log in as an admin it shows you the correct date. As a drupal administrator you might care less about admin user but you care more about your readers that is your anonymous users. As all things in life there is a simple solution to this one too.

Understanding how to solve

Before I walk you through the solution can you make a guess what could be wrong? The dates for admin are correct but for anonymous users it is wrong. That means Drupal reads the correct dates from system (that is why admin gets correct dates) but it is displaying a back date for anonymous users. My first guess was that it is a permission issue. However, there are no such permissions to revoke or allow. Also, since the anonymous users can see the dates they do not have any such restrictions. Right? Looking at the facts once more I realized that the dates are from past that means there is a way where I am reading the data from the past.

Sunday, April 25, 2010

Drupal View with exposed filter inside a panel hides on submit

If you are using Drupal to display a view inside a Panel you might have noticed that on clicking the apply button of an exposed filter the results are no longer shown inside the panel rather they redirect you to the view itself. This is not we expect as we might have another panes with data to be displayed on that page. This is a trivial issue but need to be fixed. A simple fix is to override URL on your panel by going to panel-> content -> settings (right click) and then in the override URL setting set the URL of the panel.
For example:
1) your panel is mysite.com/mypanel
2) your view is mysite.com/myview

In the settings of mypanel you should set Override URL to mypanel, this will take care of the issue. Hope this helps.

Sunday, April 18, 2010

Drupal: Invalid argument supplied for foreach

I was working with my Drupal installation the other day and ran into this bug. It was not that bad as it did not affect the working. However, it will display this warning on screen on the top of results:
warning: Invalid argument supplied for foreach() in /home/web/public_html/modules/views/theme/views-view-table.tpl.php on line 24
I tried to remember what did I change to have introduced this error. Then I found that I actually changed the way fields appeared in Table.

Tuesday, April 13, 2010

Drupal Nice Menus hidden behind parent

Drupal is a great open source CMS package. There are some bugs in it with additional modules but those are being fixed by the community. One nasty bug is the one where you use nice menus and the second level menu items hide behind parent items in IE. Nice menus work perfect in Firefox and Safari but in IE they behave oddly. I had this issue with one of my websites and after a long research on it I found the fix. All you need to do is