Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Am I the only person for whom the create forms load without a save, submit or preview option at the bottom of the form? Any ideas on how to put them there myself?
Comment | File | Size | Author |
---|---|---|---|
#12 | pm-task-preview.patch | 538 bytes | juliangb |
Comments
Comment #1
Paraplegic Racehorse CreditAttribution: Paraplegic Racehorse commentedIt seems I solved my own issue. Removing
form.stormcomponent_node_form #edit-preview
fromstorm.css
did the trick. This may have been achievable by editing the content types, but I was logged in as the site-admin (superuser) and still didn't see these buttons.Comment #2
Magnity CreditAttribution: Magnity commentedMarked #392610: Save button missing to add new content as a duplicate of this.
Comment #3
Magnity CreditAttribution: Magnity commentedI find that if I click the preview button, I get the error
Fatal error: Unsupported operand types in /includes/common.inc on line 1273
My thoughts are that it will be good to show the preview button, so this needs sorting out first. As mentioned in other issues, whether the save button shows depends on the require preview configuration setting in Drupal core.
Comment #4
Magnity CreditAttribution: Magnity commentedCombining #521972: Storm requires that Preview for content be optional. into this issue...
Comment #5
Magnity CreditAttribution: Magnity commentedBraindump for night:
Error message is
Fatal error: Unsupported operand types in /[path]/includes/common.inc on line 1283
The error is only triggered on the nodes that contain dates, and the line in
common.inc
is$timestamp += $timezone;
as part offunction format_date
.The function
format_date
is called from each storm 'view' theme function for each date item. Format_date is also called from _form functions via_storm_gmtimestamp_to_date
. If both of these calls are removed, the error does not occur.Comment #6
Magnity CreditAttribution: Magnity commentedThe problem is caused by the way that Storm converts dates to and from timestamps and arrays. As a consequence, for some reason an array is being sent on node preview.
I'm getting a bit lost in the realm of timestamps->dates and vice versa. Would anybody care to put a pair of fresh eyes over to see if there is an easy way of solving this? I do wonder why we need all of the conversions too...
Comment #7
ñull CreditAttribution: ñull commented+ subscribing
Comment #8
Magnity CreditAttribution: Magnity commentedI've probably been a bit lax here about updating the issue with the current state of play - that is, that any Storm content type that does NOT use dates can be previewed, and the preview button shows.
However, for the content types that use dates, previewing currently triggers the errors as in #5, so the preview button does not show.
I'm not 100% on how the date handling works as of yet, so if anyone would be able to take a look at this, it would be much appreciated!
Comment #9
kfritscheMoving this to 6.x-2.x. Because this is something between bug and feature request, this will not be back ported.
Possible solutions for this:
1. We change the return type of our dateext field from array to timestamp.
2. We change the date array to timestamp in the validation process. Move following lines from hook_beforesave to validation:
if (is_array($node->requestdate)) $node->requestdate = _storm_date_to_gmtimestamp($node->requestdate);
3. Or add this line in the theme_*_view.
Comment #10
juliangb CreditAttribution: juliangb commentedThis has been a long-running bug in Storm, and I'm moving it now to the Project Management queue to ensure it is not lost.
I imagine that the move to Field API will fix this as a side-effect.
Comment #11
juliangb CreditAttribution: juliangb commentedTo be reviewed after change to Field API.
Comment #12
juliangb CreditAttribution: juliangb commentedPatch for the last node form that doesn't work.
Comment #13
juliangb CreditAttribution: juliangb commentedCommitted.