User login

Drupal

Deleting Drupal Fields Programmatically (So As to Change Field Type with Features)

In brief: The code at the bottom of this post deletes the named fields. If you are changing the field type for one or more fields, put it in an update hook for a feature module and run update.php before running features revert, your feature will happily rebuild the fields with their new settings. This destroys data.

FieldException: Cannot change an existing field's type. in field_update_field() (line 230 of /home/ben/code/sdl/web/modules/field/field.crud.inc).

Drupal as-a-useful-distribution development productivity - Robin Monks

Drupal core would be split into the required components, with all the optional components separated out, along with these 10 or so critical contrib modules to become this base distribution.

Each of these components has a driver, someone who looks after their component, as well as co-drivers who might only be focused on improvements for a certain version or adding new features. This group of people talk regularly to coordinate efforts and are steered by the distribution’s (Drupal’s) driver (Dries or someone else who manages a specific release).

Removing book navigation

Remove book entirely, with hook_page_alter()

Media module does not allow the filling out of extra fields when adding or uploading media

Oh, Media module. The adding a text field such as for caption or credit works, the field is attached, but you need to go to admin/content/media and edit an uploaded file to add any information there.

Poor theming of action links on node pages

Adding an action link to a node page has proven interesting, in that it does not show up on a stripped-down theme (but it is present in the HTML). (Note: action link code from the Definitive Guide to Drupal 7.)

We are adding this to a view called 'awards' and node number 20.

Administrator Experience for Drupal: Skip Confirmation for Deletion of Less Important Items

CS would like a module that lets you set in which places you want to be required to confirm delete and which places should just let you delete.

  • Menu items-- don't make me confirm
  • Content-- make sure

I don't think the confirm form is necessary to present cross-site scripting-- that's in the token with the form (or delete link— that might be an easy way to do this, change one or the other to links so you can visually see if you're getting a confirmation or not, and maybe think twice faster).

How to create a Feature without the initial download through the UI

If you hate downloading and unzipping the initial feature you create as much as i do, because you haven't bothered with that foolishness since Drush, this post is for you.

This is the minimal information needed (from my experimentation) for Features to recognize your module as a Features module. Then you can add variables and other features through the UI (or Drush), and drush fu feature_example to update your module code (where feature_example is the name of your feature) and fu stands for features-update.

In feature_example.info:

Syndicate content