WordPress.org

Ready to get started?Download WordPress

Forums

Radio Buttons for Taxonomies
[resolved] No support for Quick Edit? (38 posts)

  1. Hassan
    Member
    Posted 12 months ago #

    When I select some taxonomies to use radio buttons, I can no longer see their boxes when clicking the Quick Edit link in the posts table. Is this a known limitation or a bug?

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

  2. helgatheviking
    Member
    Plugin Author

    Posted 12 months ago #

    It wasn't a known bug, but it appears to be a bug nonetheless.

    Please download the latest version here:
    https://github.com/helgatheviking/Radio-Buttons-for-Taxonomies

    and let me know if that solves it for you. If so, I will push it live to the WP repo.

  3. Hassan
    Member
    Posted 12 months ago #

    Just tried the new version. It works for the default "Category" taxonomy only. Won't work for custom taxonomies.

  4. helgatheviking
    Member
    Plugin Author

    Posted 12 months ago #

    Is working here for my test custom taxonomy:

    https://www.diigo.com/item/image/1xt6v/3esd

    What does your register_taxonomy() code look like? RBfT now respects the show_admin_column parameter, so if that is false quick edit won't work.

    Are you seeing columns for the taxonomy at all? How are they added?

  5. Hassan
    Member
    Posted 12 months ago #

    I created these custom taxonomies with the Types plugin. I don't see the show_admin_column parameter in its settings screen though :/

  6. helgatheviking
    Member
    Plugin Author

    Posted 12 months ago #

    This appears to not be a problem with RBfT. show_admin_column is false by default: http://codex.wordpress.org/Function_Reference/register_taxonomy

    Therefore my plugin won't change the column until it is added. I decided not to go all willy-nilly adding columns unless they were specifically added by the user.

    Potential solutions:

    1. As the Types developers to include this option. There are some filters in their code that might help, I'm not sure and can't test.

    2. Add the column yourself. There are plenty of tuts on the subject:
    http://wp.tutsplus.com/tutorials/creative-coding/add-a-custom-column-in-posts-and-custom-post-types-admin-screen/

    3. Register the taxonomy yourself. There's a good example in the codex and even a generator here:
    http://themergency.com/generators/wordpress-custom-taxonomy/

  7. Hassan
    Member
    Posted 12 months ago #

    Thanks a lot. I have notified Types devs about this and they should add that option. Your plugin is working fine, the issue is with Types.

  8. oceanazul
    Member
    Posted 4 months ago #

    Hi Helga and Hassan,

    I also am using the Types plugin with the RDfT plugin, and i'm not sure if this is the same issue, but i can see my radio buttons in the quick edit list, but they always default to none selected, and this taxonomy cannot be updated from the quick edits screen, and also shows incorrect selection.

    Is this the same issue you were discussing, and if so, Hassan, did Types resolve it, and is there something i can do to get the quick edit options working?

    thanks in advance.

  9. helgatheviking
    Member
    Plugin Author

    Posted 4 months ago #

    It seems like it is not the exact same issue, but rather a new conflict with Types. I suspect their markup might be a little different from the default. Unfortunately I do not have time to test it at the moment.

  10. oceanazul
    Member
    Posted 4 months ago #

    No problem, Thanks for responding Helga. I will use a radio button custom field for now. If you ever do look into it, and remember this thread, it would be great to know :)

  11. Hassan
    Member
    Posted 4 months ago #

    oceanazul, as helga noted, this is a different issue, however I am also experiencing it. I am not sure who's the culprit here, but I did not bother to try and look into it since I can assign/change taxonomies from the post edit screen itself. Takes more clicks, yes, but works.

  12. oceanazul
    Member
    Posted 4 months ago #

    Ok, Thanks Hassan for responding. I resorted to the Custom Field workaround, since I am handing the site off to a client eventually and they will be confused by the radio buttons not working in quick edit screen. I will post here if i do discover a fix in the future :)

  13. helgatheviking
    Member
    Plugin Author

    Posted 4 months ago #

    Would you dig in with dev tools or firebug and tell me what the column header looks like for the custom taxonomy?

    For example on the edit.php screen, the Categories column looks like this:

    <th scope="col" id="categories" class="manage-column column-categories" style="">Categories</th>
  14. oceanazul
    Member
    Posted 4 months ago #

    Hi Helga—Yes i will try and find that out and report back.

  15. shadowshades
    Member
    Posted 4 months ago #

    Hi, I also use Types plugin. My quick edit work great!
    But when I try to edit multiple posts at a time (Bulk actions), it dont work. Is this a known limitation or a bug?
    Thank you! :)

  16. oceanazul
    Member
    Posted 4 months ago #

    Your quick edit works? Hmm... that's strange.I do have a lot of other plugins, so perhaps one of those is the culprit.

    Shadowshades—when you are viewing the quick edit screen, you are able to make changes to the radio selection, and those changes are saved, yes?

    I will give Helga the info she requested as soon as I have a moment. i'm working on a deadline this week so it will be a few days.

  17. Hassan
    Member
    Posted 4 months ago #

    helga, to answer your question, this is my column header HTML code:

    <th id="column-taxonomy" class="manage-column column-column-taxonomy sortable desc" style="" scope="col">
    
        <a href="http://example.com/wp-admin/edit.php?post_type=car&orderby=Manufacturer&order=asc">
            <span>Manufacturer</span>
            <span class="sorting-indicator"></span>
        </a>
    
    </th>

    My custom taxonomy is called (Manufacturer) and assigned to a custom post type (Car).

  18. helgatheviking
    Member
    Plugin Author

    Posted 4 months ago #

    Ok, looks like Types is devtiating from the default. I have some code

    function add_tax_columns( $columns ) {
    
    		/* keep trickery for post_tag and category' replacement until WP 3.5 */
    		switch ( $this->taxonomy ) {
    			case 'post_tag' :
    				$json = str_replace( "tags", "radio-{$this->taxonomy}" , json_encode($columns));
       				$columns = json_decode($json, true);
    				break;
    			case 'category' :
    				$json = str_replace( "categories", "radio-{$this->taxonomy}" , json_encode($columns));
        			$columns = json_decode($json, true);
        			break;
        		default:
    				$json = str_replace( "taxonomy-{$this->taxonomy}", "radio-{$this->taxonomy}" , json_encode($columns));
        			$columns = json_decode($json, true);
    				break;
    		}
    		return $columns;
    	}

    in my plugin that looks through the columns and swaps out taxonomy-manufacturer for radio-manufacturer but it looks like it never finds taxonomy-manufacturer from the Types-generated code and so doesn't get the radios right. Though, I'm confused by ozeanazul's statement that quick edit is working.

    I'm repairing my local testing environment and then I have a couple of projects to finish... then hopefully i can test Types.

  19. oceanazul
    Member
    Posted 4 months ago #

    Hi Helga,

    I certainly will have a look into this once i'm past this deadline i have, since i truly appreciate the time you yourself have put into this. Just wanted to clarify one thing though; my quick edit is NOT working (in your post above you say your are confused that my quick edit IS working)—maybe that was a typo on your part?

    So; the radio buttons show up in my quick edit, my my two/three options are:

    - New York City
    - California
    - No location (an option that i assume is added by default for none)

    The selection is always 'No location' in quick edit (even if New York City is actually selected if i open the post to look), and from the quick edit screen, i can change the selection, but it always reverts back to No location and doesn't actually change anything.

    As i mentioned though, i have a ton of plugins, maybe one of them is the culprit. I'll troubleshoot in a few days and let you know.

  20. helgatheviking
    Member
    Plugin Author

    Posted 4 months ago #

    My bad, someone said his quickedit worked. Shadowshapes, I think. I think you can import/export with Types. If so, could you export your post type and taxonomy so I don't have to set up my own? And when you get to testing... check your console for Javascript errors and disable other plugins.

  21. helgatheviking
    Member
    Plugin Author

    Posted 4 months ago #

    I think I found the bug. To help me double-check this, I'd appreciate if you could all download this version of RBfT and let me know if it solves the problem.

    If so, I'll push it live to the repo.

  22. helgatheviking
    Member
    Plugin Author

    Posted 4 months ago #

    Assuming you're still busy with your project, I went ahead and pushed it live anyway. Assuming no weirdness, it seems to work fine for me with Types taxonomies.

  23. oceanazul
    Member
    Posted 4 months ago #

    Hi Helga,

    I just updated the plugin and i'm still experiencing the same issue.

    I want to provide you with the info you requested above, but i'm so sorry, i don't understand exactly from where you mean. Do you mean from the quick edit screen of the custom post type which i have assigned the taxonomies as radio buttons? Because on that screen i see no column headers where the taxonomies are listed.

    But I'm assuming you mean somewhere else. Another edit page. But I'm not sure which/where?

  24. helgatheviking
    Member
    Plugin Author

    Posted 4 months ago #

    Do you mean that you don't have any quick-edit capability for your Types taxonomy? Or that you are getting checkboxes instead of radio buttons?

    If you don't have columns with the taxonomies, then you aren't going to have quick-edit support.

    Let's start with a screenshot of your quickedit. I can confirm that this is working for my with Types.

  25. oceanazul
    Member
    Posted 4 months ago #

    Hi Helga. I do have access to the taxonomy on my quick edit page, and they do present as radio buttons—all good there. The problem is when i change the selection is the quick edit screen, they don't save.

    I wasn't sure where you wanted me to explore with firebug, but attached are two screenshots from the quick edit page:

    1) how my quick edit looks:
    http://imgur.com/nWh57Uf

    2) what firebug shows for where the taxonomy is on the quick edit page:
    http://imgur.com/ezfo4xt

    (i couldn't see where to attach a screenshot here?)

  26. helgatheviking
    Member
    Plugin Author

    Posted 4 months ago #

    You can't attach a screenshot here. It's a shortcoming of the site.

    http://i.imgur.com/BYxYvQx.png

    Can you try disabling all other plugins. And possibly also revert to a default theme. So in your first screen shot, if you select "New York" and then update, you don't see New York get saved? I'm at a loss, b/c this is definitely working now.

    http://screencast-o-matic.com/watch/c2n3Y6n2Wi

    This cast shows me changing the category on a post. As well as the 'manufacturer' taxonomy on a Types-generated 'car' type.

  27. oceanazul
    Member
    Posted 4 months ago #

    Hi Helga,

    Yes, you understood correctly, i can change the radio taxonomy from quick edit, but it doesn't save. It also always shows the none selected option (in my case 'no studio') in the quick edit screen, even if an actual option has been selected in the main edit screen.

    I'm going to guess that it probably IS related to another plugin conflict.

    I can't change to a default theme just now, because even though i know that if all is okay, it shouldn't be a problem to just do that and switch back (same with plugins), but this is my first wordpress site, and i created my own theme via the _s underscores theme, and i am chasing a deadline for next week, i want to quadruple check that nothing will mess up, before doing that.

    Once I have time, I promise to revisit here, and post an update after process of elimination with the plugins, and maybe that will shed some light on it.

    Meanwhile, in case it's useful, here is a list of my active plugins:
    http://imgur.com/1wFvEuo

    I will do some investigating on my end as soon as I can :)

  28. helgatheviking
    Member
    Plugin Author

    Posted 4 months ago #

    Well when you have more info let me know. Do check for script errors. F12 (web dev tools) in chrome and then click on the Console tab. Firefox also has a console. The selected radio button pulls the info from some hidden markup and then uses scripts to select the right button, so if scripts are broken it probably will fail.

    Nothing jumps out at me among your plugins, but I'd try disabling them anyway. Also when changing themes, I'd recommend using Widget Saver. Or you can just make a full backup and restore to that.

  29. oceanazul
    Member
    Posted 4 months ago #

    I will do. (And thanks for recommending widget-saver!)

  30. shadowshades
    Member
    Posted 4 months ago #

    Hi, sorry for the delay!
    My quick edit still work well with Types plugin (I show the radio buttons and it saved well to de Database on update).
    Also, I updated to last version (1.6.1) but the Bulk actions still dont work. For the moment, to acheive it, I nedd to disable radio button for taxomomy (from the plugin options menu), do my bulk actions, and reactivate the radio buttons. It would be great if that can be works without requiring us to perform this workaround.
    Thank you!

Reply »

You must log in to post.

About this Plugin

About this Topic

Tags