pods-framework / pods

The Pods Framework is a Content Development Framework for WordPress - It lets you create and extend content types that can be used for any project. Add fields of various types we've built in, or add your own with custom inputs, you have total control.
https://pods.io/
GNU General Public License v2.0
1.07k stars 265 forks source link

Bulk Edit not working with field type Relationship Simple (custom defined list) (Custom) #4944

Closed jonathanasbell closed 6 years ago

jonathanasbell commented 6 years ago

Issue Overview

Wordpress Bulk Editing from within the new post type not working when field type = Relationship Simple (custom defined list) (Custom)

Expected Behavior

Should allow me to see a dropdown and select a value

Current Behavior

The field does not even display when bulk editing

Steps to Reproduce (for bugs)

1. 2. 3. 4. Create a custom type with a field type Relationship Simple (custom defined list) (Custom) and create a few values on each line. Create a few records in the custom type. Now select all records and bulk edit

Possible Solution

WordPress Environment

```WordPress 4.9.6 running Pro theme. Copy and paste your System Details from **Pods Admin > Settings > Debug Information** in WordPress admin here. ``` Debug Information WordPress Version: 4.9.6 PHP Version: 7.0.28-0ubuntu0.16.04.1 MySQL Version: 5.7.21 Server Software: Apache Your User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36 Session Save Path: /var/lib/php/sessions Session Save Path Exists: Yes Session Save Path Writeable: Yes Session Max Lifetime: 1440 Opcode Cache: Apc: No Memcached: No OPcache: No Redis: No Object Cache: APC: No APCu: No Memcache: No Memcached: Yes Redis: Yes WPDB Prefix: wp_ WP Multisite Mode: No WP Memory Limit: 40M Pods Network-Wide Activated: No Pods Install Location: /nas/content/live/halfgenius/wp-content/plugins/pods/ Pods Tableless Mode Activated: No Pods Light Mode Activated: No Currently Active Theme: Pro Currently Active Plugins: Activity Log: 2.4.1 Admin Columns Pro: 4.2.9 Advanced Custom Fields PRO: 5.6.10 Copy Move posts: 1.2 Essential Addons for Cornerstone & Pro: 2.7.1 Pods - Custom Content Types and Fields: 2.7.3 Post Type Switcher: 3.1.0 Real Estate Pro: 1.3.8 WordPress Importer: 0.6.4 WP All Import: 3.4.7

Pods Package Export (helpful!)

Copy and Paste the JSON Export from **Pods Admin, Migrate: Packages, Export** in WordPress admin here

Workaround or Alternate Solution Until Bug is Addressed

Related Issues and/or PRs

jonathanasbell commented 6 years ago

And the author of Admin Columns says the issue is with pods and not them. I think the bulk edit function should work

jimtrue commented 6 years ago

@jonathanasbell You recorded a video and uploaded it to our Slack Chat last night. In watching it, the bulk-edit you're using, is WordPress' bulk edit. That only works on Taxonomies. Your Classification field isn't a Taxonomy but I think that's what you're wanting it to be based on how you're using it. That's why you can't get to Bulk Edit for 'Classification' because it's a relationship field, not a Taxonomy.

You should be able to use the Inline Edit for each of those fields, but you'll notice you can't bulk edit any of the other fields of the post, either.

Relationships do not equal Custom Taxonomies and they wouldn't work with WordPress's built in Bulk Editing.

I unfortunately cannot load your video up here, so I dropped it up on our YouTube as unlisted for reference. We can delete it after we get you to a proper resolution. https://youtu.be/C8ROZLWmY_0

If the classification is something you want to be able to 'filter' on, you want to create a Custom Taxonomy in Pods and associate it to your Dimensions post-type.

jonathanasbell commented 6 years ago

Hey thanks so much for the detailed response. Unfortunately taxonomy don't permit more than one field. That's why I'm using a post type, to serve as a taxonomy with extra fields. I'm not sure how to do any kind of fault editing on post types but that's what I'm looking to do

On May 18, 2018 9:25:37 AM Jim True notifications@github.com wrote:

@jonathanasbellhttps://github.com/jonathanasbell You recorded a video and uploaded it to our Slack Chat last night. In watching it, the bulk-edit you're using, is WordPress' bulk edit. That only works on Taxonomies. Your Classification field isn't a Taxonomy but I think that's what you're wanting it to be based on how you're using it. That's why you can't get to Bulk Edit for 'Classification' because it's a relationship field, not a Taxonomy.

You should be able to use the Inline Edit for each of those fields, but you'll notice you can't bulk edit any of the other fields of the post, either.

Relationships do not equal Custom Taxonomies and they wouldn't work with WordPress's built in Bulk Editing.

I unfortunately cannot load your video up here, so I dropped it up on our YouTube as unlisted for reference. We can delete it after we get you to a proper resolution. https://youtu.be/C8ROZLWmY_0

If the classification is something you want to be able to 'filter' on, you want to create a Custom Taxonomy in Pods and associate it to your Dimensions post-type.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/pods-framework/pods/issues/4944#issuecomment-390206025, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AecPPWOZvasldk8Q50hLWiylFZC25Y6Fks5tzsvPgaJpZM4UECE2.

