[resolved] Creating A Plugin (5 posts)

  1. corbins
    Posted 4 years ago #

    Hey all,

    I am an intermidant PHP programer and this is the first widget/plugin I have created for WordPress. I realize the plugin doesn't do anything yet, I am just trying to get the wrapper working so I can write the core code.

    The problem I am having is pretty generic. I am able to install and activate the plugin, however, when I drag the widget into a side bar, the form appears for me to enter the settings. I enter the settings and hit save, and the settings remain in the fields.

    When I refresh the page though, the plugin disapears from the side bar list and has lost its configuration. Based on the code below, does anyone see the mistake I am making?

    Code: http://pastebin.com/93UfxvJN


  2. corbins
    Posted 4 years ago #

    Is this a general error that happens when anything goes wrong, or is it specific to a method that must be overridden?

  3. corbins
    Posted 4 years ago #

    After turning on error reporting, I got this error message after I saved the plugin's config.

    Notice: Undefined index: sms_platform_keyword_checker_widget-2 in .../X.com/web/content/wp-admin/admin-ajax.php on line 1446

    Any ideas?

  4. Nanang Rukmana
    Posted 4 years ago #

    open wp-config.php
    set to false

    define('WP_DEBUG', false );
  5. corbins
    Posted 4 years ago #

    I figured out the error, it had to do with my form validation in the settings pannel. It was failing the initial validation because I never provided default data. Once I did, the problem resolved.

Topic Closed

This topic has been closed to new replies.

About this Topic