Greetings,

Last week I installed drupal 5.1 and the views module. After a bit of problems mentioned in http://drupal.org/node/162808 and http://drupal.org/node/162837 everything worked fine for several days.
Now I have just discovered that:

  1. single nodes still appear, but
  2. they show no more admin and login blocks or primary menus
  3. the home page is not found
  4. ditto for every taxonomy page or non-node link

You can check all this for yourself by visiting http://digifreedom.net/node/71 (*) and clicking around on "Home", "The big picture" or any other link. The "Most recent stories" and "New forum topics" blocks were both made with the views module

What happened, and why did it happen only after a few days?

It must be something wrong in the combination/configuration of Drupal 5.1 and views module, because I have other websites
on 5.1 but without that module and they are still fine.

It also looks related to this other problem: http://drupal.org/node/161106 (cache problems? why?) but frankly I am not sure and generally need some more help.
The admin pages are obviously unreachable. I have no problem to work at the shell or mysql prompt (no phpmyadmin available), but what are the exact commands I should type?

Thank you in advance for any feedback, I really need to fix this as soon as possible. Please also contact me at marco, @digifreedom.net if you need more information before suggesting a solution

Thanks,
Marco

(*) sorry for the (believe me) unwanted bit of self promotion, but that is the first page I've found which is still visible and makes easy to check all the symptoms of the problem.

Comments

Marco Fioretti’s picture

I have just discovered the cache_clear_all function (http://api.drupal.org/?q=api/function/cache_clear_all/4.6) which, since caching is mentioned as the cause of several similar problems, may help me too.
I can log into the server and add statements to the PHP files, but what is the exact way (which arguments) to clear all caches, and in which file should I write it? Assuming _this_ is an actual solution, of course.

Thanks again for your time. Any input is welcome.
Marco

The Family Guide to Digital Freedom

Marco Fioretti’s picture

A few more info:

If I add "cache_clear_all();" to settings.php and reload any page... I only get a totally blank page. If I comment that statement I am back to the initial situation: single pages show, without menus and admin blocks, all the taxonomy or admin pages don't. What now?

Thanks,
Marco

The Family Guide to Digital Freedom

Anonymous’s picture

You should try the following, but if it occurred once it will occur again.

Using the phpMyAdmin tool find the tables beginning with cache_ and then click the Truncate button. If that resolves the issue it is a caching issue. If not it is a permissions issue. Since you switched to 5.1 your documentation reference should be http://api.drupal.org/?q=api/function/cache_clear_all/5.1 instead of 4.6. Why the default isn't all the cache tables instead of just the cache_page table is a mystery to me. There is no prevision to clear all of the cache tables, you have to know which ones to use.

You might also try setting the caching to 'None' at http://digifreedom.net/admin/settings/performance to see if caching is the issue. However the cache_filter table isn't controlled by this setting. I suspect this is the table of significant issue.

Earnie -- http://for-my-kids.com

Marco Fioretti’s picture

Ernie,

thanks for your suggestions. However:

  • "You might also try setting the caching to 'None' at http://digifreedom.net/admin/settings/performance": as mentioned in the original post, the admin pages are unreachable now just like the home page. No matter which URL I try (digifreedom.net/?whatever...)
  • I also mentioned that I have no phpmyadmin available. I may get it installed, but if the same result can be achieved at the mysql prompt or via php statements it would be much faster
  • In any case, I had already tried to put "cache_clear_all();" (just like that, without arguments) in settings.php, in a way that shouldn't make difference between 4.6 and 5.1. The result is described in my erlier replies. Should I have used another syntax, that is give explicit arguments to the function? If so, which ones?

For the record, a Drupal developer suggested privately it may not be at all something in the database, but some corrupted php file. Since this drupal installation is shared by two other sites which have no views module and no forum, but still work perfectly, if they are corrupted files it could just be settings.php or the views module sources, couldn't it?

Thanks for any answer, please don't hesitate to ask for further information

Marco

The Family Guide to Digital Freedom

Marco Fioretti’s picture

In spite of what I wrote (and believed) I have managed to have phpmyadmin installed and executed. Doing what Ernie suggested, that is selecting the "empty" operation on all the tables whose name begins with cache, that is:

Your SQL query has been executed successfully

TRUNCATE `cache` ;

TRUNCATE `cache_filter` ;

TRUNCATE `cache_menu` ;

TRUNCATE `cache_page` ;

TRUNCATE `cache_views` ;

seems to have solved the problem brilliantly. Thanks Ernie!

I say "seems" because I repeat that, no matter how I stress my memory, I don't remember doing anything on the website in the last 4/5 days. That is, since it was working and stopped all of a sudden without (as far as I can tell) me doing anything, I hope it
won't happen again...

Final random notes:

  1. how to make sure it won't happen again, or at least how to check _before_ something bad happens that some cache is almost full or anything is approaching some critical limit?
  2. Looking at http://digifreedom.net/admin/settings/performance now yelds "caching mode: disabled", "The following enabled modules are incompatible with aggressive mode caching and will not function properly: statistics, throttle", Minimum cache lifetime: none". Is any of these settings a consequence of the command ran in phpmyadmin, or were they like that even before? In other words, can anybody figure out what exactly happened????
  3. Are the settings above safe?

One last, general suggestion: it really wouldn't hurt to add to the documentation a list of all the commands that one can
be ran at the mysql prompt to fix problems like this. Phpmyadmin is all fine and dandy, but it's slower and there are servers where it cannot be installed for any reason.

Again, any further explanation of what might have happened and how to avoid similar problems in the future is always welcome.

Thanks, everybody,

Marco

--
The Family Guide to Digital Freedom

Marco Fioretti’s picture

In spite of what I wrote (and believed) I have managed to have phpmyadmin installed and executed. Doing what Ernie suggested, that is selecting the "empty" operation on all the tables whose name begins with cache, that is:

Your SQL query has been executed successfully

TRUNCATE `cache` ;

TRUNCATE `cache_filter` ;

TRUNCATE `cache_menu` ;

TRUNCATE `cache_page` ;

TRUNCATE `cache_views` ;

seems to have solved the problem brilliantly. Thanks Ernie!

I say "seems" because I repeat that, no matter how I stress my memory, I don't remember doing anything on the website in the last 4/5 days. That is, since it was working and stopped all of a sudden without (as far as I can tell) me doing anything, I hope it
won't happen again...

Final random notes:

  1. how to make sure it won't happen again, or at least how to check _before_ something bad happens that some cache is almost full or anything is approaching some critical limit?
  2. Looking at http://digifreedom.net/admin/settings/performance now yelds "caching mode: disabled", "The following enabled modules are incompatible with aggressive mode caching and will not function properly: statistics, throttle", Minimum cache lifetime: none". Is any of these settings a consequence of the command ran in phpmyadmin, or were they like that even before? In other words, can anybody figure out what exactly happened????
  3. Are the settings above safe?

One last, general suggestion: it really wouldn't hurt to add to the documentation a list of all the commands that one can
be ran at the mysql prompt to fix problems like this. Phpmyadmin is all fine and dandy, but it's slower and there are servers where it cannot be installed for any reason.

Again, any further explanation of what might have happened and how to avoid similar problems in the future is always welcome.

Thanks, everybody,

Marco

--
The Family Guide to Digital Freedom

Anonymous’s picture

The cache_filter excludes itself from the admin control; I do not know why. I have not opened a ticket about it (just haven't had time to spend).

What filters do you have active?

Earnie -- http://for-my-kids.com