Warning: array_flip(): Can only flip STRING and INTEGER values! bei drupal get form
Eingetragen von maen (547)
am 01.03.2014 - 14:54 Uhr in
am 01.03.2014 - 14:54 Uhr in
Hallo, hier mal meine Bauchschmerzen ohne große Worte:
Eigenes Module am entwickeln mit folgender Besonderheit:
Funktion ohne drupal_get_form lädt die node:
function hook_menu(){
$items['admin/marc/%/edit'] = array(
'title' =>t('Edit the group of teams'),
'type' => MENU_CALLBACK,
// 'page callback' => 'drupal_get_form',
'page callback' => 'admin_marc_edit_teams',
'access callback' =>'user_access',
'access arguments' => array('add teams to groups'),
//'page arguments' => array('bla_edit_teams', 2),
'page arguments' => array(2)
);
return $items;
}
function bla_teams($nid){
$node = node_load($nid);
drupal_set_message(print_r($node,1));
return "Hallo";
Gibt mir wunderbar die node in der notice aus, so wie gewohnt!
Function mit drupal_get_form:
function admin_marc_edit_teams($nid){
$node = node_load($nid);
$forms = ...
drupal_set_message(print_r($node,1));
return $forms;
Erzählt mir drupal folgende Geschichte:
Warning: array_flip(): Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->load() (Zeile 173 von /home/duke/sites/kneipenkicker/includes/entity.inc).
PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '))' at line 2: SELECT revision.vid AS vid, base.uid AS uid, revision.title AS title, revision.log AS log, revision.status AS status, revision.comment AS comment, revision.promote AS promote, revision.sticky AS sticky, base.nid AS nid, base.type AS type, base.language AS language, base.created AS created, base.changed AS changed, base.tnid AS tnid, base.translate AS translate, revision.timestamp AS revision_timestamp, revision.uid AS revision_uid FROM {node} base INNER JOIN {node_revision} revision ON revision.vid = base.vid WHERE (base.nid IN ()) ; Array ( ) in DrupalDefaultEntityController->load() (Zeile 191 von /home/duke/sites/kneipenkicker/includes/entity.inc)
Kurzum, mit drupal_get_forms kann er die node nicht laden!??? Hat jemand eine Idee?
Danke vorab,
Marc
- Anmelden oder Registrieren um Kommentare zu schreiben
Erledigt! Habe die falschen
am 01.03.2014 - 15:07 Uhr
Erledigt! Habe die falschen Variablen eingesetzt! Mache jetzt Wochenende!