Page 1 of 2

Weird problem with Flattr-plugin

Posted: Mon Jan 10, 2011 7:44 am
by Lux
Hi,

a reader of my blog sent this video to illustrate an error with the Flattr-Plugin.

http://dl.dropbox.com/u/1486929/deimeke ... 09_001.mov

Any ideas?

Thanks

Dirk

Re: Weird problem with Flattr-plugin

Posted: Mon Jan 10, 2011 9:28 am
by garvinhicking
Hi!

I've seen this recently also on the blog of stm9x9; but don't see it on serotonic.de or koehntopp.de. In either way, the flattr JS (from flattr itself) seems to be producing this with some of its action...

Also, this code here:

Code: Select all

<script type="text/javascript">
/<strong> <![CDATA[ </strong>/
    (function() {
        var s = document.createElement('script'), t = document.getElementsByTagName('script')[0];
        
        s.type = 'text/javascript';
        s.async = true;
        s.src = 'http://api.flattr.com/js/0.6/load.js?mode=auto';
        
        t.parentNode.insertBefore(s, t);
    })();
/<strong> ]]> </strong>/
occurs multiple times on your blog, even with the invalid markup - did you insert that manually? Remember to always paste code WITHOUT applying s9y markup plugins in HTML nuggets.

Maybe because you have that code AND the flattr buttons on the plugin, the flattr JS code is misbehaving due to multiple code overwrites.

Maybe you can also ask the flattr support, because I actually think the return text comes from their JS/iframe...

Regards,
Garvin

Re: Weird problem with Flattr-plugin

Posted: Mon Jan 10, 2011 9:52 am
by Lux
garvinhicking wrote:occurs multiple times on your blog, even with the invalid markup - did you insert that manually? Remember to always paste code WITHOUT applying s9y markup plugins in HTML nuggets.
I only inserted the button on the right hand side (HTML-Nugget) manually. The rest is done via Plugin.
garvinhicking wrote:Maybe because you have that code AND the flattr buttons on the plugin, the flattr JS code is misbehaving due to multiple code overwrites.
Ok, that means, that removing the button from the nugget could solve the issue?
garvinhicking wrote:Maybe you can also ask the flattr support, because I actually think the return text comes from their JS/iframe...
I keep that in mind.

Thanks Garvin

Dirk

Re: Weird problem with Flattr-plugin

Posted: Mon Jan 10, 2011 11:49 am
by garvinhicking
Hi!

But have a look at your HTML source; the code shows up twice on different places.

HTH,
Garvin

Re: Weird problem with Flattr-plugin

Posted: Mon Jan 10, 2011 12:06 pm
by Lux
garvinhicking wrote:But have a look at your HTML source; the code shows up twice on different places.
Hmm, I took a single article and find the following two occurences:

Code: Select all

<script type="text/javascript">
/* <![CDATA[ */
    (function() {
        var s = document.createElement('script'), t = document.getElementsByTagName('script')[0];
        
        s.type = 'text/javascript';
        s.async = true;
        s.src = 'http://api.flattr.com/js/0.6/load.js?mode=auto';
        
        t.parentNode.insertBefore(s, t);
    })();
/* ]]> */

</script>
and

Code: Select all

<script type="text/javascript">
var flattr_uid = '11670';
var flattr_tle = 'NoSQL ...';
var flattr_dsc = 'Am vergangenen Samstag haben Ingo, Marc, Sven und ich die erste Folge Binärgewitter zum Thema NoSQL, das neue Sendeformat von RadioTux, aufgenommen. Herausgekommen sind zwei Stunden und fünfundvierzig Minuten über Datenbanken im Allgemeinen und natürlich ganz besonders über Not-only-SQL (NoSQL) Datenbanken.    Ich glaube, das ist gut geworden. Achtung, das ist nicht so leicht verdauliche Kost, da es zwischenzeitlich sehr ins Detail geht (das ist auch gewollt).    Viel Spass!';
var flattr_cat = 'text';
var flattr_lng = 'de_DE';
var flattr_tag = 'nosql,planet-community,podcast,radiotux';
var flattr_url = 'http://www.deimeke.net/dirk/blog/index.php?/archives/2479-NoSQL-....html';
var flattr_btn = 'compact';
</script>
<script src="http://api.flattr.com/button/load.js" type="text/javascript"></script>
And I only have the plugin enabled.

