Closed (works as designed)
Project:
Share
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 May 2009 at 20:06 UTC
Updated:
19 May 2009 at 20:08 UTC
I was getting a Javascript error in share_widget_link.js because the jQuery selector $("li.share_" + share.shareID + "_" + share.nid) does not return any results. So the attached patch not only prevents the error, but it corrects the selector so that results are returned.
| Comment | File | Size | Author |
|---|---|---|---|
| share_widget_link.patch | 662 bytes | gribnif |
Comments
Comment #1
greenskin commentedthe 'li' is needed to differentiate link share widgets from node and block share widgets. Though I do like the use of the continue, I'll implement that.
Comment #2
gribnif commentedI think that may be part of the reason why the original code did not work for me. In my links, I don't have any "li" tags, just "a". There is an outer
<div class="links">, so perhaps you could change the selector to$(".links>a.link-share_" + share.shareID + "_" + share.nid)and have it work in all cases.Comment #3
gribnif commentedI take back what I said. I now see how default themes like Garland are different from mine. This version seems to work for both:
$(".links a#share-" + share.shareID + "-" + share.nid)Comment #4
gribnif commentedI updated my custom theme_links function to more closely match the one in Drupal 6, and now this change isn't needed. I had been using one that was based on Drupal 5's code, which did not use UL and LI tags.