We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

New EE2 extension: QuickSave

Development and Programming

Dom Stubbs's avatar
Dom Stubbs
156 posts
15 years ago
Dom Stubbs's avatar Dom Stubbs

QuickSave is a fairly basic extension which makes a couple of changes to the standard EE2 publishing behaviour. Once enabled, when you save an entry you will be returned to the entry’s edit page, where you were previously, and a notification will be added at the top of the page saying that your update has been successful.

The second feature enables you to add two new buttons (either or both) to the Publish page: Save and Close, which redirects you to the main Edit page, and Save and Preview, which redirects you to the standard entry preview page (the one that is normally shown when entries are saved).

In order to make the second feature work I had to think outside the box a little, as EE2 is currently lacking many of the EE1.6 control panel hooks. Fortunately CodeIgniter has some very useful hooks of its own, so I’ve taken advantage of one of those and done my best to integrate it with all of the standard EE extension settings. As CodeIgniter hooks are setup within a file, and not the database, you need to edit/replace that file manually in order to gain access to the extra buttons.

Funnily enough I always opted for just one Save button in EE 1.6, but I’ve found that the ‘ExpressionEngine has saved data from this entry before it was last saved’ notice ends up being triggered all the time if you use QuickSave and fail to move to another page fairly quickly, so the ‘Save and Close’ button is quite a handy way of avoiding that once you have finished working with an entry. Yes I could disable autosaving, but when you are in the middle of working on entry it’s actually very handy.

Full info and download @ VayaCode

       
russlipton's avatar
russlipton
305 posts
15 years ago
russlipton's avatar russlipton

Simple. Basic. Essential. Works. Should be a core feature. Thanks.

       
Dom Stubbs's avatar
Dom Stubbs
156 posts
15 years ago
Dom Stubbs's avatar Dom Stubbs

Thanks for the feedback. 😊

       
Sjoerd's avatar
Sjoerd
233 posts
15 years ago
Sjoerd's avatar Sjoerd

Is it compatible with 2.0.2? I dont’ see the extra buttons, just the standard ‘submit’ button. I replaced hooks and checked the options in the extension manager.

       
Dom Stubbs's avatar
Dom Stubbs
156 posts
15 years ago
Dom Stubbs's avatar Dom Stubbs

It’s working fine on my 20100415 build, but I’ve yet to update to the build released on Friday so cannot confirm there. If you’ve definitely got the buttons enabled via the extension settings and you have the CI hook setup correctly then I’m not sure what to suggest. I’ll be releasing an update shortly for SAEF support (the EE hook was recently updated to enable this) and I’ll install the latest build at the same time to confirm compatibility.

Is the basic QuickSave functionality working when you submit an entry?

       
Sjoerd's avatar
Sjoerd
233 posts
15 years ago
Sjoerd's avatar Sjoerd

My build is: v2.0.2 Build 20100430

After saving an entry, the edit form stays open (no live look or edit links afterwards): I suppose this is the basic functionality? But no extra buttons.

       
Dom Stubbs's avatar
Dom Stubbs
156 posts
15 years ago
Dom Stubbs's avatar Dom Stubbs

Yep it is. It sounds like the CI hook isn’t being triggered then. If you’ve got the copy of hooks.php from the QuickSave archive and placed it into system/expressionengine/config/ then I’m not sure what the issue could be. I’ll add some logging to the next release to make debugging easier.

       
Sjoerd's avatar
Sjoerd
233 posts
15 years ago
Sjoerd's avatar Sjoerd

Yes I did, hooks is in the right place.

       
Dom Stubbs's avatar
Dom Stubbs
156 posts
15 years ago
Dom Stubbs's avatar Dom Stubbs

I’ve just updated to Friday’s build and everything’s still working correctly. On the publish page, if you view the source and search for ‘quicksave’ are any results found?

You should see something like this:

[script type="text/javascript" charset="utf-8" src="index.php?S=0&D=cp&C=javascript&M=load&package=quicksave&file=quicksave"][/script]

(Brackets altered to stop EE from removing the code extract altogether)

Edit: I’m afraid debugging logs probably aren’t an option after all. I was thinking of using the EE logging system but of course that’s only available in the form of template debugging, which is restricted to the frontend.

       
Sjoerd's avatar
Sjoerd
233 posts
15 years ago
Sjoerd's avatar Sjoerd

No results.

       
Dom Stubbs's avatar
Dom Stubbs
156 posts
15 years ago
Dom Stubbs's avatar Dom Stubbs

PM me access to your server and I’ll have a quick look.

       
Sjoerd's avatar
Sjoerd
233 posts
15 years ago
Sjoerd's avatar Sjoerd

I’ve sent you a private message.

       
Dom Stubbs's avatar
Dom Stubbs
156 posts
15 years ago
Dom Stubbs's avatar Dom Stubbs

If anyone else is having similar problems, check the following line in your EE config.php file:

$config['enable_hooks'] = FALSE;

That needs to be set to TRUE. The earlier versions of EE2 had it enabled by default, whereas more recent versions do not.

Edit: I didn’t realise asking for login info was banned. I can understand the reasoning behind that, but without access to the server it would have been far, far harder to find the cause of the problem.

       
Sjoerd's avatar
Sjoerd
233 posts
15 years ago
Sjoerd's avatar Sjoerd

Thanks for the help, solved!

       
Lisa Wess's avatar
Lisa Wess
20,502 posts
15 years ago
Lisa Wess's avatar Lisa Wess
Edit: I didn’t realise asking for login info was banned. I can understand the reasoning behind that, but without access to the server it would have been far, far harder to find the cause of the problem.

You mentioned this in your email to me but just in case others come across it, you simply can’t request access publicly. See third party support on the forum.

Thanks!

       
1 2

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.