Title: Errors when activating and adding widget
Last modified: August 20, 2016

---

# Errors when activating and adding widget

 *  [deafwiggle](https://wordpress.org/support/users/deafwiggle/)
 * (@deafwiggle)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/errors-when-activating-and-adding-widget/)
 * I get the following error message twice at the top of every page when this plugin
   is activated:
 * `Notice: has_cap was called with an argument that is deprecated since version
   2.0! Usage of user levels by plugins and themes is deprecated. Use roles and 
   capabilities instead. in /data/www/customers/gilbert/wp-includes/functions.php
   on line 3387`
 * When I add the widget to the sidebar, the sidebar displays this within the widget:
 * `Notice: Undefined index: title in /data/www/customers/gilbert/wp-content/plugins/
   yet-another-random-quote/yarq.php on line 478`

Viewing 1 replies (of 1 total)

 *  Plugin Author [scarpenter](https://wordpress.org/support/users/scarpenter/)
 * (@scarpenter)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/errors-when-activating-and-adding-widget/#post-2146081)
 * Looking around I found this:
 * [http://wordpress.org/support/topic/has_cap-was-called-with-an-argument-that-is-deprecated-since-version-20](http://wordpress.org/support/topic/has_cap-was-called-with-an-argument-that-is-deprecated-since-version-20)
 * Looks like passing an integer to add_options_page may be deprecated, at least.
   It sounds like that message may also be caused by turning on WP_DEBUG in wp-config.
   php:
 * define(‘WP_DEBUG’, true);
 * I tried setting it to true and saw a variety of errors in my own installation,
   although didn’t see that one.

Viewing 1 replies (of 1 total)

The topic ‘Errors when activating and adding widget’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/yet-another-random-quote.svg)
 * [Yet Another Random Quote](https://wordpress.org/plugins/yet-another-random-quote/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/yet-another-random-quote/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/yet-another-random-quote/)
 * [Active Topics](https://wordpress.org/support/plugin/yet-another-random-quote/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/yet-another-random-quote/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/yet-another-random-quote/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [scarpenter](https://wordpress.org/support/users/scarpenter/)
 * Last activity: [14 years, 9 months ago](https://wordpress.org/support/topic/errors-when-activating-and-adding-widget/#post-2146081)
 * Status: not resolved