Recent Topics

My plugin sometimes forgets to get rendered

Started by on Feb 04, 2008 – Contents updated: Feb 04, 2008

Feb 04, 2008 22:34    

Hi. My "creative commons" license plugin is supposed to be 'lazy' and I'm pretty sure I set it up correctly, but I've noticed for a fact that every now and then posts with a license won't render. When I was doing the initial work on this I made up a folder of posts in my blog with licenses. Some from the old-style plugin, some from the new-style. I used that folder to debug stuff yah?

One thing I didn't notice was that there was a gross flaw in the code that produced license links relative to the skin folder. OOPS! It's fixed, but now I see again where sometimes some posts won't render a license. I've got 12 posts with licenses and just now I had to "edit and save" 3 of them to get them to render again. Old or new doesn't seem to matter, nor does "popular" or not popular. Plus I really don't know which ones get hit on when so ...

I'm thinking it's got something to do with what's in my pre-rendered item cache, but that in itself doesn't give me a clue what to look for or how to fix it.

I also notice that it doesn't render in preview mode but youtubes did when I was using that (lazy) plugin.

I could just make it "opt in" which would sort of be okay because it means the blogger is taking at least two actions to license their work. According to the CCL people that's kind of a good thing. But what the heck it should work as a lazy and it *sometimes* isn't.

Oh and I checked my database. In the items__item table I can search for and find the IDs of the 12 posts that are published with licenses. In the items__prerendering table I find the same 12 posts, but 10 of them have 2 entries (matching itpr_item_ID with different itpr_format values).

So if anyone who knows plugins has a clue lemme know what I should be looking at or for - please! Since I have to do an update just to make the thing work I'd like to fix this weird little bug that I can't duplicate but know will come back again.

Feb 16, 2008 19:42

Okay definitely a problem with pre-rendering. Today 3 posts didn't have a license so I checked evo_item__prerendering and found that those three posts showed the un-rendered bit. Other posts that were properly rendered showed the "after render" results.

Anyone have an idea why some posts would revert back to their un-rendered state in that table?

Feb 17, 2008 23:57

ack, every time I've noticed this post and started to read your problem and consider possible causes I've had life land on me in busy ways and not been able to reply

I'm seriously considering getting a premium rate phone number for those occasions when friends and family think it's great to phone for 5 hours with a computer problem they expect me to diagnose from "urm, it flashes blue and reboots" :|

Anyway, this was another such time that I started to read this post and this time I'm determined to at least get as far as typing some sort of answer .... I even disconnected my phone in anticipation of life ;)

No ideas mate :|

But when I get a chance I'll install the plugin and see if I get similar behaviour. Something that may be worth checking is, when a post loses it's licence, crack open the db in pma and see if the plugin is still in the renderers list for the item in question ( evo_items__item or summat equally long winded )

¥

Feb 18, 2008 00:18

¥åßßå wrote:

... Something that may be worth checking is, when a post loses it's licence, crack open the db in pma and see if the plugin is still in the renderers list for the item in question ( evo_items__item or summat equally long winded )

¥

Yeah that's what I did last time. Got the post_ID from the edit link and went in to see if it was missing from tables that it ought to have been in. Since I was thinking "it's losing it's rendering" I went to items__prerendering and saw that the three were still listed in there.

So on a hunch I edited the table entry via pma and found that the contents of "itpr_content_prerendered" for those three posts were as they appeared when editing the post in the back office, meaning not rendered. I then looked at a post ID that properly rendered and found that the rendered version was in that table.

I am getting very suspicious of exactly what I am rendering by the way. It seems all the fancy new renderers use square brackets to identify what to render. Like the video plugin uses [video:youtube:afdadfadf] and the youtube plugin uses [youtube]afdadfadf[/youtube], but in an effort to keep backwards compatibility I'm using "<!-- render this into a license -->". I have no reason for that suspicion other than it's a difference I can see.

Feb 18, 2008 00:27

I use <!-- foo --> for most of our rendering stuff and it doesn't appear to affect things, but weirder things have happened at sea .... so they tell me.

I'll slap the plugin on my blog sometime in the near future ( does it have an "this post is licensed by a blonde which means that whilst it may or may not contain remarkable content that content is protected by a bunch of daffodil waving yanks that are looking for colour in their lives" licence ? ) and see if I get the same behaviour, but the chances are this'll be one of those things that takes sheloads of beer and drugs to realise that we've overlooked the bloody obvious

¥

Feb 26, 2008 02:54

Okay I give up. I just changed it to "opt-out" for rendering.

Posts that get traffic every day may or may not have a rendered license. Posts that probably don't see ANY traffic for a week or more have a properly rendered license - but not always. There is absolutely no pattern or consistency about it. So byebye lazy rendering.

Mar 03, 2008 04:37

Well maybe I didn't give up completely ;)

Seems opt-out has a problem with previewing when there is no license attached. No biggie, but still I see intermittent cases where licenses that did render don't render after a random amount of time.

So I had me a thought. In many cases - heck in ALL cases - the comment this plugin renders is the last thing in the post. So I figured maybe that's part of the issue and added a return to some posts, a space to some, and a space and a return to others after the license comment.

Time will tell...

Mar 14, 2008 05:11

I give up even though I don't. Adding empty spaces and lines doesn't work because b2evo takes them out, but adding full actual content doesn't stop the occasional "failure to render" problem.

Posts that get traffic and posts that don't get traffic will either lose or keep their license after an unknown amount of time. No consistency, no clue why.

Is ANYONE else having this problem with the CC License plugin? I'm wondering because - duh - it MIGHT be somehow my skin's fault.

Mar 15, 2008 02:29

Priorities. I just now thought of priorities, not that this would explain the intermittent and random failure to render after successfully rendering ...


Form is loading...

powered by b2evolution free blog software – This forum is powered by b2evolution CMS, a complete engine for your website.