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?

CommentFileSizeAuthor
#12 pm-task-preview.patch538 bytesjuliangb
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Paraplegic Racehorse’s picture

It seems I solved my own issue. Removing form.stormcomponent_node_form #edit-preview from storm.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.

Magnity’s picture

Magnity’s picture

Component: User interface » Miscellaneous

I 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.

Magnity’s picture

Title: no submit or save or preview buttons on create forms » Support for node preview
Version: 6.x-1.20 » 6.x-1.x-dev
Category: support » bug
Magnity’s picture

Braindump 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 of function 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.

Magnity’s picture

The 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...

ñull’s picture

+ subscribing

Magnity’s picture

I'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!

kfritsche’s picture

Version: 6.x-1.x-dev » 6.x-2.x-dev

Moving 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.

juliangb’s picture

Project: Storm » Drupal PM (Project Management)
Version: 6.x-2.x-dev » 7.x-1.x-dev
Component: Miscellaneous » Code

This 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.

juliangb’s picture

Status: Active » Postponed

To be reviewed after change to Field API.

juliangb’s picture

Issue summary: View changes
Status: Postponed » Needs review
FileSize
538 bytes

Patch for the last node form that doesn't work.

juliangb’s picture

Status: Needs review » Fixed

Committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

  • Commit cff61cb on 7.x-1.x, 7.x-2.x by juliangb:
    Issue #377680 by juliangb | Paraplegic Racehorse: Support for node...