Currently if the node is saved with the "Post to Twitter" checked, a drupal message is displayed: "Successfully posted to Twitter".
The problem is if the same node is saved again with the same "Post to Twitter" settings. The duplicate tweet will not work, but the success message will still display. And there is an error in the log: exception 'TwitterException' with message 'Forbidden' in
Desired solution: The drupal message should better indicate that a duplicate tweet could not be posted.
This was first posted to #1343782: Can you tweet a node multiple times, but I was told to open a new ticket if it is a problem on 7.x-5.x.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | twitter-duplicate_tweets-1996532-5.patch | 3.46 KB | pookmish |
| #3 | twitter-duplicate_tweets-1996532.patch | 2.99 KB | pookmish |
Comments
Comment #1
damienmckennaPlease test the latest -dev release and let me know if the problem persists.
Comment #2
pookmish commentedIssue still occurs for me with dev version downloaded today. message in dblog is as follow:
exception 'TwitterException' with message 'Forbidden' in /path/to/module/witter/twitter.lib.php:159 Stack trace: #0 /path/to/module/witter/twitter.lib.php(119): Twitter->request('https://api.twi...', Array, 'POST') #1 /path/to/module/witter/twitter.lib.php(1273): Twitter->auth_request('https://api.twi...', Array, 'POST') #2 /path/to/module/witter/twitter.lib.php(407): Twitter->call('statuses/update', Array, 'POST') #3 /path/to/module/witter/twitter.inc(198): Twitter->statuses_update('New post: Test ...') #4 /path/to/module/witter/twitter_post/twitter_post.module(64): twitter_set_status(Object(TwitterAccount), 'New post: Test ...') #5 /path/to/module/witter/twitter_post/twitter_post.module(82): twitter_post_entity_insert(Object(stdClass), 'node') #6 [internal function]: twitter_post_entity_update(Object(stdClass), 'node') #7 /path/to/root/includes/module.inc(934): call_user_func_array('twitter_post_en...', Array) #8 /path/to/root/modules/node/node.module(1181): module_invoke_all('entity_update', Object(stdClass), 'node') #9 /path/to/root/modules/node/node.pages.inc(460): node_save(Object(stdClass)) #10 /path/to/root/includes/form.inc(1519): node_form_submit(Array, Array) #11 /path/to/root/includes/form.inc(903): form_execute_handlers('submit', Array, Array) #12 /path/to/root/includes/form.inc(385): drupal_process_form('content_page_no...', Array, Array) #13 /path/to/root/includes/form.inc(130): drupal_build_form('content_page_no...', Array) #14 /path/to/root/modules/node/node.pages.inc(14): drupal_get_form('content_page_no...', Object(stdClass)) #15 [internal function]: node_page_edit(Object(stdClass)) #16 /path/to/root/includes/menu.inc(527): call_user_func_array('node_page_edit', Array) #17 /path/to/root/index.php(21): menu_execute_active_handler() #18 {main}Comment #3
pookmish commentedPossible fix?
Comment #4
damienmckenna@pookmish: Nice work! I would suggest, however, creating a constant to handle the status ID.
Comment #5
pookmish commented@DamienMcKenna Good idea. I should've thought of that too.
Comment #6
damienmckenna