If you give "create content" access for a certain content-type to Anonymous users they get to see the complete form but when you submit it only the title/body is saved. The content in the cck fields doesn't get saved.
If, after the submit, you check the content_type_content-type table a row wasn't even inserted.
| Comment | File | Size | Author |
|---|---|---|---|
| #22 | 403446-trigger-weight-d7.patch | 2.33 KB | andypost |
| #17 | 403446-trigger-weight-d7.patch | 1.1 KB | andypost |
Comments
Comment #1
jax commentedThe reason content didn't get saved was because I had a trigger that redirected to a URL when new content was submitted. Trigger module does the redirect on hook_nodeapi('insert') which means that other modules cannot save their content if the hook in trigger module is called before them. I think that because of the behaviour of Trigger it should have a default weight other than 0 since it is better to call this module's hooks last.
Comment #2
andypostShould be fixed in D7 first
Comment #3
andypostmarked as duplicate #490284: Trigger using redirect for "After a user's profile has been updated" will not work for user updates.
Comment #4
andypostmarked as duplicate #560150: Trigger for redirect to url action causes email to not be sent after users register
Contains detailed steps to reproduce
Comment #5
neochief commentedGotcha! I'm experiencing it too.
Comment #6
andypostStill no patches :(
duplicates #321986: Registration Email - When, What, Why, Which? - The Dev Side #358406: Email not sent through action
Comment #7
callison commentedI manually updated the weight of the module in my database and could not get this working with any weight. So, I'm wondering if this is not the real issue here. I tested this using the instructions at #560150: Trigger for redirect to url action causes email to not be sent after users register.
Comment #8
neochief commentedI have same issue as callinson. I've tried to change weights, but no luck. It seems that it's different issue.
Comment #9
andypostThere's a 2 troubles with triggers:
1) weight of the module
2) user_save which should not be used for assigning redirect triggers because mostly called within some workflow
First we should fix #601398: Simpletest does not allow assigning actions to triggers which is blocker of all trigger's tests
Next #286668: Trigger "User logging in" doesn't work with Action "Forward to URL" should fix redirect behavior for "url-destination"
And finally re-invent a redirect action to work after form submit and user_save
Comment #10
vitis commentedsub
Comment #11
francewhoaConfirming that this issue is present in Drupal 5, 6 and 7.x dev.
Maybe when fixed with Drupal 7 it could be back port to Drupal 5 & 6?
Any volunteer for a patch? I'm not a coder but I would be happy to contribute testing.
Detailed steps to reproduce issue in Drupal 7.x dev http://drupal.org/node/560150
Thanks andypost for following up on this issue :)
Comment #12
andypostThis could not be fixed til #601398: Simpletest does not allow assigning actions to triggers
We need working tests to continue work on triggers
Comment #13
andypostuser_save() already fixed. So is this still an issue?
Comment #14
francewhoaConfirming that this is still an issue with Drupal 7 alpha 3. The issue is that Action/Trigger for redirect to url action causes email to not be sent after users register. In other words after user clicks the CREATE NEW ACCOUNT button a registration email should be send to the user's email address. But the email is never send. So user can't log-in to access the Drupal site.
Tested following steps at http://drupal.org/node/560150 On a fresh D7 alpha setup.
Expected result is that after user clicks the CREATE NEW ACCOUNT button a registration email should be send to the email address he provided.
Setting the issue status to 'critical' because the feature isn't working and new users can't registers and access the site.
Comment #15
andypostblock.module already has weigth -5
so trigger.module should have maximum weight from all core modules
EDIT also possible to use http://api.drupal.org/api/function/hook_system_info_alter/7 to change weight in runtime
Comment #16
andypostPatch to change weight, also this could correlate with #420124: DX: Remove module actions on uninstall
Comment #17
andypostPatch
Comment #19
andypostI reopen #601398: Simpletest does not allow assigning actions to triggers to fix bug with using drupal_html_id() in simpletest, after it's fixed this patch should work
Comment #20
andypost#17: 403446-trigger-weight-d7.patch queued for re-testing.
Comment #22
andypostOne test was not fixed in #601398: Simpletest does not allow assigning actions to triggers
So here re-roll
EDIT: patch to fix test are also posted as follow up #241013: Actions only trigger one action per node page load
Comment #23
agentrickardSetting the weight is not the proper response to this problem. Removing drupal_goto() from the system_goto_action() is.
I am very tempted to mark this as a duplicate of #732542: system_goto_action breaks core APIs, which fixes this issue by replacing the drupal_goto().
As it is, I will mark 'needs work', as this patch does not remove the potential problem. Using drupal_goto() in this manner is dangerous, and setting module weight is a brittle fix.
I think if the other patch lands, this should solve itself.
Comment #24
andypostThis issue solved in #732542: system_goto_action breaks core APIs
Comment #25
keinstein commentedThe suggested value 5 in the patch doesn't leave very much room for other modules to act after default weight modules and before trigger. Rules uses 20. I'd expect both modules to be have the same weight. It must be heigher than e.g. the xmlsitemap weights.
This issue leads to many duplicate key errors in combination with xmlsitemap_node, cck and other modules that have weight 0 (race condition) or higher values.
Vote for backport to D6.
Comment #26
keinstein commentedreopening as there are many issues with the weight of the trigger module around see (e.g. #757348).
Comment #27
andypost@keinstein dont change status, this issue caused by wrong workflow not the weigth of the module. Take care to look at #732542: system_goto_action breaks core APIs
Primary we should fix D7 and only then backport to D6 if it possible
PS #757348: Warning appears on site after enabling taxonomy_term view could be related but all discussion goes in #732542: system_goto_action breaks core APIs
Comment #28
keinstein commentedOK. I will file a new one.
#757348 is not related.
#732542 might be related, but seems not to be my issue. My issue is related due to updating a node before all parts are saved well. It has nothing to do with redirects.