User login

Definitive Guide to Drupal 7

Exportable Entity Content

See Form Messages.

Principle: On a site with multiple administrators, "Configuration is Content".

Manifesto posted http://drupal.org/node/938368#comment-4286326

Random entity and config notes cut from Major module chapter

Nor is this export necessarily for the commonly accepted need to export the configuration of entities' bundles and their fields (although, to make things more confusing, fago's main use case is to make bundle definitions into entities)

If two messages apply to one form element, then both apply.

A multivalue form ID field.

Also ideally, that export would live only in code if the UI were never needed. On this point, unfortunately, Entity API always automatically imports to the database, rather than reading from code at runtime.

Drupal AJAX caught rendering (parts of) the form rather than just inserting returned HTML

Seriously, Drupal, what the hell?

This code is the callback for an #ajax property on a form element. The HTML returned replaces the HTML provided. That all works. What gets tricky is the form validation function being called and getting the error.

Drush site-upgrade and re-running upgrades over existing code

Drush's site-upgrade command asks whether to replace or re-use an existing target site.

Drupal site already exists at /home/ben/code/anjali7/web. Would you like to:
[0] : Cancel
[1] : Delete the existing site and start over.
[2] : Re-use the existing code, re-import the database from the source site
and run updatedb again.

This can be avoided by running the command with the --reuse flag.

Using directory-reserved paths in Drupal

[There is no current general resolution to using directory-reserved paths, but it's surely possible with custom Apache rewrite rules-- apparently everyone concludes (as i am right now) that it's not worth the effort!]

Partial Resolution

To .htaccess, add:

    # Allow the modules path to be used by Drupal for the modules chapter.
    RewriteCond %{REQUEST_URI} ^/modules/?$
    RewriteRule ^ index.php [L]

sed - replace text in multiple files

[Note: This page was unpublished from Drupal.org, and so became a martyr in the battle against pretending that unpublishing is a replacement or an aid to curating content. Rescued with the help of archive.org. If you agree that we should be deprecating, pointing forward, and curating our documentation, pitch in.]

sed - replace text in multiple files

Last modified: March 16, 2007 - 21:07

hook_module_implements_alter called before schema is installed

I thought .module files were not supposed to be loaded and available until after .install files were run, but whatever is the intention, it is absolutely certain that at least this hook can be implemented before the module is truly installed.

Drush commands to enable Devel module and Page Render Array display

drush -y en devel
drush vset devel_page_alter 1

To enable the broader set of modules, it would be great to have these wrapped in a couple drush commands.

Enable

drush -y en enabled_modules views_ui xray

RDF for relationship between chapters and authors

is there an RDF relationship to give between author profiles and chapters? Chapters have a node reference field to authors.

best is to use sioc:has_creator

Syndicate content