User login

note

dump of data and notes running in circles trying to make addressfield not force a value for country on optional fields

in

UPDATE: Patch to Addressfield in need of review: http://drupal.org/node/968112

WRONG:

/**
* Implements hook_form_alter().
*
* The sledgehammer approach to telling Addressfield not to have a default.
*/
function feature_projects_form_alter(&$form, $form_state, $form_id) {
if (isset

RIGHT:

Gotcha: drush sql-sync does not drop existing tables

When you run drush sql-sync @example.prod @example.dev you do not have exactly what is on your example production site. Tables that do not exist on production but do exist on your local development site will still exist.

You need to drop all tables in the database, or simply drop and re-create the database, first.

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.

LFTP, command line FTP and more that works

lftp is a command-line FTP (and more) client that actually works.

lftp -u username,p4ssw0rd ftp.example.com

And once in:

mirror directoryname

A key nice thing that lftp provides is completion of directory and file names when you hit tab. It will take it a moment to get the remote directory listing but then it will tab autocomplete just like the shell on your local computer.

Syndicate content