Flattr module 7.x not working at all with my Drupal 7.2 installation.

  • I downloaded and installed the module.
  • I added a "flattr" field to my content type.
  • I opened an existing node where I added the flattr field and this error message showed up:
    Notice: Undefined offset: 0 in flattr_field_formatter_view() (line 179 of /sites/all/modules/flattr/flattr.module).
    Notice: Undefined index: in flattr_field_formatter_view() (line 179 of /sites/all/modules/flattr/flattr.module).
  • I edited the node type and changed flattr category from "text" to "audio".
  • The button showed up but displays: [ERROR] - [ ! ].
  • There is no admin item for this module, I can not configure my flattr settings.

(See #19 and #20 of #1033370: Flattr Drupal 7 Port)

Comments

dawehner’s picture

There is no admin item for this module, I can not configure my flattr settings.

You don't need an seperate configuration because you can use the field settings and the formatter settings.

The bug seems to be valid :)

donSchoe’s picture

Title: No administration item: No configuration possible. » No field configuration possible.

Okay this is confusing. I dont know how the D6-version works, so this module is completly new to me.

Anyways, It tells me

Flattr has no field settings.

and

There is data for this field in the database. The field settings can no longer be changed.

as soon as I try to modify the settings.

In addition, this message shows up:

Inactive fields are not shown unless their providing modules are enabled. The following fields are not enabled: Flattr (field_flattr) field requires the Flattr checkbox widget provided by Flattr module

(But the Flattr module is activated.)

Letharion’s picture

Component: Code » Documentation
Assigned: Unassigned » Letharion
Category: bug » task

About the configuration issue, the docs will need to be updated. There is no "global" admin page as the configuration is done per field, go to /admin/structure/types/manage/[content-type]/display

Perhaps an admin page for all fields could be added in the future, but I don't currently see the use case.

The notice seems to be a completely separate issue regarding the category selection. I can reproduce it and opened this #1190258: Categories don't get properly set.

Letharion’s picture

Title: No field configuration possible. » Field configuration not documented.
Status: Active » Fixed

I have now pushed an updated README.txt file that explains where settings are done.
Please re-open this issue if you find the instructions are incomplete or incorrect.

donSchoe’s picture

Status: Fixed » Needs work

I'm sorry that I have to reopen this but I don't get it. I reviewed the updated README.txt and tried to set up everything correctly. Now this:

Field to use for Flattr username
<NONE>
The field where the users Flattr username can be found. This will be used to set the Flattr buttons owner

How do I define my Flattr username? I tried creating a field, but I can't select anything in this dropdown...

The documentation really needs work :)

Letharion’s picture

Status: Needs work » Fixed

Not at all, I'm glad I'm getting feedback.
I've updated the readme with this

The list of fields for Flattr username is currently restricted to fields on
the user entity, while other fields are restricted to the current entity.
Both of these restrictions are likely to be lifted together with the fix for
the ctools issue under == Known problems ==

I hope that helps.

donSchoe’s picture

Status: Fixed » Needs work

Okay. I added a field to the user entity, called it field_flattr_name and entered my flattr username. Then selected the field as flattr username. But that is not working.

$field_flattr[0]['#markup']

<a href="http://funkfabrik-b.de/node/39" title="LIVE: Funkfabrik B #45 - Wahlprogramm 2011" lang="de_DE" rel="flattr;uid:Funkfabrik B;category:audio;tags:;button:compact" class="FlattrButton"></a>

uid:Funkfabrik B; - that's the name of the user ($user->name), not the flattr username (as defined per field_flattr_name).
tags:; - is not working at all, no tags displayed.

Did I misunderstand the instructions?

Letharion’s picture

Status: Needs work » Fixed

By your description, you've understood exactly what you should do.
Unfortunately I can't reproduce this problem. Are you sure you didn't just forget to save the formatter settings? They need to be both updated, and saved on the settings page, which has bitten myself quite a few times.

Please double check your formatter settings, and when you have set them as you wish, try re-loading the settings page. If they then revert, you haven't actually saved the settings. I know it doesn't entirely make sense, but that's a core issue, and not related to this module. There's a core issue about this here #857312: Add a "changes not applied until saved" warning when changing widget/formatter settings.

Since you obviously understood the instructions however, and I've added the above information to the README, I'm gonna close this issue. The documentation can always be improved, but now seems to explain what needs explaining.

If the problem with selecting the user field persists, please open a separate issue about it.

Letharion’s picture

Sorry, I forgot to mention the tags. In case the formatter settings we're not saved, then that's the cause of the tags problem as well.
I have however just now pushed an update to the tag handling, as there was a bug in there.
The same thing goes for them, if the problem persist, please open a separate issue about that after verifying your formatter settings.

donSchoe’s picture

Thanks, I will have a closer look at the settings again.

Letharion’s picture

Assigned: Letharion » Unassigned

Status: Fixed » Closed (fixed)

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

herzbube’s picture

Issue summary: View changes

Don't forget to update the teaser display settings as well if the Flattr button is visible in the teaser.