3

To modify some default settings for the Feeds module, I need to set a variable in the $conf array. What is the right way to achieve this?

I've tried adding it in the settings.php file (currently on local), but it doesn't appear in the variable table (even after restarting the server). "Clear all caches" didn't change anything, either. What am I missing?

What I am actually trying to do is to set $conf['feeds_process_limit'] = 15; exactly in the same way as described on http://drupal.org/node/1363094 and http://drupal.org/node/1393450; after adding it to the settings.php file, the result is the same: The amount of imported items isn't being limited.

How can I ensure the variable was set as in the settings file, and not to the default value?

0

2 Answers 2

0

I think that the best way to modify default settings is to install the strongarm and the features module. Then use features to export the variables you want to modify into strongarm files where you can set the value.

To do this manually, I think you need variable_set, which will put the value into the database which populates $conf.

http://api.drupal.org/api/drupal/includes!bootstrap.inc/function/variable_set/7

1

Your variables will not show up in the variables table; variables are loaded from the database first and are then overwritten by settings.php. You might need to add a global $conf to access the variables in your settings.php.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.