Fatal error: Cannot redeclare entity_ui_validate_machine_name() (previously declared in /Applications/MAMP/htdocs/drupal-7.0-beta/sites/mori.drupal7.dev/modules/corefunctions/entity/entity/entity.ui.inc:470) in /Applications/MAMP/htdocs/drupal-7.0-beta/sites/mori.drupal7.dev/modules/corefunctions/entity/entity/entity.ui.inc on line 486

versions:
php 5.2.13
drupal d7b2

Comments

vikingew’s picture

Problem is that the same commit, adding the same function, was done twice:

October 29, 2010
    *
      Commit #443606 by fago at 12:19
      Entity API: /modules/entity/entity/entity.ui.inc 1.1.2.8 @ DRUPAL-7--1

        Entity CRUD: patch by klausi and me: add a FAPI validation handler to ease validation of machine names for exportables

October 25, 2010

    *
      Commit #441190 by fago at 16:50
      Entity API: /modules/entity/entity/entity.ui.inc 1.1.2.7 @ DRUPAL-7--1

        Entity CRUD: patch by klausi and me: add a FAPI validation handler to ease validation of machine names for exportables

so this code was duplicated:

/**
 * Validation callback for machine names of exportables.
 *
 * We don't allow numeric machine names, as entity_load() treats them as the
 * numeric identifier and they are easily confused with ids in general.
 */
function entity_ui_validate_machine_name($element, &$form_state) {
  if (is_numeric($element['#value'])) {
    form_error($element, t('Machine-readable names must not consist of numbers only.'));
  }
}
marvil07’s picture

Title: Error from update.php with current dev version » duplicated function definition of entity_ui_validate_machine_name()
Status: Active » Needs review
StatusFileSize
new1.04 KB
marvil07’s picture

Priority: Normal » Critical

it is a fatal error :-p

bellHead’s picture

Status: Needs review » Reviewed & tested by the community

Patch applies cleanly ans fixes the problem.

fago’s picture

Status: Reviewed & tested by the community » Fixed

ouch - looks like Git-to-CVS export script has screwed this one up :( fixed that, thanks.

Status: Fixed » Closed (fixed)

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