Closed (fixed)
Project:
Drupal PM (Project Management)
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 Feb 2009 at 02:29 UTC
Updated:
18 Jun 2014 at 09:58 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Paraplegic Racehorse commentedIt seems I solved my own issue. Removing
form.stormcomponent_node_form #edit-previewfromstorm.cssdid 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 commentedMarked #392610: Save button missing to add new content as a duplicate of this.
Comment #3
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 1273My 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 commentedCombining #521972: Storm requires that Preview for content be optional. into this issue...
Comment #5
Magnity commentedBraindump for night:
Error message is
Fatal error: Unsupported operand types in /[path]/includes/common.inc on line 1283The error is only triggered on the nodes that contain dates, and the line in
common.incis$timestamp += $timezone;as part offunction format_date.The function
format_dateis 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 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 commented+ subscribing
Comment #8
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 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 commentedTo be reviewed after change to Field API.
Comment #12
juliangb commentedPatch for the last node form that doesn't work.
Comment #13
juliangb commentedCommitted.