What shall I do?

Cheers

Dirk

Re: Weird problem with Flattr-plugin

Posted: Mon Jan 10, 2011 1:21 pm
by garvinhicking
Hi!

Exactly, the first code you quoted - it occured 2 times when I looked today. now it's only one time, in the head. Can you remove that code as well? It doesn't come from the flattr plugin...

Regards,
Garvin

Re: Weird problem with Flattr-plugin

Posted: Mon Jan 10, 2011 1:26 pm
by Lux
garvinhicking wrote:Exactly, the first code you quoted - it occured 2 times when I looked today. now it's only one time, in the head. Can you remove that code as well? It doesn't come from the flattr plugin...
In my opinion it is only a comment, correct?

I did not enter that code.

Do you think removing and reinstalling the plugin might be helpfull?

Cheers

Dirk

Re: Weird problem with Flattr-plugin

Posted: Mon Jan 10, 2011 8:55 pm
by garvinhicking
Hi!

No, this is not a comment, it's active code. And it doesn't come from the flattr plugin!

Regards,
Garvin

Re: Weird problem with Flattr-plugin

Posted: Tue Jan 11, 2011 7:00 am
by Lux
garvinhicking wrote:No, this is not a comment, it's active code. And it doesn't come from the flattr plugin!
In this case the most interesting question is, where does it come from?

Are you sure that it was not inserted by former versions of the plugin?

Cheers

Dirk

Re: Weird problem with Flattr-plugin

Posted: Tue Jan 11, 2011 1:53 pm
by garvinhicking
Hi!

I created the plugin and cannot remember it was ever in there. You should do a grep on all your files for a part of the string to see where it originates. Maybe start with scanning your serendipity_config DB table. I'm still quite sure it must come from a HTML Page nugget.

Regards,
Garvin

Re: Weird problem with Flattr-plugin

Posted: Wed Jan 12, 2011 1:11 pm
by Lux
garvinhicking wrote:I created the plugin and cannot remember it was ever in there. You should do a grep on all your files for a part of the string to see where it originates. Maybe start with scanning your serendipity_config DB table. I'm still quite sure it must come from a HTML Page nugget.
You are quite right I must confess, it came from a "head-nugget".

I have to apologize.

How can I add a big button for the blog in the sidebar-nugget without having this in a head nugget?

Many thanks for your support Garvin!

Cheers

Dirk

Re: Weird problem with Flattr-plugin

Posted: Wed Jan 12, 2011 1:14 pm
by garvinhicking
Hi!

The first question would be - does removing the code make the flattr plugin work again correctly?

Regards,
Garvin

Re: Weird problem with Flattr-plugin

Posted: Wed Jan 12, 2011 3:30 pm
by Lux
garvinhicking wrote:The first question would be - does removing the code make the flattr plugin work again correctly?
I have no clue, the guy who helped me flattred about ten times ... and I don't want to ask him again.

Cheers

Dirk

Re: Weird problem with Flattr-plugin

Posted: Wed Jan 12, 2011 4:07 pm
by garvinhicking
Hi!

Ah, it works now! I flattrd one of your articles and no more strange display.

I believe you cannot put a flattr big button AND normal flattr buttons on the same page, maybe? I'm afraid you'll need to ask flattr support about this; I think because their API is loaded twice this generates the problem.

Regards,
Garvin

Re: Weird problem with Flattr-plugin

Posted: Wed Jan 12, 2011 4:31 pm
by Lux
garvinhicking wrote:Ah, it works now! I flattrd one of your articles and no more strange display.
Thanks a lot, this will give a good result this month :-D

(I flattred back).
garvinhicking wrote:I believe you cannot put a flattr big button AND normal flattr buttons on the same page, maybe? I'm afraid you'll need to ask flattr support about this; I think because their API is loaded twice this generates the problem.
This is what I had to add for the button:

Code: Select all

<a class="FlattrButton" style="display:none;" href="http://www.deimeke.net/dirk/blog/"></a>
The last question is, where I can get the "FlattrButton"-Class from.

Cheers

Dirk