[rant]The forced preview on everything that is posted to drupal.org is making me a nutcase. Sometimes I don't even bother to post or forget to continue a post if I am busy. If I am answering a question quickly that person will not get my post because it is still sitting in preview while I go on to something else. I then close the browser window and the post and though are lost.

Many times I see the preview and press preview again thinking that I am submitting. Then I go back later and find no post. Again the person I am responding to suffers bcause I can't remember what it was I was going to say.[/rant]

Now I am going to boil something like coffee or an egg >:)

Comments

graggrag’s picture

I have a module in progress where I'll just have to ignore Preview until I can find a civilised and humane way to kill it (for certain modules).

nathandigriz’s picture

If you find a way then please let me know. I have been trying to remove preview from node editing without any luck. I don't think the validation routine should send you to preview when an error is encountered and only give you a choice of previewing again before submitting. It's just crazy.

behindthepage’s picture

When you are setting up drupal on the content-settings page (admin/node/configure) you can chose to have preview as optional and you can submit the post directly. Does this solve your problem?

gpdinoz
"If we can see further it is because we stand on the shoulders of giants"

Regards
Geoff

graggrag’s picture

I think that would solve the problem, but I don't see such a setting for page or story, which is what a lot of young, homegrown modules are based on. If you know of an example, that would be cool.

venkat-rk’s picture

May be I haven't understood your problem, but if you are talking about node editing on your own sites, can't this be set right by making Preview optional at administer>>content>configure?

graggrag’s picture

On page and story for example, there is no such facility at administer->settings->content types->[page|story]->configure. If some other module has an example of it, please point me to it.

Heine’s picture

In Drupal 4.7 you can find this at administer » settings » posts (admin/settings/node).
--
Tips for posting to the forums.
When your problem is solved, please post a follow-up to the thread you started.

venkat-rk’s picture

No, not where you mention.

Or try this:
www.yourdomain.com/admin/node/configure

Replace yourdomain.com with your domain name. If your drupal install is in a sub directory, then put that also in the path above.

This is a global setting and is not available per content type in 4.6.

nathandigriz’s picture

When you set it to optional it does not include if there is a error in validation. When an error happens you get both a form AND a preview which is even worse because in most themes this particular screen presents broken HTML.

My original complaint is this is not set as optional on Drupal.org which would help usability here. But on my own sites I don't want to see this at all.

Leeteq’s picture

In misc. sites, it would be useful to be able to force preview for certain input filters, however. But especially for comments here on Drupal.org, I doubt if it is more useful than annoying. Almost aIl posts are in plain text, so what's the point?

There is of course not one solution that fits all, but that is why the most common situation should guide the choice.

I have also lost some posts due to this, mostly because I use many tabs in Firefox and quickly move on to a different one before checking the result. When I eventually come back to that tab, often hours later, I notice it and finally submit.
- But not when Firefox crashes meanwhile...

(- which happens more and more now that we keep adding extensions and web sites start using AJAX features. For example, I had to remove the nice Yahoo email inline preview extension as it crashed Firefox.)

The latter is not really "off-topic", as this is the situation many of us have now.

I think any good post on Drupal.org is worth more than the actual consequences of "risks" by not enforcing preview on comments.

.
--
( Evaluating the long-term route for Drupal 7.x via BackdropCMS at https://www.CMX.zone )

patrickharris’s picture

have thought I've submitted posts, only to come back a day or two later to have found I must have just "preivewed" the post & forgotten to submit it. It is not an intuitive system.

Chill35’s picture

Forced preview is an annoyance in all cases where you have the opportunity to edit your post or comment after publishing it.

On Drupal.org you have to be registered in order to post anything, and you can edit your comments, at least for a while.

I wonder why it is that we are not allowed to edit the first post in a thread ? If we are registered users, we should be trusted enough to edit our typos in our posts ?

Also, we should be able to edit our "issues" posts. Can someone explain to me the actual reasons why we cannot ?

graggrag’s picture

As stated by nathandigriz, none of the suggestions above actually touches the problem. For now, this gives me what I need. I've added a setting to the module:

function culture_settings() {
  $form['culture_disable_preview'] = array(
    '#type' => 'radios', 
    '#title' => t('Preview'),
    '#default_value' => variable_get('culture_disable_preview', 0),
    '#options' => array(t('Enable'), t('Disable')),
    '#description' => t('Enable/Disable Preview on posts?')
  );
  return $form;
}

and a hack to node.module:

--- drupal-cvs-20060228/modules/node.module
+++ drupal.dev//modules/node.module@ -1686,7 +1686,9
@@
   }
 
   // Add the buttons.
+  if( ! variable_get( $node->type . '_disable_preview', 0)) {
   $form['preview'] = array('#type' => 'button', '#value' => t('Preview'), '#weight' => 40);
+  }
   $form['submit'] = array('#type' => 'submit', '#value' => t('Submit'), '#weight' => 45);
   if ($node->nid && node_access('delete', $node)) {
     $form['delete'] = array('#type' => 'button', '#value' => t('Delete'), '#weight' => 50);
nathandigriz’s picture

I went caveman also and just gutted the node_preview because it was causing too many problems with the css based themes.

markus_petrux’s picture

http://drupal.org/node/51835

This is a result of an attempt to include this functionality in core. Unfortunately, it has been marked today as "won't fix", hence the contrib module. ;-)

Doubt is the beginning, not the end of wisdom.

Leeteq’s picture

If it is very simple, will there be a version for 4.6.x too? There is a lot of sites that will stick with that version for quite a while. Thanks for the contribution :-)

.
--
( Evaluating the long-term route for Drupal 7.x via BackdropCMS at https://www.CMX.zone )

markus_petrux’s picture

It's based on the formsapi implemented in 4.7

I believe such a thing is not possible in 4.6, without hacking the core.

Doubt is the beginning, not the end of wisdom.

mcurry’s picture

http://drupal.org/node/51835 not found? What is the name of the module (or, does someone have a link to the new location?)

Michael Curry - Exodus Development

sinasalek’s picture

seems that this problem still remains! it's drive me crazy because all of our site members keep telling me to remove this preview button.

sina.salek.ws, Software Manager & Lead developer
Feel freedom with open source softwares

yoann’s picture

Another solution is to create a simple module containing the following (that's what I do):

function newmodule_form_alter($form_id, &$form)
{
unset($form['preview']);
}

This code suppress every previews in drupal.

An improvement is to filter according to the content type (easy to do, and no need to update the core)

patrickharris’s picture

function mynewmodule_form_alter($form_id, &$form)
{
$form['preview']['#type']='hidden';
}

You will also have to change the Admin->Content Management->Post settings to 'Preview post optional', otherwise you will have no post button on the initial creation page.

twentyniner’s picture

Preview can be made optional on both posting and commenting forms in 5.0 RC1.

To make it optional for posting a blog, page, story or topic just go to :

Administer | Content Management | Post Settings

Then choose Post Preview : Optional

To make it optional for creating a comment just go to :

Administer | Content Management | Comments -> Settings Tab

Down in the Posting settings section you can choose Preview Comment : Optional

On a side note this (www.bikekentucky.com) is my first experience with using Drupal. So far so good. In some cases its been confusing but as I get more into it I've been able to find options for making it do what I want by methodically going through the admin screens. I've got years of programming experience and I intend to customize the site a lot but for now will keep it simple since I'm using 5.0 and don't want to tweak things to much and have to break them as updates come out.