Closed (fixed)
Project:
AddThis
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Anonymous (not verified)
Created:
23 Jun 2008 at 17:06 UTC
Updated:
23 Mar 2022 at 15:58 UTC
Jump to comment: Most recent file
Comments
Comment #1
Richard Blackborder commentedI'm using the 6.x version myself, but I notice that border="0" for that version comes from the "Button image HTML attributes" option in the administer settings. If that's the case in 5.x, you could try changing it to a style="border:none;" section or whatever validates.
Comment #2
mlondon77 commentedIt's a great module, but I'm having the same problem. The error message I get is:
==================
Column 134: document type does not allow element "div" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag .
…lass="addthis" style="display:inline">
addthis_ The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element. One possible cause for this message is that you have attempted to put a block-level element (such as "" or "
Comment #3
vesapalmu commentedI just commited a new version to CVS that changes default HTML attributes to alt="". New version has also slightly different implementation of hook_link so that it does not generate extra href=#" link any more. These changes fix problems with border and missing alt attribute.
In order to fix the problem with div tag a span tag should be removed around AddThis div. This could be done by creating a custom theming function for links or by modifying function theme_links directly in theme.inc. Personally I would like to see theme.inc modified a bit, since now it adds a span just for adding extra HTML attributes even when there are none.
If you want to make a quick and dirty fix to solve the issue you can patch Drupal core (6.3) with attached patch. I'll try to get this patch included to core.
Comment #4
vesapalmu commentedThis will not be fixed in core. To fix this issue in the future addthis button will be moved from links to node content.
Comment #5
mgiffordWell, yeah, but why worry about taking out the span in core when you can remove the div in the module?
Seems to work fine here without it - http://openconcept.ca/blog/mgifford/quick_accessibility_patch_accepted_i...
It's just got to output this instead:
Unless the div is needed for some strange Safari hack or something like that, why is it there? Works fine in firefox & opera on the mac.
I've provided a small patch to remove the div tags that are inserted by this module. With this patch it validates because you're not mix/matching spans & divs.
Comment #6
vesapalmu commentedThank you for the patch! I am positive that this will make it's way to the module soon.
Comment #7
mgiffordGood to hear. It's a useful module. Much easier to find screen real estate for this icon rather than a row of other buttons.
Comment #8
vesapalmu commentedThis has now been committed to CVS.