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?

CommentFileSizeAuthor
#4 nullfield.patch1.08 KBmatglas86

Comments

EndEd’s picture

subscribe

shyam541’s picture

Check the Text Format for the content. It should set to Full HTml. I made the same mistake.

matglas86’s picture

@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.

matglas86’s picture

Title: Documentation for 7x-4x? nothing appears » Nothing appears on existing content
Component: Documentation » Code
Assigned: Unassigned » matglas86
Category: feature » bug
StatusFileSize
new1.08 KB

I 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

  1. Create a content type.
  2. Create a some content.
  3. Download the AddThis module (7.x-4.x-dev).
  4. Add a AddThis field to the content type you created.
  5. Set the Display type of your AddThis Field on the Manage Display page on the default display mode of the content type you create in step 1. Choose something different that disabled.
  6. View your content in a full node view.
  7. No display will show up.

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.

matglas86’s picture

Status: Active » Closed (fixed)

The patch is applied and available in the dev version.

knalstaaf’s picture

Having 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 103

knalstaaf’s picture

Status: Closed (fixed) » Needs review

I'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?

matglas86’s picture

Please enable AddThis Displays and try again.

knalstaaf’s picture

Status: Needs review » Closed (fixed)

Ok, that works! I didn't notice the submodule (maybe this should go in the readme.txt).

Thanks!