Closed (fixed)
Project:
AddThis
Version:
7.x-4.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
17 Sep 2011 at 01:26 UTC
Updated:
7 Mar 2013 at 20:14 UTC
Jump to comment: Most recent file
There is no documentation for 7.x-4.x-dev version.
I didnt get how to make it work or there is a bug.
I mage the settings at configuration, I then added an add this field at content type and enable it's display and made field/widget settings.
Result nothing appears.
Do i forget something or there is a bug?
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | nullfield.patch | 1.08 KB | matglas86 |
Comments
Comment #1
EndEd commentedsubscribe
Comment #2
shyam541 commentedCheck the Text Format for the content. It should set to Full HTml. I made the same mistake.
Comment #3
matglas86 commented@dropbydrop try to save your node again. At this moment there is no fallback value to add a formatted display to. If you still have the same problem let me know.
Comment #4
matglas86 commentedI believe that what is asked is a bug fix. Atleast it looks like something I know of that is a problem right now with the current implementation.
Problem
When you have existing content and add the AddThis field to it nothing will show up.
Reproduce the problem
Cause of the problem
The AddThis module uses the formatter to create a display. This display is create on the value of a field. In this case the AddThis field. (See: addthis_field_formatter_view)
If a field is new on a content type no value is added to is for our field.
Fixing the problem
We can use hook_field_prepare_view to make sure that the field has a value where we can render a Display on.
The only downside with this is that we are checking it on every request. But I do think that the amount of times this is requested is limited and therefore not really a problem.
In the patch you see the fix for this with the hook implemented.
Comment #5
matglas86 commentedThe patch is applied and available in the dev version.
Comment #6
knalstaaf commentedHaving the same issue, applied the patch on 7.x-4.x-dev with this result:
Parse error: syntax error, unexpected '*' in /data/sites/web/domaincom/www/sites/all/modules/addthis/includes/addthis.field.inc on line 103Comment #7
knalstaaf commentedI'm having this issue on the block display of AddThis. Tested it with a content type as well - same result.
In the setting "AddThis display type" of the block it says "Disabled" (no other options available).
Is that normal?
Comment #8
matglas86 commentedPlease enable AddThis Displays and try again.
Comment #9
knalstaaf commentedOk, that works! I didn't notice the submodule (maybe this should go in the readme.txt).
Thanks!