Title: Plugin issues: update
Last modified: May 19, 2019

---

# Plugin issues: update

 *  Plugin Contributor [David Artiss](https://wordpress.org/support/users/dartiss/)
 * (@dartiss)
 * [7 years ago](https://wordpress.org/support/topic/plugin-issues-update/)
 * Original update: [https://wordpress.org/support/topic/empty-needle-error-please-read/](https://wordpress.org/support/topic/empty-needle-error-please-read/)
 * I know – it’s been weeks. I am actively looking at this but I’m drawing a genuine
   blank.
 * Here’s what I know… with version 1.0 or above of this plugin, after a number 
   of days the settings are being wiped and slowness and general problems occur 
   as a result (the plugin wasn’t designed to cope with a lack of settings for the
   simple reason that it should never happen). I’m able to recreate it on my own
   site but, as you can imagine, it takes a week each time to get it to fail and
   then, debugging added to my site, isn’t yielding anything useful. I’m still digging
   but if anybody has any ideas, it would be appreciated.
 * If you get the error then the simplest way to restore your site is to head to
   Settings -> Footnotes and put your settings back in again and then click the 
   save button.

Viewing 9 replies - 16 through 24 (of 24 total)

[←](https://wordpress.org/support/topic/plugin-issues-update/?output_format=md) 
[1](https://wordpress.org/support/topic/plugin-issues-update/?output_format=md) 
2

 *  [seuser](https://wordpress.org/support/users/seuser/)
 * (@seuser)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/plugin-issues-update/page/2/#post-11714147)
 * Glad it helped 🙂
 *  [fathimasmat](https://wordpress.org/support/users/fathimasmat/)
 * (@fathimasmat)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/plugin-issues-update/page/2/#post-11717158)
 * Hi David,
 * I think the better way to approach the options save would be using WordPress 
   settings API instead of a custom form submission method for POST. That way you
   can also safely ensure that your plugin settings are updated only when the ‘submit’
   button from your plugin options page is pressed but not when other options are
   saved or updated.
 * [Here](https://codex.wordpress.org/Settings_API) is a guide to WP settings API
   and there are useful functions to automatically render the options in your relevant
   form fields ([settings_fields](https://codex.wordpress.org/Function_Reference/settings_fields),
   [do_settings_fields()](https://codex.wordpress.org/Function_Reference/do_settings_fields)
   and automatically update the options when the form is submitted ([register_setting](https://developer.wordpress.org/reference/functions/register_setting/)).
 * So, in your options form, you can add these two lines immediately after the form
   tag:
 *     ```
       <form ...
                settings_fields('footnotes-made-easy-settings-group');
                do_settings_sections('footnotes-made-easy-settings-group');
       ....
       ```
   
 * and before closing the form you can add the submit button using the function:
 *     ```
       ...
           submit_button();
       </form>
       ```
   
 * To register your custom settings group so WP knows that they are valid options
   to be automatically processed, you can use the `register_setting` function in
   an admin hook.
 *     ```
       add_action('admin_init', 'register_footnotes_settings');
       function register_footnotes_settings()
       {
   
           register_setting('footnotes-made-easy-settings-group', 'your_option_name');
           register_setting('footnotes-made-easy-settings-group', 'your_option_name');
   
       }
       ```
   
 * I would advise to use your `option_name` as an array for all your fields so as
   to store the options in a serialised array rather than each single option. Otherwise,
   you will have to register each option field separately using the `register_setting`
   method as shown above.
 * I hope it helps.
 * Best,
    Fathima
 *  Plugin Contributor [David Artiss](https://wordpress.org/support/users/dartiss/)
 * (@dartiss)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/plugin-issues-update/page/2/#post-11735503)
 * I’ve now released version 1.0.2 of the plugin which, I believe, resolves the 
   un-going issue.
 * Apologies for how long this has taken to resolve.
 *  [Chajm](https://wordpress.org/support/users/chajm/)
 * (@chajm)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/plugin-issues-update/page/2/#post-11823404)
 * Unfortunately the Version 1.0.2 isn’t working as well 🙁
 *  Plugin Contributor [David Artiss](https://wordpress.org/support/users/dartiss/)
 * (@dartiss)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/plugin-issues-update/page/2/#post-11840570)
 * Thanks for letting me know. Can you confirm what happened? I’ve had no other 
   reports that this hasn’t worked and it’s been working perfectly on my own site
   as well.
 *  [Chajm](https://wordpress.org/support/users/chajm/)
 * (@chajm)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/plugin-issues-update/page/2/#post-11842771)
 * I use it for talmud.de – as soon as I activate the new version I get hundreds
   of lines with this error: [snip] is the path on the server. I deleted some elements:
 * Warning: strpos(): Empty needle in [snip] tlmd/wp-content/plugins/footnotes-made-
   easy/footnotes-made-easy.php on line 260
 * What happened: I updated the plugin, I activated the plugin, I reloaded a page
   without any footnotes: Fail with the error message above.
 * So, I deactivated it, activated it again, opened the settings page, saved the
   new settings, reloaded a page without footnotes: Fail with the error message 
   above.
 *  Plugin Contributor [David Artiss](https://wordpress.org/support/users/dartiss/)
 * (@dartiss)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/plugin-issues-update/page/2/#post-11842821)
 * Can you provide me with a screenshot of your Footnotes settings screen? That 
   would really help.
 *  [Chajm](https://wordpress.org/support/users/chajm/)
 * (@chajm)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/plugin-issues-update/page/2/#post-11844851)
 * Yes, of course:
 * [https://www.talmud.de/tlmd/wp-content/uploads/2019/08/2019-08-19-12-14-www.talmud.de_.png](https://www.talmud.de/tlmd/wp-content/uploads/2019/08/2019-08-19-12-14-www.talmud.de_.png)
 *  Plugin Contributor [David Artiss](https://wordpress.org/support/users/dartiss/)
 * (@dartiss)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/plugin-issues-update/page/2/#post-11844964)
 * Ah, I see – most of your options are still blank and that will be causing the
   issue. Make sure you fill in all the settings, save and the error should go.

Viewing 9 replies - 16 through 24 (of 24 total)

[←](https://wordpress.org/support/topic/plugin-issues-update/?output_format=md) 
[1](https://wordpress.org/support/topic/plugin-issues-update/?output_format=md) 
2

The topic ‘Plugin issues: update’ is closed to new replies.

 * ![](https://ps.w.org/footnotes-made-easy/assets/icon-256x256.png?rev=3057822)
 * [Footnotes Made Easy](https://wordpress.org/plugins/footnotes-made-easy/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/footnotes-made-easy/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/footnotes-made-easy/)
 * [Active Topics](https://wordpress.org/support/plugin/footnotes-made-easy/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/footnotes-made-easy/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/footnotes-made-easy/reviews/)

 * 24 replies
 * 7 participants
 * Last reply from: [David Artiss](https://wordpress.org/support/users/dartiss/)
 * Last activity: [6 years, 9 months ago](https://wordpress.org/support/topic/plugin-issues-update/page/2/#post-11844964)
 * Status: not resolved