I would like to start off a "paper trail" of my efforts to get Save & Edit functionality in Drupal 7 core. This will be my first time proposing a feature or discussing a feature that I actually plan to implement myself, and provide patch(es) for, so keep that in mind.

Outline

I recently created the Save & Edit module for D6. This module adds some simple functionality to the node adding/editing interface. I have received some great feedback so far on the module, and now hate it when I come to a site where I can't Save & Edit to avoid losing any changes. The following features are what it currently does, and with the items I would likely need to trim out for a core patch marked through, and important core features bolded.

  • Add a Save & Edit button to node add/edit forms of selected node types
  • Customize button texts and weights
    • This, while nice would not be a part of core. It is easy enough to form_alter and change the weights and titles of buttons without having this as a built in feature. Makes sense to remove it for "trimming" the code down.
  • Allow the ability to select preference for "Auto-Unpublishing" a node when the Save & Edit button is used.
    • This currently has 2 settings. (1 to ALWAYS auto-unpublish, and 1 to ONLY unpublish on new nodes)
    • I think only the setting for auto-unpublish on NEW nodes is actually valid. The other setting was there just in case, but doesn't seem to have a likely use case.
    • When this option is enabled, a new "Publish" button is added to the form as well helping a user quickly identify that the node is unpublished, and needs to be published in order to be visible. This can still be modified using the normal checkbox to publish or unpublish, but I felt this was needed for usability to quickly understand that a node is not "active"

Now with the features lined out that are current, and should IMHO go into core, what I need is the appropriate path to take in developing this. It is obvious that little "trim" features like this don't get some crazy configuration page under admin/settings, thus why features like custom titles and weights would be removed. It seems to me that with the minimal features that are likely valid for core, that the configuration options (enable/disable & auto-unpublish setting) should likely reside under the content type editing pages. Something that by default would be an enabled feature, but the ability for users to toggle at will.

Feedback

I guess now my next step is to see that this is a desired feature, that there is some community feedback that really thinks this really would be a good addition to core, and not just a feeling I have personally.

Please feel free to chime in with both feedback of if this should be in core or not and remain a contributed module AND a proper impelentation path that should be followed on exactly HOW the feature is integrated.

Comments

cpliakas’s picture

This is a simple idea that would greatly improve usability and should be in core. This is one of the most common annoyances we hear from clients the first time they edit content through their Drupal interface.

izmeez’s picture

I am using it in Drupal 6 and it's very useful and is working well.
I would agree this should be considered for core from a user experience point of view.

Izzy

deekayen’s picture

I see only 90 users for Save & Edit, and 5445 for Node Clone. Some of that could just be from people who found node clone a long time ago and stuck with it as their solution. Seems like some sort of option like this could be desired with that many users of like or similar functionality.

himerus’s picture

I've never come across Node Clone until your post. Seems useful as well, but a completely different functionality IMO. Even before creating this module, I had a bunch of people point me to different Draft modules that used all sorts of bloated code to complete what should be a VERY simple feature. I have already added more code than I would like to the D6 module, but in core, it would simply be a new button (buttons depending on the publish button being available on unpublished nodes) and modification to the default submit handler.

Node Clone:
The clone module allows users to make a copy of an existing item of site content (a node) and then edit that copy. The authorship is set to the current user, the menu and url aliases are reset, and the words "Clone of" are inserted into the title to remind you that you are not editing the original content.

Save & Edit:
The module simply adds a button titled "Save & Edit" on node types selected in the admin section. Using this extra button when saving a node will simply redirect back to the edit form rather than returning to the node page, or the /admin/content/node page.

sethcohn’s picture

actually, deekayen, you're one of the committers to Submit Again which, IMHO, is also should be considered as the sort of option for core as the above...
Himerus and I talked yesterday about how easy it would be to add that sort of 'Save & Add Another' functionality to Save & Edit, as yet another button.

What I'd really like see in core is a _checklist_ of buttons that can/will appear for a given node type:

(current core)
Submit (aka normal save)
Preview (aka normal preview, no save)
Delete (delete node)
(optional examples below)
Save & Edit (save, then re-edit, with publish or not option)
Un/Publish (ie whichever state to change to, so show 'Publish' only if currently unpublished)
Submit and Add Another (ala the way Taxonomy works, where that is the default behavior)

Maybe a hook for node_form_buttons to allow modules to easily define new buttons per content type (with corresponding function for that behavior)?
You can do this now with form_alter, but as examples of something where you usually have to custom code or use an existing module, and maybe be in core:

