The various devel_generate_* functions call theme() in the process of setting a message. e.g.

  $new_terms = devel_generate_terms($num_terms, $vocabs, $title_length);
  if (!empty($new_terms)) {
    drupal_set_message(t('Created the following new terms: !terms', array('!terms' => theme('item_list', array('items' => $new_terms)))));
  }

If called during a custom install profile, this call to theme() will be unnecessarily slow because a large set of normally cached data has to be rebuilt (there is no cache during install). So during an install profile, some other methodology should be used to build the output for that message.

e.g. Perhaps:

  $new_terms = devel_generate_terms($num_terms, $vocabs, $title_length);
  if (!empty($new_terms)) {
    if (variable_get('install_task' == 'done') {
      drupal_set_message(t('Created the following new terms: !terms', array('!terms' => theme('item_list', array('items' => $new_terms)))));
    } 
    else {
      drupal_set_message(t('Created the following new terms: @terms', array('@terms' => implode(', ', $new_terms))));
    }
  }
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

salvis’s picture

Version: 7.x-1.x-dev » 8.x-1.x-dev
Category: bug » feature

Patch for D8 first, rtbc, commit, backport to D7, rtbc, commit...

moshe weitzman’s picture

I'd be OK with just moving to comma delimited always, instead of special casing for for install profile. Not sure how others feel about this.

exratione’s picture

Always comma delimited is fine by me.

pcambra’s picture

Status: Active » Needs review
FileSize
2.16 KB

Agreed with the comma separated values, here's a patch for it.

pcambra’s picture

Issue tags: +develcontribute

Tagging

pcambra’s picture

Status: Needs review » Fixed

As it seems there's consensus, I've committed this in D8 & D7.

Thanks!

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

Can't type.