Posted by winston on July 19, 2009 at 5:32pm
| Project: | |
| Version: | 6.x-2.6 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (duplicate) |
Issue Summary
Apologies that I don't have time to dig into the code at the moment.
Steps to repeat problem:
1. On a blog post, turn off the "announce this post on twitter" check box
2. Click preview
3. On the preview page "announce this post on twitter" is now back on.
If the user doesn't notice that this got turned on again they could easily end up having their post announced via twitter when that was clearly not their intention.
Comments
#1
Verified in 2.6.
#2
Another issue for Preview: #633450: Status reset at node preview. Checkbox is not fixed though.
#3
I fixed 'twitter post' checkbox to save its state through node previews. The patch is attached.
#4
The patch does fix the problem on my system
#5
Probably fixes the issue, but I've never seen values in forms handled like that for preview (though it is 3:32 AM so my memory isn't as chirpy as that annoying bird outside is), so I suspect something else is at fault, perhaps the javascript?
Also, if the 3.x branch has this also, the code in question has been moved into a separate module (twitter_post)
#6
Hmm. Maybe I didn't understand you right, but actually it is a common way to handle #default_value in forms.
#7
Aah... Looked around trying to find examples of that, but found this a pathauto one instead, http://drupal.org/files/issues/262464_pathauto_node_preview_11.patch . Instead of using form_values, they use that one in $node, so with that in mind re-patched. Same effect, but looking in $node seems more common.
#8
oops copy and paste.
#9
Yeah, it's nearly the same thing. I just more used to use $form_state since this way I can handle default values for all forms, not only node edit ones.
#10
Not sure why, but when I made the changes in #8, I started getting the message "Successfully posted to Twitter" when new accounts were created. I instead used the patch in #3, and it seems to be working fine
#11
guessing ya using content_profile phreestili?
Ignore my patch in #8, shouldn't be done in prepare I realized soon after, should be done in form_alter; I think it'd be best to use a combination of a patch, where it checks if isset $node->twitter in the form_alter, as it's shorter, but shrug.
#12
Yep, I am using content profile
#13
neither patch #3 nor #8 do apply cleanly to 6.x-3.0-beta3
#14
Duplicate of #633450: Status reset at node preview