Sent with AquaMail for Androidhttps://play.google.com/store/apps/details?id=org.kman.AquaMail https://www.mobisystems.com/aqua-mail

jimtrue commented 6 years ago

Bulk Editing doesn't exist in WordPress, unfortunately, only for Taxonomies.

What you're looking for in Taxonomies can be done by just adding fields to your Taxonomy. It's called Term Meta and it's been supported natively by WordPress since 4.2 or 4.3. You can access it with PHP using get_term_meta and in Pods Templates by just traversing over to it. Ie, if your field was hex_value in a Colors taxonomy called colors, you'd reference it with a magic tag using {@colors.hex_value}. Fairly straightforward and 100% supported by Pods.

Sometimes it's hard to determine when to use Relationships vs. Taxonomies, but we always say: if you're going to be using the 'field' to organize your post types, either for filtering or sorting, then you want to use Taxonomy. Also if the 'field' can't exist by itself, if it only exists as a group of other things, then it's a taxonomy. Depending on your Content Needs, you can still collect quite a bit of information about the 'term' in a Taxonomy, like the City 'Chicago' in a cities taxonomy and you could make it so that your taxonomy template for cities included a fairly detailed opening section with information about the term as well and then continued showing all the other posts you're organizing by 'city'.

Check out our "Plan Before You Build" talk on Content Strategy & Information Architecture. Might help out some.

I'm going to close this issue, because this seems to be more of one of confusion on capabilities and less about a bug.

jonathanasbell commented 6 years ago

Thanks Jim. To be clear I am using “field” NOT ONLY to filter, but to display field values. My fields are

SO I am in a bit of a predicament since I want to filter and then display what is associated with the results

What do you recommend?

From: Jim True notifications@github.com Sent: Friday, May 18, 2018 12:16 PM To: pods-framework/pods pods@noreply.github.com Cc: Jonathan Asbell - South Florida Properties ja@propertyunderthepalms.com; Mention mention@noreply.github.com Subject: Re: [pods-framework/pods] Bulk Edit not working with field type Relationship Simple (custom defined list) (Custom) (#4944)

Bulk Editing doesn't exist in WordPress, unfortunately, only for Taxonomies.

What you're looking for in Taxonomies can be done by just adding fields to your Taxonomy. It's called Term Meta and it's been supported natively by WordPress since 4.2 or 4.3. You can access it with PHP using get_term_metahttps://developer.wordpress.org/reference/functions/get_term_meta/ and in Pods Templates by just traversing over to it. Ie, if your field was hex_value in a Colors taxonomy called colors, you'd reference it with a magic tag using {@colors.hex_value}. Fairly straightforward and 100% supported by Pods.

Sometimes it's hard to determine when to use Relationships vs. Taxonomies, but we always say: if you're going to be using the 'field' to organize your post types, either for filtering or sorting, then you want to use Taxonomy. Also if the 'field' can't exist by itself, if it only exists as a group of other things, then it's a taxonomy. Depending on your Content Needs, you can still collect quite a bit of information about the 'term' in a Taxonomy, like the City 'Chicago' in a cities taxonomy and you could make it so that your taxonomy template for cities included a fairly detailed opening section with information about the term as well and then continued showing all the other posts you're organizing by 'city'.

Check out our "Plan Before You Build" talk on Content Strategy & Information Architecturehttps://youtu.be/OPHfDVWyuZU. Might help out some.

I'm going to close this issue, because this seems to be more of one of confusion on capabilities and less about a bug.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/pods-framework/pods/issues/4944#issuecomment-390257725, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AecPPd8l7dWBtfe5-W5jOa9W8H_RpDzsks5tzvPBgaJpZM4UECE2.

jimtrue commented 6 years ago

It really, again, depends on how you're organizing your information. In looking at your post types in your video, I couldn't tell what 'Dimensions' was, but Classification of those dimensions, the way you were using it, made 'Classifications' seem like a Taxonomy, especially since you were also attempting to organize it like a Category or Tag.

This isn't really a discussion we do in GitHub, it sounds like something where you might want to chat about your structures and get some advice. That's something for our Slack Chat; we don't really give 'consulting' advice which is what providing a data structure to you would be. Our job is more to help you recognize when Taxonomies make more sense vs. Post Types. Usually, like I said above, it comes down to 'Can this item I'm storing one post entry about exist by itself individually in my content? If yes, then it's a post-type. If it only exists as a group of other items, ie books in the SciFi Genre, items in a store that are colored 'red', a group of houses in the 77602 Zip code, then that's a taxonomy associated to the post type you're trying to organize'.

Based on the fields you list above, Classification is a taxonomy of whatever the other post type is. You're not giving me enough details about your content or data needs to provide anything further than that.

It also doesn't matter if it's taxonomy or post type, you can always show the content you're saving on the front end, you just have to deal with things differently when you're referencing Taxonomies or individual post data: 'posts' it's post-meta, 'terms' its 'term-meta'.

Hope that helps. Let's continue anything further on this in our Slack Chat which is a better vehicle for this kind of discussion.