David Watson
  • Member for 9 years, 11 months
  • Last seen more than 4 years ago
Disable editing of post during update
Accepted answer
15 votes

It sounds like you're running into a common deployment issue with Drupal: the fact that content and configuration reside in the same database. This generally puts a kink somewhere in most deployment ...

View answer
How do I avoid editing Drupal core?
Accepted answer
11 votes

Hacking core is strongly discouraged for the uninitiated because it effectively reduces the support community of thousands to a support community of one (or whatever your team size is). Without this ...

View answer
custom module folder
Accepted answer
10 votes

It shouldn't break anything, and it has no special meaning to core: as long as it's in a modules directory, it will be searched recursively (which is why larger projects often have submodules in a ...

View answer
How to modify a core theme and what is the correct way to do this?
Accepted answer
7 votes

What you want to do is create a subtheme of Bartik, and make your modifications to node.tpl.php there instead. Themes support the notion of inheritance, so this can be leveraged to tweak core themes ...

View answer
Drupal and node relationships
5 votes

You should be able to duplicate this functionality using the Field Collection module. In short, you attach a Field Collection field to an entity, and then define the Field Collection in a separate ...

View answer
How do I add taxonomy terms and vocabularies to an exportable deployment plan?
Accepted answer
3 votes

I seem to have stumbled my way through to a solution. Vocabularies don't need to be exported via UUID, as they already have their own machine name, but any terms within those vocabularies still need ...

View answer
Module to allow multiple paths for a single node?
Accepted answer
3 votes

You can already do this using core's Path module in Drupal 6. If memory serves, it should be in admin/build/path/add. Simply create two aliases that both point to node/153. I should caution, however,...

View answer
bartik css clone
Accepted answer
3 votes

Keep in mind that if you modify Bartik, the modification itself must also be GPLv2 or later. If your use case permits this, then read on... Honestly, your best bet is to use something like Firebug to ...

View answer
How can I get documentation on a variable listed in the Features UI provided by Strongarm?
Accepted answer
3 votes

Unfortunately, this is a shortcoming of the Variables system in Drupal: there is no centralized place documenting what they do. This is one reason why it is recommended that modules implementing their ...

View answer
site returns 404 on every request, except /
3 votes

Check to make sure that the directory containing Drupal on your server can read the contents of your .htaccess files (the AllowOverride directive in your httpd.conf controls what will be processed). ...

View answer
Where does drupal store all its files?
3 votes

Thankfully, Drupal installations are typically very self-contained. If there were any changes made to your old server's httpd.conf (or comparable server configuration file if you're not running Apache)...

View answer
How to replace a string in a URL field when outputting it in a template file
Accepted answer
3 votes

You probably want a preprocess function in your template.php for this. In your case, hook_preprocess_field() will be easiest to work with - for an example of how this is implemented, check out the API ...

View answer
Enabling blocks in an install profile
3 votes

Are you using the Profiler library to drive your installation profile? If so, there's a "feature" in the 7.x-2.0-beta1 release that causes this behavior. In short, there's some legacy code that ...

View answer
How to inspect a variable when testing with `drush test-run`.
Accepted answer
2 votes

The documentation for Troubleshooting Tests has a number of insights: Use debug() in Drupal 7. This will work during testing, and display the output right in your test results. Print them with a test ...

View answer
Is it good practice for a module to add fields to a certain content type?
Accepted answer
2 votes

Not only is it a good idea, it is the result of the generally recommended workflow when working with custom content types. If you have other business logic that depends on those fields, I would ...

View answer
Overriding variables based on url
2 votes

Assuming I've parsed this all out correctly, you should be able to achieve what you're looking for using Rules. You'll need to install core's PHP Formatter for its integration with Rules to call ...

View answer
Additional form validation only after passing default validation
Accepted answer
1 votes

You should be able to rearrange the order of multiple validation functions in the $form['#validate'] array. After ensuring that your function runs in the correct order, wrap your code acting on your ...

View answer
Contextual Filters On Block of News Items
1 votes

Whenever you need to pass a parameter into a View, one should immediately think "Contextual Filter" - in this case, one should exist for field_channel_section. Note that blocks don't pass their ...

View answer
Add database value in views for entity type user
1 votes

Although I haven't had a chance to play with it myself just yet, assuming everything else is implemented correctly, it seems as though using EntityFieldQuery Views Backend as your Views backend should ...

View answer
What can be put in 'Full HTML' node/fields?
1 votes

Drupal themes are broken down into regions, where content and other blocks are displayed. Therefore, you can add any HTML that would be valid inside whatever container your content region is wrapped ...

View answer
Set Update Manager to install to sites/all/modules/contrib?
Accepted answer
1 votes

To circumvent these (and other) issues, I typically use the Drush command line utility to install and update new modules instead of the Update Manager. For instance: drush dl views --destination='...

View answer
Removing /Drupal from the URL-path
1 votes

Using mod_rewrite within .htaccess, in your server's document root. Untested, but something like this should work. # Enable from .htaccess RewriteEngine On Options +FollowSymLinks # For all URLs not ...

View answer
How do I create a custom Drupal 7 login?
Accepted answer
1 votes

Drupal's administrative permissions are not necessarily linked to any specific role, and individual permissions can define access to anything from viewing individual content types to administrative ...

View answer
Can feeds importer grab fields, too?
1 votes

It can, yes. We've used it extensively to import contacts (nodes) into a homebrew CRM. After creating your Feeds Importer, you should see "Mapping" as the last item in your settings panel to the left....

View answer