Mini twitter feed
[resolved] Error Handling (4 posts)

  1. Dani-Girl
    Posted 4 years ago #

    Is there a error message or detection that appears if Twitter feeds go down and won't display?

    Is it possible to add this into the existing code, so visitors will not be met with a blank area?


  2. hectopod
    Plugin Author

    Posted 4 years ago #

    No, there is no message. It is possible to add it, maybe it will be added in the next update.

  3. avioli
    Posted 4 years ago #

    By enabling WP_DEBUG inside your wp-config.php you'll notice several errors within your plugin code:

    Function form inside the MinitwitterWidget class doesn't initialise the variables of the $instance:

    function form($instance) {
    $instance = array_merge( array(
     'username' => ''
     ,'limit' => ''
     ,'list' => ''
     ,'query' => ''
    ), (array)$instance );

    Same thing with the widget function within the same class. This won't even show as an error, since as soon as you instantiate the widget into a sidebar it's default values are saved. At least check for empty(). BTW if you have WP_DEBUG turned on the default values are the error notices!

    Thank god that shortcode_atts() deals with this on its own.

    And the last one - this line: add_shortcode('minitwitter', mtf_create_shortcode); should have quotes:add_shortcode('minitwitter', 'mtf_create_shortcode');, otherwise the second argument is considered an undefined constant, and yields an error notice. It's a notice, since undefined constants default to their names as strings.


  4. hectopod
    Plugin Author

    Posted 4 years ago #

    Thank you for your messages I will take a look and update it.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Mini twitter feed
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.