Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I installed Tweetbutton and tried to set up the tweet text to be "[node:title] | [site:name]" but now my site is stuck. I can't add any new nodes and can't change my tweetbutton fields. I get an error message: "Tweet text cannot be longer than 32 characters but is currently [x] characters."
Comments
Comment #1
DarrellHQ CreditAttribution: DarrellHQ commentedI see this problem in my site as well. I've been searching for a fix for a few days. Anyone else run into this?
Comment #2
FAAREIA CreditAttribution: FAAREIA commentedchange 32 to 140. it works for me
Comment #3
tokapeb CreditAttribution: tokapeb commentedThe patch, based on Stakcreativa's comment is attached, please review. Cheers!
Comment #4
Charles Gantt CreditAttribution: Charles Gantt commentedI have reviewed the patch and implemented it on 2 sites, which fixed the 32 character max string length. It worked fine on both sites and I have yet to see an issue arise.
Comment #5
mvcthe patch looks fine at first glance but without hook_update_N() the problem will only be fixed for new installations, not for sites already using an older version.
Comment #6
georgemastro CreditAttribution: georgemastro commentedYou can change the values from phpMyAdmin to tables "field_data_field_tweet_basic" and "field_revision_field_tweet_basic" like in the attachment.
Comment #7
wildlife CreditAttribution: wildlife commentedI attempted to change the values in phpMyAdmin from 32 to 140, but that had no impact on getting the original error message.
In addition, I'm finding that this problem is preventing us from editing any existing content on our site. When I try to edit page content on pages with titles that are more than 32 characters, this error prevents the saving of any edits. This is a very critical problem that is forcing me to disable the Tweet Button module until it is resolved.
I wish the Drupal 7 version of this module worked the same way as the Drupal 6 version.
Comment #8
dxx CreditAttribution: dxx commentedFor the current stable version (7.x-2.0-beta1+1-dev), you can simply fix this issue:
Edit tweetbutton.module file at line 114 replace "'#maxlength' => 32," with "'#maxlength' => 128,"
(field_tweet_button_text database field has VARCHAR(128) by default)
Comment #9
deepakrmklm CreditAttribution: deepakrmklm commentedI have changed the maxlength for the form elements to fix this issue.
As install file has been written correctly, no need the patch that file. Update the maxlength for the field 'account' (tweetbutton_field_widget_form) as 32 and 'text' as 128.
This solved my issue.
Comment #10
deepakrmklm CreditAttribution: deepakrmklm commentedI am updating with a minimized patch file.
Comment #11
deepakrmklm CreditAttribution: deepakrmklm at Zyxware Technologies commentedUpdating again by keeping only relevant patch for this issue.
Comment #12
berenddeboer CreditAttribution: berenddeboer commentedWorks for me.
Comment #13
deepakrmklm CreditAttribution: deepakrmklm at Zyxware Technologies commentedUpdating with a patch which path changed.
Comment #14
deepakrmklm CreditAttribution: deepakrmklm at Zyxware Technologies commentedComment #15
deepakrmklm CreditAttribution: deepakrmklm at Zyxware Technologies commentedComment #16
deepakrmklm CreditAttribution: deepakrmklm at Zyxware Technologies commentedComment #18
timmillwoodComment #19
timmillwoodtest please ignore