WordPress.org

Ready to get started?Download WordPress

Forums

Radio Buttons for Taxonomies
[resolved] Notice on activation (28 posts)

  1. Brian Cruikshank
    Member
    Posted 1 year ago #

    Hello, I get this notice at the top when I activate the plugin with define('WP_DEBUG', true); (plugin version 1.0.3)

    Notice: Undefined property: Radio_Buttons_for_Taxonomies::$plugin_url in /var/www/site.dev/wp-content/plugins/radio-buttons-for-taxonomies/Radio-Buttons-for-Taxonomies.php on line 85 Notice: register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.) in /var/www/site.dev/wp-includes/functions.php on line 2758

    Thanks for all your work on this!

    http://wordpress.org/extend/plugins/radio-buttons-for-taxonomies/

  2. helgatheviking
    Member
    Plugin Author

    Posted 1 year ago #

    Brian,

    There are actually a lot of problems with this plugin as it currently is. I've been slaving over it for 2+ weeks now to try to get it updated and working properly. Every day I get a little bit closer.

    Thanks for reporting the bug.

    cheers,
    -Kathy

  3. lukehm
    Member
    Posted 1 year ago #

    Hello,
    Is seems to be working for me.
    Really really useful.
    So please keep up the good work
    Best

  4. helgatheviking
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks Lukehm. I will! I can't promise when the update will come, so I'm glad that it is working for you as is.

  5. lukehm
    Member
    Posted 1 year ago #

    I assume you've seen this http://wp.tutsplus.com/tutorials/creative-coding/how-to-use-radio-buttons-with-taxonomies/
    It was a bit complicated for me
    Best

  6. helgatheviking
    Member
    Plugin Author

    Posted 1 year ago #

    Yes I have. In my readme.txt I credit Stephen's class with being the base of my plugin. I mostly put a plugin options page on the backend and then ran his class for each checked taxonomy. I've taken it beyond that by using a custom walker for the category checklist (which will allowed support for hierarchical taxonomies) and 'm trying to take it still further and do a lot of stuff with the quick edit.

  7. helgatheviking
    Member
    Plugin Author

    Posted 1 year ago #

    hey all... I think I made some progress tonight. I'd really appreciate it if any of you would test out what I have been working on before I push it to the WP repo.

    I'm hosting on github so you can get my latest effort there:
    https://github.com/helgatheviking/Radio-Buttons-for-Taxonomies/zipball/master

    Let me know what you find. Thanks!

  8. lukehm
    Member
    Posted 1 year ago #

    activated github version.
    Working fine on custom taxonomies that I hard coded into functions.php
    A couple of minor issues I encountered
    1. deactivated old version with complete removal checked - new version had retained options
    2. on saving changes in setting screen (&settings-updated=true) selected options not shown - shown correctly on if I revisit setting page
    Best
    Luke

  9. lukehm
    Member
    Posted 1 year ago #

    Also as you probably know dev version not showeing on Quick Edit
    L

  10. helgatheviking
    Member
    Plugin Author

    Posted 1 year ago #

    Don't use the dev version. Use the main version.

    Thanks for the feedback. I'm getting closer!

  11. helgatheviking
    Member
    Plugin Author

    Posted 1 year ago #

    Lukehm, could I trouble you to update from the github master again? I believe I have fixed your issues ( At least, my local install is deleting the plugin options and saving them properly. ) and would like verification.

  12. lukehm
    Member
    Posted 1 year ago #

    Will try tomorrow
    Sorry out today
    L

  13. lukehm
    Member
    Posted 1 year ago #

    Hi Kathy
    I still have the same problem on the &settings-updated=true screen
    I use Codepress Admin Columns - your plugin seems to be adding a couple of extra columns to the list if that tax has been selected. These a permenanly selected but not showing up on the admin screen.
    Otherwise appears to be working well - no debug errors appearing - on the previous version there were a couple including something about register_uninstall_hook was called incorrectly
    I also use Michael Fields' Define default terms for custom taxonomies in my function.php that is also working
    Best
    Luke

    Codepress Admin Columns

  14. helgatheviking
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Luke, is there any chance you could post a screenshot of the settings page problem? I think this is the last issue to sort out and I am just not seeing it on my end.

    And yes, my plugin adds a column for any radio taxonomy.

    Thanks for your help with this.

  15. lukehm
    Member
    Posted 1 year ago #

    Hi
    Not quite sure how I add attachments to this comment form.
    L

  16. helgatheviking
    Member
    Plugin Author

    Posted 1 year ago #

    Good point. Can you upload to imageshack.us and provide the link?

  17. lukehm
    Member
    Posted 1 year ago #

    A before and aftersave changes shot
    Best L
    ps I also believe that when I completley deleted the plugin the settings were not cleared even thought I had ticked the box
    And here is the shot from Admin Colomns - notice two extra potential columns on top

  18. helgatheviking
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks Luke. I decided to add radio taxonomies to the appropriate edit columns, so I'm not surprised to see them in the admin columns shot even though i am unfamiliar with Admin Columns.

    The other issue is more important, but I suspect that there is a conflict with another plugin. How are you registering those taxonomies? plugin? functions.php? what hook are they being registered on?

  19. lukehm
    Member
    Posted 1 year ago #

    functions.php at init
    add_action( 'init', 'create_gi_tax', 0 );

  20. helgatheviking
    Member
    Plugin Author

    Posted 1 year ago #

    could you post the whole code so i can test it? i've used init (though default, 10, priority ) without a problem.

  21. lukehm
    Member
    Posted 1 year ago #

    add_action( 'init', 'create_gi_cpt', 0 );

    function create_gi_cpt()
    {
    register_post_type('gi-works', array(
    'label' => 'Works',
    'description' => '',
    'public' => true,
    'show_ui' => true,
    'show_in_menu' => true,
    'menu_position' => 6,
    'capability_type' => 'post',
    'hierarchical' => false,
    'rewrite' => array('slug' => 'works','with_front' => false),
    'query_var' => true,
    'has_archive' => true,
    'supports' => array('title','editor','thumbnail',),
    'labels' => array (
    'name' => 'Works',
    'singular_name' => 'Work',
    'menu_name' => 'Works',
    'add_new' => 'Add Work',
    'add_new_item' => 'Add New Work',
    'edit' => 'Edit',
    'edit_item' => 'Edit Work',
    'new_item' => 'New Work',
    'view' => 'View Work',
    'view_item' => 'View Work',
    'search_items' => 'Search Works',
    'not_found' => 'No Works Found',
    'not_found_in_trash' => 'No Works Found in Trash',
    'parent' => 'Parent Work',
    ),
    ) );

    // medium custom taxonomy
    register_taxonomy('gi-works-medium',array('gi-works'),array(
    'hierarchical' => true,
    'label' => 'Medium',
    'show_ui' => true,
    'query_var' => true,
    'rewrite' => array('slug' => 'medium'),
    'singular_label' => 'Medium')
    );
    };

  22. helgatheviking
    Member
    Plugin Author

    Posted 1 year ago #

    Well I'm pretty much out of ideas... I can save 'Medium' as a radio taxonomy and it is immediately checked when 'status=updated'. What about disabling other plugins? Is there a conflict somewhere? I'm digging around in my code, but nothing is popping out at me yet.

  23. lukehm
    Member
    Posted 1 year ago #

    Hi
    I deactivated most plugins that could affect it. Its Codepress Admin Columns. Really quite a useful plugin for tiding up for clients. I don't have a problem running both at the same time it just causes a couple of interface glitchs. Nothing the client would see.
    Best
    Luke

  24. helgatheviking
    Member
    Plugin Author

    Posted 1 year ago #

    Ok. Good to know. I'll probably push my update today then and take a look at Codepress Admin somewhere later on. Plus, I always like plugins that clean up the back-end for clients. They get so overwhelmed by WP.

    Thanks for all your help!

  25. lukehm
    Member
    Posted 1 year ago #

    My sentiments exactly. Thats why your plugin is so useful. Clients can do the most unexpected things. Thanks for all you are doing to help.

  26. helgatheviking
    Member
    Plugin Author

    Posted 1 year ago #

    Luke, I found the problem in the Codepress Admin plugin:

    in the plugin's constructor we have:

    add_action( 'admin_init', array( $this, 'handle_requests' ), 1000 );

    with the callback:

    public function handle_requests()	{
    	// settings updated
    	if ( ! empty($_REQUEST['settings-updated']) )
    		$this->store_wp_default_columns();			
    
    	// restore defaults
    	if ( ! empty($_REQUEST['cpac-restore-defaults']) )
    		$this->restore_defaults();
    }

    now i don't know exactly what is happening here, but this settings-updated $_REQUEST seems to be hijacking the normal settings save that should happen on my plugin's (and presumably others') settings page. I am going to post a thread for the Codepress team so they can look into it.

  27. lukehm
    Member
    Posted 1 year ago #

    Thanks Kathy

  28. Tobias Schutter
    Member
    Posted 1 year ago #

    Thanks for spotting that. I will include a fix in the next release of Codepress Admin Columns (v1.4.6.5), so it can no longer interfere with possible setting-updates from other plugins.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.