It's hard to say whether this really is a service links bug because the actual bug I'm dealing with is in Share This module. Here's how to reproduce the problem:

  • Enable Service Links and Share This modules on a fresh D6 install
  • Configure Service Links as follows:
    • Enable at least one content type to have service links
    • Service links in links: Teaser & Full page view
    • Service links in nodes: Teaser & Full page view
    • Leave everything else set to their default settings
    • On the services tab, check Share This
  • Create a node of the content type that has service links enabled
  • Go to edit that node
  • You'll get a js error in your console - the error is "c is null"
  • All js stuff on the page is broken, most notably the collapsed fieldsets

The problem undoubtedly arises from a bug in the external sharethis js code but it's very difficult to debug. And anyway it seems wrong for this external js code to be getting loaded when the node is being edited. But service_links_render(), which calls the share this callback, which adds this js, is being called on node_load.

I attach a patch that checks for arg(2) == 'edit' before rendering the service links. It solves the problem for me but maybe it's not the best solution. Thoughts?

CommentFileSizeAuthor
service_links_node_edit.patch1.18 KBkatbailey

Comments

robloach’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.