User login

Science Collaboration Framework

Suppressing RDF mapping

(Questions from me, answers from Stéphane.)

Apologies if this is covered in the chapter or well-documented elsewhere,
but i have what i think should be a pretty common case.

haven't seen it anywhere, but it's the kind of question that should be
in a FAQ somewhere...

I'm printing a node, say a page node, and don't want it to name its creator
in RDFa (or any other potential RDF output) any more than i want to display
the 'submitted by' in HTML.

complex view example

$view = new view;
$view->name = 'contributions';
$view->description = 'Articles and Commentary';
$view->tag = 'content type';
$view->view_php = '';
$view->base_table = 'node';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->override_option('fields', array(
'nid' => array(
'label' => 'Nid',

E-mails being sent or nodes being saved by batch api breaking on a regular schedule just during cron runs

If you are having weird problems in Batch API processes, such as the base URL for notification e-mails being replaced with something less-than-useful like /var/www/drupal, the culprit may be (somehow) cron.php being called by a command line script (rather than curl or something going to cron.php over the internet).

"Content profile registration broken": debugging rogue form validate overrides

Bad coding in a development partner's custom module was the culprit. It was overriding content_profile_registration's setting of a validation function (and every other module's, too).

Inside the custom module's implementation of hook_form_alter() lives the error:

Drupal 7 module development gotchas

First we discovered that you need a .module file for your module to be recognized. A .info file is not enough. (In this case, we only wanted the .install file, we made an empty .module file, and all was well. But then we wanted to add some functions to that empty .module file...)

Now we have found that you need to declare

files[] = agaric_example.module

in your agaric_example.info file for your agaric_example.module to be read!!!

Making changes to a nested array that may have arrays or strings in some values

Pulled this from the test module for the new RDF module we're putting in Drupal core.

// dealing with a nested array where the top level can be a string or an
// array is complex and helper functions may be a good addition

<?php
  rdf_mapping_alter_create('rdf_test_container', 'title', )

Git update and ignore local changes

The don't-take-no-for-an-answer way:

git reset --hard

Resolution

Syndicate content