I want a given content type to have no preview button. Not an optional preview, but no preview button at all.
I want this other content type to behave just like Taxonomy does, keep adding items on save, until I quit
I want a button to save and also promote content to the front page, not a checkbox hidden behind a fieldset, (but only if I'm allowed to promote).

deekayen’s picture

Perhaps instead of more buttons, the configuration for the content type could have a dropdown selection for handling the redirect after the save, from which the options include "View node," "Continue editing," and "Create another." Default should continue to do what it does now, show the node.

himerus’s picture

Thanks everybody for helping kick off this discussion.

I think at the very core, it comes down to this often overlooked piece of node editing becoming more usable for the "target audience" of Drupal. And can even fit into the D7UX discussion somewhere. The fact that all these things CAN be done easily enough for a developer is not the issue.

As shown with my Save & Edit module, and others like the Submit Again & the Node Clone mentioned above, through code in form alter, and submit handlers, it is possible to achieve all of this. Nothing wrong with that at all. I see the global issue being usability for the standard user that really does want to add or modify what should be a "simple" feature without having to form_alter something to make it possible.

@sethcohn I think has hit it on the head, and after further discussion, to me it makes perfect sense to me.

The usage argument could be as simple as hiding that damn preview button on certain node types, or redirecting to a different location after a submit. This type of thing should be much more intuitive for the end user to configure rather than requiring a user or client or a themer to figure out that they need to use the form_alter hook, and unset the preview button.

I think that under content types a new fieldset of potential "Button Management" options would become available, and by default present the following options:

  • Save (aka: Save & Close, Save & View Node)
  • Preview
  • Delete
  • Save & Continue Editing (aka: Apply)
  • Save & Add Another
  • Save & Create a Copy
  • Publish (On un-published nodes)

For the sake of argument, let's say the lower options are built in core as "bonus possibilities", but only the main 3 are still set as defaults anywhere. Each button is accompanied by a checkbox enabling or disabling it. The save button would not be able to be disabled unless there is another submit button declared that handles the submission. Delete may or may not be able to be disabled at all??
Each button though, core or "bonus" has the ability to customize the button text, and sort by weight (like taxonomy terms, menu items and blocks)
I think also customizing the redirect location of built in buttons would be good... but possibly tricky in certain cases. (preview, delete) HOWEVER, customizing the redirect location of the DEFAULT save button would solve the issue of two of the "bonus" buttons listed above. Save & Edit & Save & Add Another (Submit Again) could be handled so simply by just being able to configure where the redirect is sending the user to.

Please keep up the good feedback, it's much appreciated. Hopefully some of the powers that be can/will chime in here, and see if this is valid, or if it should be something that remains in contrib code. Even if that turns out to be the case, I think I have a better idea of what is really "needed" for the module should that be the path it takes for D7. Rather than my Save & Edit module, it would become more of the "Save & Do whatever you want" module. :D

moshe weitzman’s picture

Button management is a pretty cool idea. folks will soon want to specify which roles get which buttons which tips the scale into too complex for me. if we can leave that for contrib, i'd support a core patch like this.

Note that term add already assumes save and add another. Should admin/user/user/add do the same?

himerus’s picture

@moshe I'm worried about the same thing as far as "tipping the scales". My initial thought was simply to add the Save & Edit functionality, but @sethcohn brought up the valid point of the other modules offering similar functions that "should" be easier to implement and configure on a per-node basis.

The initial idea would have been a fairly simple patch to core, but already, this would turn into quite a bit more code, and core modifications to implement, and I'm not sure if it's the right thing or not.

A true "Button Management" module/integration would take much longer to develop, and test. Surely not ready before a code freeze for D7. The same of admin/user/add could be said for other areas like block management where there is already a contrib for Block Save & Edit, a lot of these features potentially created by a button management API/hook could really extend the functionality and ease of configuring drupal node/block/taxonomy/user forms including role based permissions as well... so many potential implementations/uses... such is the nature of Drupal thankfully.

This is really the reason I wanted to start the discussion, and have some of the people who have praised the module chime in.

deekayen’s picture

You don't have to build improvements in one huge whammy. Try increments, we'll discuss the merits, and see where it goes.

sethcohn’s picture

re: Moshe's concern of increased complexity for button management, what about just using (mostly) existing permissions to control this?

We already have per nodetype permissions for create (aka save) and edit (own or any), and delete (own/any), and that would cover most cases (leaving edge cases for a contrib module to handle), for people allowed to deal with particular nodetypes...

Using himerus's list of potential buttons, as a (large) example :
* Save (aka: Save & Close, Save & View Node)
* Preview
* Delete
* Save & Continue Editing (aka: Apply)
* Save & Add Another
* Save & Create a Copy
* Publish (On un-published nodes)

Using 'page' as an use case example for the above:
Users lacking a 'create page' permission likely wouldn't see any of these buttons for 'page' at all, no matter what content type settings were, since they shouldn't be on a node/add/page anyway... but if they were assigned an edit permission anyway (?), Buttons for Save&Add, or Save&Copy wouldn't appear, regardless of button setting/permission (see below), since they still require a 'create' permission to function.

Similarly, users lacking 'delete page' permission wouldn't see the Delete button, regardless of button setting/permission.

Users lacking an 'edit own page' permission (but having create page) wouldn't see Save & Edit.

Users lacking 'administer nodes' wouldn't see the Publish button, regardless of button setting/permission, since they can't affect the publish default/current state without the admin permission.

Next level (contrib?): if desired, adding a per button (but not per nodetype) permission, this would add only minimal new permissions: one per button, per role. Ok, Editor role can see Save, Preview, Save & Edit, and Publish, but not the others, while a Blogger role can see Save, Delete, Save & Edit, and Save & Add Another, but not the others.

Finally: Contrib could certainly implement a per nodetype, per button, per role, permission option, but I doubt many would need to use that.

webkenny’s picture

I fully support the Save and Edit button. And to jump back a bit, Node Clone is a good module for simple nodes. Although in my experience it has a hard time with CCK Filefields and other more complex CCK types. sethcohn - Good idea about the buttons. I agree 100%.

mattman’s picture

Chiming in with my two cents.

I think this functionality would be a boon to having something like hook_buttons() (hook_page_buttons? hook_alter_buttons?) in core because it certainly does improve on the user experience of drupal. All button options listed above are applicable in many different situations. One of drupal's greatest strengths (if not THE greatest strength) is pure extensibility. (e.g. add more legos to your lego ship if you want to make it cooler :)

Contrib can take care of most anything you can think of. When it comes to core user interaction, buttons which perform actions that are quickly identifiable are beneficial to all. What's the difference between Save, Publish and Release? Semantics? You can always change the text on a button. But, when it comes to functionality, users (and drupal in-turn) benefits from the following.

Apply (Save & Edit) = save 1 click
Publish (Save & Publish) = save 1 click (clicking the publish checkbox)
Duplicate (Save & Clone) = save at least one click (I would think)

Ignoring the button names used (I'm not pushing for certain button names) my point is, any time you realize a savings, and put the user closer to their goal quicker, you tend to win.

I totally think this would be a great feature to have - programmaticly and functionally.

Anonymous’s picture

I'm in favor of the save and edit button being included in D7 core. The other ideas are really good too, but a lot more work. They can be implemented in contrib modules and then refined, and maybe find their way into D8.

Doug Gough
ImageX Media

geoffs52’s picture

Count me in. Great idea.

asha79’s picture

Absolutely essential for productivity, count me in too!

1websitedesigner’s picture

Sounds like a very useful function, add me to the 'core' vote.

One other thing is that a few clients have asked if it's possible to flag a warning when they shut down a window or navigate away from a page their editing. Basically, they've spent 10 minutes writing something, forgot to save it and have shut down firefox or gone to a different page by mistake (e.g. to do some research to add content to the page they're editing) and everything they've entered is suddenly gone.

If an auto-save feature or a reminder to save feature could also be included in core, that would be most handy!

rickvug’s picture

Version: 7.x-dev » 8.x-dev

It is late in the D7 release cycle. Bumping this feature request to D8.

kattekrab’s picture

Issue summary: View changes

Himerus - where did this get to?

Should this be bumped to 8.1 or 9?

badcrocodile’s picture

I'd also like to see this. Quite annoying. Should have an option to save and continue to edit.

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.8.x-dev

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.2.x-dev

Drupal 8 is end-of-life as of November 17, 2021. There will not be further changes made to Drupal 8. Bugfixes are now made to the 9.3.x and higher branches only. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.15 was released on June 1st, 2022 and is the final full bugfix release for the Drupal 9.3.x series. Drupal 9.3.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.4.x-dev branch from now on, and new development or disruptive changes should be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.9 was released on December 7, 2022 and is the final full bugfix release for the Drupal 9.4.x series. Drupal 9.4.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.5.x-dev branch from now on, and new development or disruptive changes should be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

anybody’s picture

Version: 9.5.x-dev » 10.1.x-dev
Assigned: himerus » Unassigned

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

ckrina’s picture

Issue tags: +Usability

From the Save & Edit description:

saves the newest content edits while keeping the user on the node edit page. This feature allows users to manually save drafts as they work on site content without getting distracted by a redirect to the content page.

This should be the default action for the Save button: the user should be able to decide by themselves if they want to see the front-end of the node or to go to the list of content. And the same should happen for Taxonomies and other entities. We should decouple the action for Saving, the action for Publishing and the action for Redirecting. In here, I would focus on decoupling the Save from the redirect itself.

ckrina’s picture

ckrina’s picture

acbramley’s picture

Component: node system » entity system
Status: Active » Postponed (maintainer needs more info)

Moving out of the Node category as this is entity type agnostic functionality.

We have what looks like a well maintained and well used contrib module with this functionality https://www.drupal.org/project/save_edit

Do we need this in core? Given this was originally created in 2009 and there hasn't really been a huge amount of input especially since 2016 I'm not sure it has the backing required given how much it would impact.

catch’s picture

I think #239715: UMN Usability: Where do forms redirect to? is still a problem in that there's no consistency where entity forms redirect to after saving. However if this the agreed solution to that it could use an issue summary update.

smustgrave’s picture

Save and edit has worked fine for me for a few projects. Maybe this should be closed and re-opened if the issue you mentioned @catch ever gets a decision.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.