WordPress.org

Ready to get started?Download WordPress

Forums

Q2W3 Fixed Widget (Sticky Widget)
Deprecated / Notices, (8 posts)

  1. Marek Sobol
    Member
    Posted 1 year ago #

    Hi,

    The way you use settings API i deprecated since WP 2.7. Tere are also debug notices like Notice: Undefined index: q2w3_fixed_widget in ...\wp-content\plugins\q2w3-fixed-widget\q2w3-fixed-widget.php on line 59 because you should check if key q2w3_fixed_widget exists in instance table before you check it for vaue. (WP_DEBUG recommended)

    Settings related to tablets and also checkboxes "Fixed widget" for individual widgets are NOT stored in database. So, fresh installation of plugin (never installed before) simply does not work.

    Regards
    Marek

    http://wordpress.org/extend/plugins/q2w3-fixed-widget/

  2. Max Bond
    Member
    Plugin Author

    Posted 1 year ago #

    Hi!
    Thanks for Notices info, I'll make changes for the next version!

    Settings related to tablets and also checkboxes "Fixed widget" for individual widgets are NOT stored in database. So, fresh installation of plugin (never installed before) simply does not work

    What do you mean by saying "does not work"? )
    Ofcourse you need to make some basic configurations after clean install.
    Select widgets which you want to fix, define margins and so on...
    Or you think ALL active widgets should be fixed right after plugin activation?
    Sorry, I am not agree!

  3. Marek Sobol
    Member
    Posted 1 year ago #

    Hi,

    I mean that my selection of "Fixed widget" checkbox (for any widget) is not stored. I select the checkbox, reload widgets page (or go somewhere else and back) and checkbox is not selected.

    The problem probably comes from the fact that selected checkbox return 1 but not selected returns nothing (===false) and it is not 0. You need to initialize the field. I had exactly the same problem some time ago, but cannot recall details at the moment. Delete your widget data from options table before you test it.

    BTW: I've noticed another problem - your JS code destroys "style" attribute for selected widget. It is not nice :-) Widgets for dynamic sidebar rarely have style attribute, however, it is not forbidden :)

    Best regards
    Marek

  4. Max Bond
    Member
    Plugin Author

    Posted 1 year ago #

    I mean that my selection of "Fixed widget" checkbox (for any widget) is not stored. I select the checkbox, reload widgets page (or go somewhere else and back) and checkbox is not selected.

    Ok, I'll check! But strange - it is the first report of such kind... And I already made many clean installs without problems.
    Other widget options are saved normaly?

  5. Marek Sobol
    Member
    Posted 1 year ago #

    I checked again. The problem is with widgets which have no options. You add "Fixed widget" checkbox but there is no "Save" button. At first I did not catch the source of the problem, just checked and noticed it wasn't saved.

    Hope it helps

  6. Max Bond
    Member
    Plugin Author

    Posted 1 year ago #

    The problem is with widgets which have no options. You add "Fixed widget" checkbox but there is no "Save" button

    Aaa... Now I understand! )
    It's not my plugin bug or widget bug.
    Widget developer just disabled widget options save form.
    I can not enable it with a hook I am using to add option checkbox.
    You need to edit widget init code by yourself. Just override form function in a widget subclass:

    class Example_Widget extends WP_Widget {
      ...
      function form($instance) {
        /* Just an empty function */
      }
      ...
    }
  7. RiccardoP
    Member
    Posted 1 year ago #

    Hi, i've some PHP Notice with disable-phone and disable-tablet. Check with WP_Debug=true. I'm not a programmer but i've solved with:

    if (isset($options['disable-phone']) && $options['disable-tablet'] ) {
    ...
    }

    between line 117 and 136 of q2w3-fixed-widget.php. I hope you can fix it on next release :)

    Thanks for the plugin.

  8. Max Bond
    Member
    Plugin Author

    Posted 1 year ago #

    RiccardoP!

    I'll fix these problems in next version!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic