I've created a subtheme based on mothership (7.x-1.12). I've enabled the Feeds module and configured an importer to import a CSV file and create some nodes through a standalone form. When I visit the import/% page the form shows, except for the file selection field:
What happens is that on line 98 in the mothership_form_elements($variables) function (file form.php), a check is made to see if there's a title. If not, the display_title setting is set to none:
// If #title is not set, we don't display any label or required marker.
if (!isset($element['#title'])) {
$element['#title_display'] = 'none';
}
On line 105 a switch statement is used:
switch ($element['#title_display']) {
On line 153 and onwards the field is written to the output:
case 'none':
case 'attribute':
// Output no label and no required marker, only the children.
$output .= ' ' . $prefix . $element['#children'] . $suffix . "\n";
break;
The file upload field is in the $element['#description'] variable, which is left out in the cases 'none' and 'attribute'.
I see no immediate fix other than changing the test for element('#title') to include a check for file fields.
Comment | File | Size | Author |
---|---|---|---|
missing_fileuploadelement.png | 24.12 KB | Gerben Spil |
Comments
Comment #1
mortendk CreditAttribution: mortendk commentedComment #2
Gerben Spil CreditAttribution: Gerben Spil commentedCould be made into:
Comment #3
AaronELBorg CreditAttribution: AaronELBorg commentedYeah, using theme_form_element (which I'm assuming Mothership does) gets really confusing.
Note: I'm not using Mothership.......I just found this thread doing a google search.
Since I don't have tons of time to spend trying to fix the issue. (I just want a friggin' "upload" button!!)
....I did this after the switch statement.
Gets the button back anyway.
I have a feeling that this in theme_form_element is causing something odd with the Feeds module:
I'm fully aware that I could be wrong, however.
Comment #4
AaronELBorg CreditAttribution: AaronELBorg commentedOk, ok....
Lemme put down the crack pipe for a sec (I kid, amigos. I kid.)
That dirty hack in #3 comes with its own fair share of problems and could be a bit less dirty by simply appending all this stuff into $output.
Put it right after the closing tag of the switch statement.