User login

Drupal Development

Drupal use schema for uninstall

Even some quality modules by very good developers are still using db_query("DROP TABLE {example_table}"); rather than the schema just defined and properly used by the update.

But sure enough, the hook_uninstall API documentation example shows the use of schema:

<?php
function example_uninstall() {
  drupal_uninstall_schema('example');
  variable_del('example_var');
}
?>

Resolution

The Drupal way, in a sentence

On IRC #drupal:

webchick: What I would rather do is pimp out trigger module so we could do that kind of stuff just through configuring some actions

Resolution

Drupal development modules

Agaric has added the following modules to our development git repository. Alphabetical order:

Moving mail handling to a new server

Some quick notes from the process, captained by Stefan.

Change the MX Record:

Old Information
Domain Preference Exchanger

New Information
Domain Preference Exchanger
mtgrading.com 10 mail.agaricdesign.net

Or actually, keep the old one, but set it at a higher number (and so lower preference).

mtgrading.com 90 mx.mtgrading.com

Resolution

Bulk taxonomy import term-by-term is just too slow

Struggling with taxonomy import.

After stripping everything out, the conclusion is that taxonomy_save_term, by itself, without even the hooks to add extra data, is simply too slow, with a minimum of three database calls per term. (data, hierarchy, vocabulary)

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 1048576 bytes) in /RCS/agaric/agaric-sites/scf/includes/bootstrap.inc on line 836

134,217,728

Increased to 256MB. It ran forever, then returned this:

Access Drupal functions and session from a PHP script in a site subdirectory

If you want to use Drupal sessions and the logged in user object from a straight PHP script not at Drupal root but somewhere in subdirectories in a site, you will probably need to do something like I endend up doing in profiles/scf/switch.php to impersonate the Drupal site root directory.

In fact, I think the partial installation profile idea might need something like this.

(Skip down to resolution.)

Some test output code used to figure out what the domains and sessions were doing:

One character patch to location module to get rid of senseless too many empty locations error

Working on the Trade Justice "site sprint" to launch this long-running and ambitious project...

The secret plan to store configuration in files

There does not seem to be any discussion about a file-based approach to saving configuration information in Drupal. Agaric comes to this conclusion after extensive Googling (see the keyword details of this post; by the way, I can confirm that word order matters when doing Google searches, even in the absence of quotation marks).

Syndicate content