Form template problem

am 27.01.2010 - 09:11 Uhr in
Hallo,
ich habe mir ein Template/Theme für meinen einen Inhalttyp (Werbung) erstellt. Diese nennt sich werbung-node-form.tpl.php
In der Datei Template.php steht folgendes:
//------------
function garland_theme($existing, $type, $theme, $path) {
return array(
'werbung_node_form' => array(
'arguments' => array('form' => NULL),
'template' => 'werbung-node-form',
),
);
}
//-----------------
function garland_preprocess_werbung_node_form(&$vars) {
// Backup original form.
$vars['article-form'] = $vars['form'];
// field_article_image
$vars['article_url'] = drupal_render($vars['form']['field_weburl']);
$vars['article_1'] = drupal_render($vars['form']['field_kategorie']);
// ...
// Fieldsets als einfache Variablen im Template verfügbar machen.
$vars['field_menu'] = drupal_render($vars['form']['menu']);
$vars['field_revision'] = drupal_render($vars['form']['revision_information']);
$vars['field_author'] = drupal_render($vars['form']['author']);
$vars['field_options'] = drupal_render($vars['form']['options']);
$vars['field_comment_settings'] = drupal_render($vars['form']['comment_settings']);
// Submit button.
$vars['submit'] = drupal_render($vars['form']['buttons']['submit']);
}
?>
Und meine werbung-node-form.tpl.php sieht so aus:
<?php
// Print names of all available variables.
//drupal_set_message('<pre>'. var_export(array_keys(get_defined_vars()), 1) .'</pre>');
?>
// Print fields.
<?php // Ohne die preprocess müsste man "print drupal_render($form['title']);" schreiben. ?>
<?php print drupal_render($form['title']); ?>
<?php print drupal_render($form['field_beschreibung']); ?>
<?php print $article_url; ?>
<?php print $article_1; ?>
<?php print drupal_render($form['field_foto1']); ?>
<?php print drupal_render($form['group_fotos']); ?>
<div id="preis1"><?php print drupal_render($form['field_preis1']); ?></div>
<div id="preis2"><?php print drupal_render($form['field_preis']); ?></div>
<div id="break1"></div>
<?php print drupal_render($form['field_werbeart']); ?>
<div id="besucher1"><?php print drupal_render($form['field_besucher']); ?></div>
<div id="besucher2"><?php print drupal_render($form['field_besucherzeitraum']); ?></div>
<div id="break1"></div>
<div id="besucher1"><?php print drupal_render($form['field_seitenaufrufe']); ?></div>
<div id="besucher2"><?php print drupal_render($form['field_seitenaufrufezeitraum']); ?></div>
<div id="break1"></div>
<div id="werbefla"><?php print drupal_render($form['group_werbefl_a']); ?></div>
<div id="werbefla"><?php print drupal_render($form['group_werbefl_b']); ?></div>
<div id="werbefla"><?php print drupal_render($form['group_werbefl_c']); ?></div>
<div id="werbefla"><?php print drupal_render($form['field_link']); ?></div>
<div id="break1"></div>
<div class="extra-fields">
<?php print $field_author; ?>
<?php print $field_revision; ?>
<?php print $field_menu; ?>
<?php print $field_comment_settings; ?>
</div>
<hr class="field-break" />
<div class="form-buttons">
<?php print $submit; ?>
</div>
<div class="hidden">
<?php //print drupal_render($form); ?>
</div>
Ich habe nicht alle Felder in der Template.php umgewandelt. Das ist doch egal oder?
So nun zum Problem. Wenn ich dieses Theme benutze und mochte ein Bild hochladen, kommt folgende Fehlermeldung:
"An unrecoverable error occurred. The uploaded file likely exceeded the maximum file size (16 MB) that this server supports."
Wenn ich kein Theme verwende, geht es ohne Probleme!
Wo liegt mein Fehler?
Grüße
qme
- Anmelden oder Registrieren um Kommentare zu schreiben
Hi, das sollte nicht
am 27.01.2010 - 10:23 Uhr
Hi,
das sollte nicht auskommentiert sein:
<?php
//print drupal_render($form);
?>
Drupal braucht da noch ein paar Daten, die nur so ins Formular kommen.
Und ansonsten steht das Problem klar da: Dein Server hat zu wenig Speicher zur Verfügung. Versuche das über die php.ini auf 96MB zu bekommen, dann solltest du keine Probleme haben.
---
Viele Grüße,
Kars-T
| comm-press
upload
am 27.01.2010 - 10:49 Uhr
<?php
//print drupal_render($form);
?>
Korrekt.
Dein Server hat zu wenig Speicher zur Verfügung.
öhm, nein.
Da steht, dass der Server so konfiguriert ist, dass nur Dateien bis zu einer Grösse von 16MB hochgeladen werden können. Das hat nichts mit dem memory_limit zu tun.
hth,
Stefan
--
Sei nett zu Deinem Themer!
Lol jetzt wo du es sagst
am 27.01.2010 - 11:08 Uhr
Lol jetzt wo du es sagst ;)
Die Tage waren so viele out of memory anfragen, das ich schon "mechanisch" reagiert hab..
---
Viele Grüße,
Kars-T
| comm-press