The MU forums have moved to WordPress.org

Sitewide Feed (213 posts)

  1. zeug
    Member
    Posted 17 years ago #

    Cool, the Site Admin menu is up and running now in rc1 and I've enabled cache in wp-settings with writeable cache folder in wp-content but get this error for the feed:

    Fatal error: Call to a member function on a non-object in /wp-includes/wpmu-functions.php on line 378

    which for some reason refers to $wp_roles->_init()

    Feed was working ok on r585 until I enabled cache and now am getting the same error.

    Commented out 2 instances of wp_roles init in wpmu_functions and the feeds are working... is this a viable workaround?

  2. zeug
    Member
    Posted 17 years ago #

    urrrr ... to answer myself ... no! Major caching weirdness followed along with server overload, at least on my rc1 test server. I've disabled it on the earlier wpmu version.

  3. itdamager
    Member
    Posted 17 years ago #

    The switch_to_blog function (part of wpmu) no longer works correctly because $wp_roles is no longer defined during startup in wp-settings.php. I'll file a ticket on trac.

    Looking at svn comments, this change was made to the wordpress core back in January but just made its way into the latest wpmu builds.

    I'm not sure what the proper way to fix this would be, but as a temporary workaround edit wpmu-functions.php and add the following line of code on line 377 (immediately before the line that reads $wp_roles->_init();):


    if (!isset($wp_roles)) $wp_roles = new WP_Roles();

  4. MazZziKa
    Member
    Posted 17 years ago #

    is this modification will display the main blog last topics instead off wordpress news in Dashboard

  5. MazZziKa
    Member
    Posted 17 years ago #

    after i made the edits in wp-setting file aand making the cache dir and 777 the red line in option page is still ..
    and when i go to mysite.com/wpmu-feed/ it redirect me to registeration page i am ussing the last r622

  6. itdamager
    Member
    Posted 17 years ago #

    The plugin does not yet work for subdir installations, only subdomains.

  7. drmike
    Member
    Posted 17 years ago #

    Any chance that could be worked on? :)

    I'm stuck with subdirs. :(

  8. itdamager
    Member
    Posted 17 years ago #

    Ya, I'll get there... Hang tight.

  9. drmike
    Member
    Posted 17 years ago #

    No big. Thanks for your effort. :)

    -drmike

  10. dsader
    Member
    Posted 17 years ago #

    drmike,
    I am a no vhosts as well and I use the /wpmu-feed/ with the following work-around. My trigger blog is id 63, not 1(any id other than 1 works fine, so make a feed blog if you'd rather). I use a simple RSS widget with "http://www.mydomain.org/myblog/wpmu-feed/". And my Master Feed loads without fail.

    The "test link" sends me to the same deadend-backend: myblog.mydomain.org, but I just ignore that the same way other links are deadends in "siteadmin".

    Getting object cache to work is my next tidbit.

    D. Sader

  11. dsader
    Member
    Posted 17 years ago #

    Searched for my answer, found it, added a bit to wp-settings.php and now my new cache folder fills with stuff. However, the "siteadmin-site feed" menu still tells me my cache is disabled, yet it is clearly cacheing. What's up with that?

    D. Sader

  12. drmike
    Member
    Posted 17 years ago #

    I'll have to sit there and fiddle with it one day. It's on my todo list along with 300+ other items. *sigh*

    Anyone know of a method to add in 20 extra hours to a day? :)

  13. andrea_r
    Moderator
    Posted 17 years ago #

    Nope, but if you figure that out (I think I need a 36 hour day) can you let me know? My MU-related list is three pages long. :D

    (And we're renovating our house. And we're moving. And I have four kids home most of the day...)

  14. Xen
    Member
    Posted 17 years ago #

    I can't get the damn menu to display, dropped wpmufeed.php into mu-plugins but the damn thing refuses to work...

    Cacheing is enabled...

    WPMU RC1

  15. drmike
    Member
    Posted 17 years ago #

    What are you getting for an error if anything?

  16. drmike
    Member
    Posted 17 years ago #

    Xen, just to let you know, your list of registered blogs appears to be broken. They're all missing the 'http://' bit in front of their URLs.

    Hope this helps,
    -drmike

  17. Xen
    Member
    Posted 17 years ago #

    *shakes head* no errors

  18. drmike
    Member
    Posted 17 years ago #

    Hmm, looks fine now. I can even see what looks like a spammer getting ready. :)

  19. Xen
    Member
    Posted 17 years ago #

    :-( I wanna use wpmufeed...

    Any help would be appreciated

  20. kahless
    Member
    Posted 17 years ago #

    In using the code in this thread I get the error

    Fatal error: Call to a member function get_data() on a non-object in /path/wp-content/themes/wooster-home/sidebar.php on line 23

    Any ideas as to what it doesn't like?

  21. drmike
    Member
    Posted 17 years ago #

    I need to learn to read:

    adding the following line right before the line that says wp_cache_init();

    That means before the line, not "following" it.

    Took me twenty minutes to figure that out. *sigh* I'm tired.

    I do have a question though about the trigger blog:

    Set this to the numeric blog ID that the feed will latch to.

    Does that mean that the feed won't update until that specific site updates?

    Thanks,
    -drmike

  22. kahless
    Member
    Posted 17 years ago #

    In some further testing from my earlier post, it seems that it is not finding the method. Moving the code from the sidebar to the index generated a to undefined method

    wpmu_sitefeed :: get_data()

    Not sure how to solve this.

  23. drmike
    Member
    Posted 17 years ago #

    itdamager, is there any way we can include the username assign to the blog or even the title of the blog to the feed? I'm trying to add in the feed to the wp-admin/index.php page and, while I got it to work fine, it looks rather barren without the name of the blog or username. (Especially since all of the posts are my own. :)

    I tryed editing the wp-admin/index.php and adding in both a call to $item['dc:creator'] and $item['creator'] since that is in there but neither one worked.

  24. Toucouleur
    Member
    Posted 17 years ago #

    Mike

    I just made it few minutes ago.

    Edit wpmufeed.php

    find foreach($results as $result) {
    if ($type == 'posts' || $type == 'pages') {

    Add this just after

    // Hack to retrieve user_meta information
    $results_author = $wpdb->get_results("SELECT * FROM
    ".$wpmuBaseTablePrefix."usermeta WHERE user_id = '". $result->post_author ."'"); foreach($results_author as $result_author) {
    $author[$result_author->meta_key] = $result_author->meta_value;
    }

    // $map[] = array($blogid,$result->ID,$result->post_date_gmt);
    $map[] = array($blogid,$result->ID,$result->post_date_gmt, $author['nickname'], $author['first_name'], $author['last_name']);

    in the get_data function find

    if (!$row->post_title) $row->post_title = $this->untitled;
    $row->blogid = intval($item[0]);

    Add juste after

    $row->nickname = $item[3];
    $row->firstname = $item[4];
    $row->lastname = $item[5];

    when using get_data's function use the exemple below to get info to display :

    $_name_to_display = '';
    switch (true) {
    case (strlen($pdata->nickname) > 3) :
    $_name_to_display = $pdata->nickname;
    break;
    case (strlen($pdata->firstname) > 3 && strlen($pdata->lastname) > 3) :
    $_name_to_display = $pdata->firstname . ' ' . $pdata->lastname;
    break;
    default:
    break;
    }

    hope it will help ;)

  25. mickemus
    Member
    Posted 17 years ago #

    Another one here who cannot see the May relase of wpmufeed under the siteadmin menu. The previous version worked fine!! Any advice is greatly appreciated!

    Cheers!

  26. itdamager
    Member
    Posted 17 years ago #

    mickemus, get the latest one here.

  27. kahless
    Member
    Posted 17 years ago #

    itdamager,

    What version of PHP is required for this plugin? How should PHP be configured. I am getting a "Call to a member function on a non-object" error when I try to use $postdata = $wpmu_sitefeed->getpostdata(); and one possible cause I found through Google is a PHP version difference between the test server and production server. My host runs PHP 5 as CGI, could this be causing the problem? Thanks.

  28. itdamager
    Member
    Posted 17 years ago #

    Thats not a php issue, getpostdata() was changed to get_data($type). Try this instead:

    $postdata = $wpmu_sitefeed->get_data('posts');

  29. kahless
    Member
    Posted 17 years ago #

    Generates the same error. Not sure what is going on.

  30. blog247coza
    Member
    Posted 17 years ago #

    itdamager - I read in another post in the forum that you had already accomodated in removing the Hello World posts from the feed but alas my feed is still showing these. I have noticed that MU posts the Hello World item with the date and time that a user signs up so your feed picks it up as an official post.

    I really want to have these posts excluded - is there any hack I can add to have this removed?

    PS > here is the link to the feed: http://news.blog247.co.za/main-feed/

About this Topic

  • Started 17 years ago by itdamager
  • Latest reply from jeremybyrne