system's blog

Tweaking Drupal

Hacking core is killing kittens! But what to do, if there is no module to cover your needs and you don't see a clean way out?
In this session we will make Drupal behave the way you want it. We will
write a small module and discover the hook concept, an important part
of Drupal's core awesomeness.

Thomas held this session at Drupal Camp Sofia in April 2012.

 

Huge Menu doesn't accept changes

The problem was that my host had a limit of 200 variables per post,
and long menus with more variables were being rejected. The same started
happening on the Permissions page, since I had a lot of roles and
content types.

I bumped up suhosin.post.max_vars and suhosin.request.max_vars from 200 to 2048 on the server, and now it works.

If your host doesn't have a control panel where you can do this, add the following to your php.ini:
suhosin.post.max_vars = 2048
suhosin.request.max_vars = 2048

Drupal slideshow modules

A nice survey on drupal slideshow modules (on a wordpress site ;-)

http://rrookkrr.wordpress.com/2009/06/02/slideshow-module-fur-drupal-6/

Problems calling cron.php

We recently spotted an error returned from cron.php

PHP Warning:  include_once(): Unable to access ./includes/bootstrap.inc
in /var/www/vhosts/.../httpdocs/cron.php on line 9

The following tweak helped: Create a new file "cron-tweak.php" and point the crontask towards it. Insert the following lines:

<?PHP

$doc_root = dirname($_SERVER["SCRIPT_FILENAME"]);
chdir($doc_root);

include_once './cron-ori.php';
print "cron completed";
?>

Übercart Translation Package

To be found at

http://l10n.privnet.biz/translate/languages/de/export

Select Format used: All in one file

to import translations for all packages.

MySQL “replace” is your friend

Ever had to change the filepath in the files-table after some path restructures?  MySQL “replace” is your friend:

update files set filepath = replace(filepath, 'sites/oldpath/files/','sites/newpath/files/');

Found at http://benmetcalfe.com/blog/2004/11/mysql_replace_is_your_friend/

Syndicate content