WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Twitter widget not functioning in IE, but is in FF (5 posts)

  1. jlegaspi
    Member
    Posted 4 years ago #

    Hi -

    I am NOT A PROGRAMMER/CODER but am running the "delegate" Wootheme for WordPress, which has a built in Twitter Stream widget which I just activated in my right column on the home page. It WAS working in IE7 but now it's not. It shows a header for that twitter feed section but no tweets. In addition, the header for Twitter is linking to my LinkedIn public profile page though I have not set it up that way.

    I am receiving an error message in IE7:

    User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; GTB6.4; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 1.1.4322; MS-RTC LM 8; .NET CLR 3.5.30729; .NET CLR 3.0.30618)
    Timestamp: Tue, 4 May 2010 16:35:52 UTC

    Message: Unknown runtime error
    Line: 255
    Char: 7
    Code: 0
    URI: http://jenniferlegaspi.com/

    Tried cleaning out my registry, cache, etc. and nothing is working.

    For the record, this problem seems to only be IE as the twitter feed is showing in Firefox.

    Can anyone help? (Friendly reminder, I am not a coder so I'll need explicit instructions.) Thank you.

  2. pitchman
    Member
    Posted 4 years ago #

    I was having a problem running the Twitter List Widget on my Microsoft Internet Explorer 8 also. The widget would appear but no information inside would stream. It would work fine in FireFox or other browsers, just not in IE. The problem I found was with Twitter widget.js file that was being called from the source they provided for me to paste on my site.

    The actual .js file that is on the Twitter server has an error in it that won't allow the IE browser to display the stream. I was able to fix this rather simply. I downloaded the .js file by pasting the path in my browser:

    http://widgets.twimg.com/j/2/widget.js

    Once I had the .js file, I opened it using notepad to view the source. The change that needs to be made is simple, use the "Find" command in notepad to look for the word "array" and when it finds the entry, make the following change:

    Change the entry that says “Array.forEach” in the widget.js file to read “Array.prototype.forEach”

    By adding the word "prototype" you have now corrected their mistake. Of course you can't upload the file to their server so just place it in a directory on your site and path to it directly by changing the path in your Twitter generated source to point to the .js files new location on your website.

    I hope this helps! Have a great day!
    Brian J.
    http://www.EnjoyTheCove.com

  3. mishko
    Member
    Posted 4 years ago #

    Pitchman, thank you for the solution!

    It boggles my mind that Twitter has busted code in this widget. C'mon Twitter, get with it!

  4. Zephyrtc
    Member
    Posted 4 years ago #

    Pitchman,

    I followed your method for this issue and am now getting the following error in IE8, while the widget works fine in other platforms.

    Webpage error details

    User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; HPDTDF; InfoPath.2; .NET4.0C; AskTbARS/5.8.0.12304)
    Timestamp: Thu, 29 Jul 2010 06:22:51 UTC

    Message: Unknown runtime error
    Line: 1
    Char: 18590
    Code: 0
    URI: http://zephyrtc.com/Scripts/Twitter/widget.js

    Any ideas? or do you know of a good resource I can use to count to char: 18590 so i can pick apart the code myself?

    Thanks

  5. FrkBrahe
    Member
    Posted 3 years ago #

    Hi Pitchman,

    I have followed your guide and changed the .js-file and uploaded it to my server.
    How do I make the path in the code for Twitter-widget. Where to put the link into the code below. I have named the fil widgets.js.

    Hope you can help.

    *---------------------------------------------------------------------------------*/
    /* Twitter widget */
    /*---------------------------------------------------------------------------------*/
    class Woo_Twitter extends WP_Widget {

    function Woo_Twitter() {
    $widget_ops = array('description' => 'Add your Twitter feed to your sidebar with this widget.' );
    parent::WP_Widget(false, __('Woo - Twitter Stream', 'woothemes'),$widget_ops);
    }

    function widget($args, $instance) {
    extract( $args );
    $title = $instance['title'];
    $limit = $instance['limit']; if (!$limit) $limit = 5;
    $username = $instance['username'];
    $unique_id = $args['widget_id'];
    ?>
    <?php echo $before_widget; ?>
    <?php if ($title) echo $before_title . $title . $after_title; ?>
    <ul id="twitter_update_list_<?php echo $unique_id; ?>">

  6. <?php echo woo_twitter_script($unique_id,$username,$limit); //Javascript output function ?>
    <?php echo $after_widget; ?>

    <?php
    }

    function update($new_instance, $old_instance) {
    return $new_instance;
    }

    function form($instance) {

    $title = esc_attr($instance['title']);
    $limit = esc_attr($instance['limit']);
    $username = esc_attr($instance['username']);
    ?>
    <p>
    <label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:','woothemes'); ?></label>
    <input type="text" name="<?php echo $this->get_field_name('title'); ?>" value="<?php echo $title; ?>" class="widefat" id="<?php echo $this->get_field_id('title'); ?>" />
    </p>
    <p>
    <label for="<?php echo $this->get_field_id('username'); ?>"><?php _e('Username:','woothemes'); ?></label>
    <input type="text" name="<?php echo $this->get_field_name('username'); ?>" value="<?php echo $username; ?>" class="widefat" id="<?php echo $this->get_field_id('username'); ?>" />
    </p>
    <p>
    <label for="<?php echo $this->get_field_id('limit'); ?>"><?php _e('Limit:','woothemes'); ?></label>
    <input type="text" name="<?php echo $this->get_field_name('limit'); ?>" value="<?php echo $limit; ?>" class="" size="3" id="<?php echo $this->get_field_id('limit'); ?>" />

    </p>
    <?php
    }

    }
    register_widget('Woo_Twitter');

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags