Like pathauto, auto_nodetitle almost always fires up the poorly performing D6 token system. I’d like to automatically disable it like we do pathauto. Then it is up to the implementer to set $entity->title as desired. Without disabling, ANT will use presave hook to trample over any title that was set by mapping or prepare.

Disabling is done by setting $entity->auto_nodetitle_applied=1.

Feedback welcome.

Members fund testing for the Drupal project. Drupal Association Learn more


moshe weitzman’s picture

Project: Migrate » Migrate Extras
Component: Code » Miscellaneous
mikeryan’s picture

Does nodetitle have an equivalent to pathauto's pathauto_perform_alias? It'd be nice to simply map a 1 or 0 to that field to control the behavior...

dalin’s picture

Version: 6.x-2.x-dev » 7.x-2.x-dev
Status: Active » Needs review
1.26 KB

Try this.

This should eliminate the need for all the silly 'disable auto_nodetitle' in the example base classes.

dalin’s picture

Cleaned up the wording a bit.

mikeryan’s picture

Status: Needs review » Needs work

Class name needs to be changed, will conflict with pathauto support.

fields() should really do a module_exists('auto_nodetitle') - to be fair, pathauto should too;).