ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Twitter widget won't load if i use in an embedded template

May 23, 2011 7:09pm

Subscribe [2]
  • #1 / May 23, 2011 7:09pm

    John St-Amand

    865 posts

    Hi all - anyone have any idea why the Twitter widget - theirs, not the EE twitter plugins - won’t load for me when i use it in an embedded template.  I have it by itself in a template which is then embedded on the main page in a jQuery tab function.  And while the Facebook one will load, the Twitter one will not.  But if i view the template separately, everything loads fine.  Anyone experience this before?  Solutions out there?

    The page affected is my home screen - http://www.bedford5k.com - right hand column.  Funny thing is, when I view the web inspector console in Safari, the Twitter feed is definitely there in the code, but it refuses to show up in my designated tab.

  • #2 / May 24, 2011 3:24am

    Mark Bowen

    12637 posts

    Is the link above the correct link?

    I don’t think that site is online is it?

    Best wishes,

    Mark

  • #3 / May 24, 2011 7:25am

    John St-Amand

    865 posts

    Sorry, typo. It’s http://www.bedford5k.com.

  • #4 / May 24, 2011 10:30am

    Mark Bowen

    12637 posts

    Hmm not too sure what’s going on there. I visited the page and can see there’s no Tweets in there and I’m fairly certain they’re not in the source code either.

    That would make me start to wonder what’s different between the separate template (do you have a URL to that one you can share?) that works and the template where it is embedded.

  • #5 / May 24, 2011 10:36am

    John St-Amand

    865 posts

    I had been loading it as a template with a “dot” in front of the name of the template so it coulnd’t be loaded externally, but I’ve changed that so you can see what i mean.  Here’s the twitter block template that’s embedded:

    http://www.bedford5k.com/index.php/embeds/twitter-block

    I’ve added <!—hello—> to it so that you can see that the embedded template is actually making it into the page, but the twitter feed itself doesn’t display. Now that isn’t in an externally displayable template, you can see it in the code by traditional view source methods.  I’m stumped.

  • #6 / May 24, 2011 11:30am

    Mark Bowen

    12637 posts

    Not too sure what’s going on there but you do have quite a few errors on that page which might well be contributing towards it not working.

    Also it could well be the fact that you have the Twitter feed in the javascript panel that you have there. Have you tried embedding the Twitter Feed to the top of the page literally just after the <body> tag and seeing if it renders or not?

    If it does (I suspect it will) then there’s probably something else going on in the page somewhere which is stopping it from rendering. Might be a javascript loading issue or conflict somewhere perhaps.

    Best wishes,

    Mark

  • #7 / May 24, 2011 12:27pm

    John St-Amand

    865 posts

    Thanks Mark - how do i see the errors you’re speaking about?  I did HTML and CSS validation and, and I opened the Safari Developer consoles and didn’t see anything.  Is there a better way for me to check for items that might be in conflict with one another?  I’m wondering whether the Facebook and Twitter widgets might conflict with one another because the Twitter one did work in the same spot before i put the Facebook and YouTube embeds in there.

    I appreciate your advice!

  • #8 / May 24, 2011 12:41pm

    Mark Bowen

    12637 posts

    If you take a look at the page using the online validator then you’ll see there are 20 errors in there.

    http://validator.w3.org/check?uri=http://www.bedford5k.com

    I’m not sure if any of those are causing the problem here though but they are always a good thing to get rid of first before continuing.

    If as you say the Twitter one was working at one point and now isn’t because the Facebook or possibly the YouTube widgets have been placed on the page then that definitely sounds like an incompatibility issue there. I’ve never used any of them but perhaps there are some forums somewhere where people may have had the problem before and might be able to lend a hand.

    Best wishes,

    Mark

  • #9 / May 24, 2011 3:17pm

    John St-Amand

    865 posts

    Hmm. Thanks Mark.  I’ve been able to determine that any remaining errors are actually in the YouTube embed code, which I find kind of interesting. I may instead use the JW PLayer since it supports YouTube URLs and see if that helps any - though simply removing the YouTube embed didn’t help me either.  It may be that there is a conflict between a the twitter embed javascripts and some other javascript being called in my page - though I’m at a loss as to why - I’m only calling jQuery tools, the cycle plugin, unitpngfix and the tabs function itself.  Frustrating.  I’ll do another few searches of the forum to see what I can find, but I didn’t have too much luck previously.  Even if i use Twitter timeline instead of the Twitter widget, I still get a blank tab.

  • #10 / May 24, 2011 3:24pm

    Mark Bowen

    12637 posts

    Did you try embedding your Twitter code to just after the <body> tag just to see if it shows up at all?

    Might just be some kind of loading issue with using the tabs or something.

    Best wishes,

    Mark

  • #11 / May 24, 2011 3:30pm

    John St-Amand

    865 posts

    Yes, and it does show up that way - so maybe you’re right on that - a conflict with the tabs somehow.

    You can see it here:
    http://bedford5k.com/index.php/home/index-duplicate

  • #12 / May 24, 2011 3:32pm

    Mark Bowen

    12637 posts

    Hmm yep does seem like some sort of incompatibility there. Hopefully someone can comment on that as I’ve never done that sort of thing before.

    Just thinking though does the tabs code delay the loading of the items in each tab? If so then maybe that’s affecting the Twitter feed somehow?

    Best wishes,

    Mark

  • #13 / May 24, 2011 3:40pm

    John St-Amand

    865 posts

    It could be.  I had hopes that by using an embed, the Twitter feed would be rendered and THEN get pull in by the tab.  But I think it may be timing out when it’s all used together that way.  Twitter’s pretty finicky when it comes to load time.

  • #14 / May 24, 2011 3:49pm

    Mark Bowen

    12637 posts

    Sorry to hear that about Twitter :-(

    Hopefully though someone else might stop by here with some ideas.

    Best wishes,

    Mark

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases