Closed (fixed)
Project:
AddToAny Share Buttons
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 Mar 2011 at 09:02 UTC
Updated:
28 Mar 2012 at 02:10 UTC
Jump to comment: Most recent file
Comments
Comment #1
floleft commentedThis is still occurring with the latest dev (2011-Mar-07).
Comment #2
Jerome F commentedHi, I used the Node: AddToAny link in a view using fields and I receive the same error
Notice: Undefined variable: teaser in addtoany_handler_field_addtoany_link->render() (line 22 of (...)/sites/all/modules/addtoany/views/addtoany_handler_field_addtoany_link.inc).here's the line:
How should that be changed?
Comment #3
gmush commentedTemporary you may insert:
Comment #4
Jerome F commentedit works, tested with facebook and twitter in my views, modification in attached patch
Comment #5
mstrelan commentedThere is no need for
_addtoany_create_button()to even have the $teaser parameter since it is not used, so therefore there is no need to pass it fromaddtoany_handler_field_addtoany_link::render(). I'll leave the $teaser parameter existing because it seems to have some relevance, but here is a patch that allows the views integration to just fall back to the default, which is FALSE rather than an empty string.Comment #6
jmaties commentedHere is our patch works ;)
Comment #7
Jerome F commentedWith After applying last patch in #6 and the patch in http://drupal.org/node/1316274#comment-5142072, which removes the "teaser" notices, I still get some notices about the node title variable :
Notice: Undefined property: stdClass::$node_title in addtoany_handler_field_addtoany_link->render() (line 20 of (...)/sites/all/modules/addtoany/views/addtoany_handler_field_addtoany_link.inc).Comment #8
Jerome F commentedWhen the view doesn't use the title field, the notice mentionned earlier appears. When the content title field is used I get a fatal error. So temporarilly, waiting for a correct patch by someone who knows php, I used this code, which removes the notice, but doesn't allow addtoany to display the node title :
Comment #9
micropat commentedComment #10
micropat commentedFixed in dev.