Closed (fixed)
Project:
Submit Again
Version:
6.x-1.1
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Anonymous (not verified)
Created:
19 Feb 2008 at 12:20 UTC
Updated:
24 May 2015 at 20:19 UTC
Jump to comment: Most recent file
Comments
Comment #1
niklp commentedsubscribe
Comment #2
lomz commentedSubscribing.
But could this be fixed by set the module weight of submitagain to be heavier than pathauto?
Comment #3
freeman-1 commentedI'm seeing the same problem with Type_Local_NIDs module (with pathauto). I agree with lomz - after I manually set the database {system} table's Weight field for submitagain module to 99 (others typically default to 0, although Pathauto is set to 1), the problem was resolved.
The documentation is found at http://drupal.org/node/110238, which recommends to add an _install function in .install file to set this weight during installation.
Could this added in ?
Perhaps a very large number (9999?) should be used because Submitagain ultimately does the drupal_goto reload - which we should want to be the last thing to be done at nodeapi insert.
Comment #4
keesee commentedI recently ecountered this with Domain Access as the form submits access settings via a hidden form.
The work around for autopath is actually pretty simple. go to the autopath configuration page -> check generate aliases at the bottom of the node config collapsible. - hit save
This will generate aliases for nodes that you just entered using this module. As far a manually making the change in the DB, I suggest submitting a patch or you risk reverting or creating errors if upgrading later.
--
J.
Comment #5
keesee commentedI just tested the 9999 suggestion with Domain Access to no avail. I ensured that weigh on this Mod was higher than all others. AutoPath issue was solved, however I still isn't submitting the hidden form elements for Domain access.
Comment #6
agentrickardThe problem is line 51 of submitagain.module. Running a drupal_goto() here stops the rest of hook_nodeapi() from firing.
The proper solution is to set a redirect on the form instead. Otherwise, all manner of errors occur, including failure to save records to the {node_access} table.
Comment #7
agentrickardThe patch above is not quite right, as it will issue a redirect for any of the form buttons. You probably need to add a secondary submit handler in order to set the redirect. Another option is to set a session variable and use hook_boot() to issue the redirect based on the session var.
Comment #8
chrisfromredfinThis is a patch using agentrickard's SESSION variable approach. It didn't want to work with hook_boot for some reason, but since this page shouldn't be cached we could use hook_init (and anecdotally it's working on my site).
Patch is against 6.x-1.1 of submitagain.
Comment #9
sjf commented#8 works for me. Thanks.
Comment #10
moshe weitzman commentedYou should set a submit handler on the new button, not on the whole form. That submit handler sets the redirect property of the form. no need to mess with session vars.
Comment #11
moshe weitzman commentedJust committed a different fix. Actually, it was a fumigation. Module is small and clean now. Release coming in a few mins.