Drupal uses many multidimensional arrays and usually you won't need to do this, or will do it in some theme layer or with views. But I did have a case where I needed to sort out array of entities by score value so I did it this way.
Drupal uses many multidimensional arrays and usually you won't need to do this, or will do it in some theme layer or with views. But I did have a case where I needed to sort out array of entities by score value so I did it this way.
I was killing myself to get host node and node.id of field_collection I am using so I can do some preprocessing before this node is saved. I was trying with field_collection_item_get_host_entity but just couldn't make it work. So I asked google and found out I can do it with regular host function like
I was killing myself to get host node and node.id of field_collection I am using so I can do some preprocessing before this node is saved. I was trying with field_collection_item_get_host_entity but just couldn't make it work. So I asked google and found out I can do it with regular host function like
Working with multi sites and modules located in sites/all and sites/some_site your module paths could get in problems. So for a fix check you just need to replace paths in your DB like
Everbody likes Drush, why wouldn't you. Anyway I copied cheat sheet from some PDF as this is a drupal dump site and this way I can find it quicker and make also some additions to it.
When available, there is a shorter version of the same command in parentheses.
cache clear (cc) Clear all caches.
cron Run all cron hooks.
Recently I Installed Drush to windows http://drush.ws/drush_windows_installer, scared that it won't work like it should I tried to update some site so I go to local site directory and try pm-update. I get this message
WSOD (white screen of death) can happen in drupal for different reasons. One is that you could be missing some files, probably modules. Maybe you moved something wrong when migrating, or you have wrong git branch or just delete module(s).
Reseting drupal password with latest drupal version has become much harder task, before you could just MD5 user table and add new password, now the "salt" is added so it is a bit harder. There are two ways, with mysql and shell access, or with php file. First you can find here
Sometimes you find just the right resources that fulfill certain need and nothing much should be added to them, in those cases I will just collect them on this page and add short comment why is this so.
Before I talked about some troubleshooting and had some general discussions about caching
http://drupaldump.com/varnish-simple-troubleshooting-defaultvcl