Support » Plugin: Bei Fen - WordPress Backup Plugin » [Plugin: Bei Fen – WordPress Backup Plugin] Bei Fen Error after installation

  • This error popped up in the right hand side of the Dashboard:

    Fatal error: Call to undefined method WP_Error::get_item_quantity() in /home/jewishorganizing/jewishorganizing.org/wp-content/plugins/bei-fen/pages/bf-info.php on line 7

    I installed version 1.4.2 using both the automatic install and the Zip file install then clicked on Back-up on the left hand menu and saw the error listed above.

    Please let me know what the fix is.

Viewing 7 replies - 1 through 7 (of 7 total)
  • yes exactly the same problem an hour ago. Any access at all to the plug in produces that exact same fatal error. Be grateful for a quick answer to this one. Thanks

    B17

    (@brynfocus17com)

    Looks like this is happening because Ben’s feed is down.

    FIX:
    In /wp-content/plugins/bei-fen/pages/bf-info.php, comment out lines 5-8, e.g.

    include_once(ABSPATH . WPINC . '/feed.php');
    $rss = fetch_feed('http://www.beifen.info/feed/');
    $maxitems = $rss->get_item_quantity(5);
    $rss_items = $rss->get_items(0, $maxitems);

    Becomes

    // include_once(ABSPATH . WPINC . '/feed.php');
    // $rss = fetch_feed('http://www.beifen.info/feed/');
    // $maxitems = $rss->get_item_quantity(5);
    // $rss_items = $rss->get_items(0, $maxitems);

    Thank you Bryn. What is the difference in your fix between the “old” and the “becomes” script. They look exactly the same. Or am I being silly here? Rgds chris

    The “becomes” section has // at the beginning of every line, which makes your server ignore the code.

    Side note: This is a useful lesson for plugin developers – if you’re going to include a feed like this, make sure it fails gracefully!

    Hi Peter
    Im a dummy for missing that. I feel proper stupid now. Anyways that worked fine thank you. Can I ask you a couple of other questions:

    1) what exactly is this backup tool backing up from the following list?
    wrdp database?
    themes?
    plug in?
    uploads?
    anything else?

    2) will it continue to work do you think bearing in mind Ben seems to have gone AWOL on us?

    Rgds
    Chris

    Thanks…it worked perfectly!

    In the case the RSS will be up and runing sometime in the future, replace lines 5-8 in /wp-content/plugins/bei-fen/pages/bf-info.php

    include_once(ABSPATH . WPINC . '/feed.php');
    $rss = fetch_feed('http://www.beifen.info/feed/');
    $maxitems = $rss->get_item_quantity(5);
    $rss_items = $rss->get_items(0, $maxitems);

    WITH:

    include_once(ABSPATH . WPINC . '/feed.php');
    			$rss = fetch_feed('http://www.beifen.info/feed/');
    
    			if (!is_wp_error( $rss )){ // Checks that the object is created correctly
    				$maxitems = $rss->get_item_quantity(5);
    				$rss_items = $rss->get_items(0, $maxitems);
    			} else {
    				$maxitems = 0;
    				$rss_items = array();
    			}

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Plugin: Bei Fen – WordPress Backup Plugin] Bei Fen Error after installation’ is closed to new replies.