Closed (fixed)
Project:
Save Form State
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
31 May 2013 at 11:40 UTC
Updated:
29 Aug 2013 at 20:21 UTC
Jump to comment: Most recent file
Comments
Comment #1
henk commentedsomething like this
Comment #2
BrockBoland commentedPatch is a start but the module needs to call drupal_add_library().
Comment #3
BrockBoland commentedActually, this will need the Libraries module. I'm reading up on the API now. I'll post it here as a patch for review before committing, since that will be a pretty important change for existing sites using the module.
Comment #4
BrockBoland commentedI'd love to get another set of eyes on this patch before I commit it, mostly because it adds a new dependency so existing sites will need to be careful about updating the module.
This patch adds dependence on the Libraries module, so that sisyphus and jStorage must be downloaded to sites/all/libraries instead of going into the module directory, which means site admins no longer need to re-download or shuffle around those JS files when updating the module. It also (hopefully) makes it a bit easier to instruct site admins on using the Sisyphus fork that supports CKEditor, as described in #1597716-3: Compatibility with CKEditor.
While I was in there, I improved performance a bit. The sisyphus, jStorage, and jnotify javascript files are no longer added to every page in
hook_init(): they are only added to the page on forms that are configured to use storage. Similarly, the jnotify JS and CSS are only added if the user notifications have been enabled.Finally, I added a README file with updated installation instructions.
Comment #5
BrockBoland commentedChecked with compujohnny and got his blessing on this, so it has been added to 7.x-1.x:
http://drupalcode.org/project/form_save_state.git/commit/588d107
http://drupalcode.org/project/form_save_state.git/commit/fea2a0d
Comment #6
mariacha1 commentedSo sorry to open this up again, but there was one little bug I found just a bit too late.
The function "libraries_load" is introduced in Libraries version 7.2. If you happen to still have 7.1 installed, the patch as it stands will give a fatal error.
I'm attaching a patch to apply to the latest dev checkin at hash 754de6b01c5aeb0f4d5cfee237888f6351e49ba7
Comment #7
BrockBoland commentedWhoops, thanks for catching that! I had to change it to 2.x: if using something like "7.x" for the version, you need to include the whole version, like "7.x-1.5." Since it just needs to be the 2.x branch, I just used that: 2.x. More here: https://drupal.org/node/542202
Corrected in http://drupalcode.org/project/form_save_state.git/commit/d21015d
Comment #8.0
(not verified) commentedhello