The MU forums have moved to WordPress.org

Activating demo widget causes xml to break (3 posts)

  1. IdaWebCo
    Member
    Posted 16 years ago #

    I have the recent version of WPMU. I have Akismet, STATS, and PollDaddy enabled and working. I enabled the My Widget from http://guff.szub.net/2006/04/06/my-widget-example-wordpress-widget/ because I am trying to learn about creating widgets.

    What Happens: When I activate the My Widget widget from admin, my rss feed gets broken because an extra space is being added before the XML declaration.

    The feed validates at http://feedvalidator.org and works perfectly until My Widget is activated and this problem occurs as soon as it is activated, even without actually adding the widget to any sidebar.

    Is there anyone who can point me to files having to do with activating plugins/widgets or tell me where you think the extra space is being added?

    Please help - this is driving me nuts!

  2. andrea_r
    Moderator
    Posted 16 years ago #

    I'd say it was that widget plugin.

    Best thing to do, if you want to create your own widget, is have a look in the code at the Google widget. It's pretty well-commented.

    (hmmm, I feel a tutorial post coming on...)

  3. IdaWebCo
    Member
    Posted 16 years ago #

    Two things. #1. Just for the heck of it I added the AdSense Manager 3.0 plugin and it is not giving me any problems with the RSS feed.

    #2. After sleeping on it, and feedback from andrea_r, I think it is the widget example code. I'd love to see a fresh tutorial on this at http://wpmututorials.com/

    What is frustrating though is that the widget works as intended, both "as is" and with my edits. However, no matter what I create with that example code, a space is added before the xml declaration. It would be nice to know why, and no, there were no blank spaces before or after the php tags. IMHO, this issue must exist somewhere in a function or two functions are conflicting somehow.

    Warm regards to you andrea_r and anyone else who shares their insight with us here.

About this Topic

  • Started 16 years ago by IdaWebCo
  • Latest reply from IdaWebCo