The Twitter share button added by the socialnetworks preference doesn't take the url of the page you're sharing - it just opens a blank twitter status window.
Created attachment 9624 [details] [review] Bug 7932 - twitter share doesn't work with socialnetworks The only way I can get this to work consistently is to use Twitter's own code as documented here: https://dev.twitter.com/docs/tweet-button This requires that we use the tweet button generated by Twitter rather than the smaller image we were using before. Using the documented options for generating a custom button produced the same inconsistent behavior this patch attempts to fix. Because of the change of appearance I moved the Twitter button to last in line so that similarly-sized buttons were grouped. I also changed the configuration of the Google+ button to exclude the count, saving some horizontal space. This fix will have to be manually merged with the social networks followup for Bug 7500 (image sprites) if and when that patch is approved.
The proposed patch (attachment 8955 [details] [review]) for Bug 7470 does not fix this issue ?
Sorry Jonathan, maybe so. I saw this because it was assigned to me. I didn't realize there was a follow-up to Bug 7470 waiting to be tested. I'll do so now.
Created attachment 9687 [details] [review] Bug 7932 - [SIGNED-OFF] twitter share doesn't work with socialnetworks This patch will be apply AFTER attachment 9680 [details] [review] (from Bug 7500)
Should the status here be set to "signed off", or am I missing something?
Yes Magnus, sorry
QA comment : tiny patch, nothing to notice, passed QA
Yikes, trying to apply the patch after reading/QAing it, I see it does not apply: Bug 7932 - [SIGNED-OFF] twitter share doesn't work with socialnetworks Apply? [yn] y Applying: Bug 7932 - twitter share doesn't work with socialnetworks fatal: sha1 information is lacking or useless (koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt). Repository lacks necessary blobs to fall back on 3-way merge. Cannot fall back to three-way merge. Patch failed at 0001 Bug 7932 - twitter share doesn't work with socialnetworks When you have resolved this problem run "git am --resolved". If you would prefer to skip this patch, instead run "git am --skip". To restore the original branch and stop patching run "git am --abort". Patch left in /tmp/Bug-7932---SIGNED-OFF-twitter-share-doesnt-work-wi-iOQjv8.patch [new/bug_7932 dd8725c] Bug 8095 - Printed lists in the OPAC not easy to read Author: Owen Leonard <oleonard@myacpl.org> 1 file changed, 11 insertions(+), 1 deletion(-)
(In reply to comment #8) > Yikes, trying to apply the patch after reading/QAing it, I see it does not > apply: Yikes again = I missed to see comment 4 = this patch must be applied after 7500 back to signed-off
URL is hardcoded to https://, even if that's not the way the library is currently configured. Also tries to set data-lang = [% en %], which I do not believe is a valid template parameter (and if it is, it needs a different name).
Created attachment 13179 [details] [review] Bug 7932 - twitter share doesn't work with socialnetworks The only way I can get this to work consistently is to use Twitter's own code as documented here: https://dev.twitter.com/docs/tweet-button This requires that we use the tweet button generated by Twitter rather than the smaller image we were using before. Using the documented options for generating a custom button produced the same inconsistent behavior this patch attempts to fix. Because of the change of appearance I moved the Twitter button to last in line so that similarly-sized buttons were grouped. I also changed the configuration of the Google+ button to exclude the count, saving some horizontal space.
String changes. Will hold for post-3.10.0.
Owen, the twitter button works now but doesn't appear to include a link - shouldn't it have a link to the record I'm clicking the button on? Nicole
https://twitter.com/intent/tweet?original_referer=http%3A%2F%2Fkohavm%2Fcgi-bin%2Fkoha%2Fopac-detail.pl%3Fbiblionumber%3D5072%26query_desc%3Dkw%2Cwrdl%3A%2520systems%2520librarian&source=tweetbutton&text=The%20accidental%20systems%20librarian%20%2F&url=kohavm%2Fcgi-bin%2Fkoha%2Fopac-detail.pl%3Fbiblionumber%3D5072 Is it possible that the missing http in this part: url=kohavm%2Fcgi-bin%2Fkoha%2Fopac-detail.pl%3Fbiblionumber%3D5072 is why it's not linking?
Is that cause of this bug: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8952
Nope, it's not that - I tested this url: https://twitter.com/intent/tweet?original_referer=http%3A%2F%2Fkohavm%2Fcgi-bin%2Fkoha%2Fopac-detail.pl%3Fbiblionumber%3D5072%26query_desc%3Dkw%2Cwrdl%3A%2520systems%2520librarian&source=tweetbutton&text=The%20accidental%20systems%20librarian%20%2F&url=http:%2F%2Fkohavm%2Fcgi-bin%2Fkoha%2Fopac-detail.pl%3Fbiblionumber%3D5072 and it still doesn't put the link in the tweet.
Created attachment 13397 [details] [review] Bug 7932 [Revised] Twitter share doesn't work with socialnetworks The only way I can get this to work consistently is to use Twitter's own code as documented here: https://dev.twitter.com/docs/tweet-button This requires that we use the tweet button generated by Twitter rather than the smaller image we were using before. Using the documented options for generating a custom button produced the same inconsistent behavior this patch attempts to fix. Because of the change of appearance I moved the Twitter button to last in line so that similarly-sized buttons were grouped. I also changed the configuration of the Google+ button to exclude the count, saving some horizontal space. Revision removes explicit declaration of share URL. I think when testing this previously I assumed it was required when in fact the share URL wasn't working because it was a localhost address. Localhost addresses are apparently rejected by Twitter. Testers beware.
Created attachment 13400 [details] [review] [SIGNED-OFF] Bug 7932 [Revised] Twitter share doesn't work with socialnetworks The only way I can get this to work consistently is to use Twitter's own code as documented here: https://dev.twitter.com/docs/tweet-button This requires that we use the tweet button generated by Twitter rather than the smaller image we were using before. Using the documented options for generating a custom button produced the same inconsistent behavior this patch attempts to fix. Because of the change of appearance I moved the Twitter button to last in line so that similarly-sized buttons were grouped. I also changed the configuration of the Google+ button to exclude the count, saving some horizontal space. Revision removes explicit declaration of share URL. I think when testing this previously I assumed it was required when in fact the share URL wasn't working because it was a localhost address. Localhost addresses are apparently rejected by Twitter. Testers beware. Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
(In reply to comment #18) > The only way I can get this to work consistently is to use > Twitter's own code as documented here: > > https://dev.twitter.com/docs/tweet-button > > This requires that we use the tweet button generated by Twitter > rather than the smaller image we were using before. Using the > documented options for generating a custom button produced the > same inconsistent behavior this patch attempts to fix. Does it require it (which would suggest a critical permission/licensing problem) or is it just that we can't get it to work with anything else yet?
QA comment: * despite its size, this patch is tiny, the longest part is the documentation ! * no string change, except the "share on twitter" alt removed, not a problem for 3.10.0 passed QA
This patch has been pushed to master.
Patch pushed to branch 3.10.x
Released in 3.10.0