• Resolved becca37

    (@becca37)


      The Question

    Is it no longer possible to have POD column LABEL and NAME not “match”? Are there default settings that address this that weren’t default in this manner before and I just need to flip a switch somewhere?

      The Set Up

    1. WordPress 6.0.1
    2. PODS Version 2.8.23
    3. Self-Hosted
    4. Only other plugin active at this time is Maintenance, Version 4.06 which is used just to give users a “maintenance” screen as the site is being constructed. I did deactivate it when I deactivated all other plugins and tried again, same behavior in the PODs, so I’ve reactivated this plugin again.
    5. I have reset and deactivated PODS, reactivated, and tried again. Same behavior.

      The Details

    It has been a year-ish since I’ve done anything with PODS, but it used to be that when I added or edited a column in a POD I could set the LABEL to one value and the NAME to another.

    My normal process was to add the full value to the LABEL, save the column, thus getting the full value for the NAME (with dashes for spaces), then remove the extraneous text from the LABEL value and save again.

    e.g.

    1. Step 1: set Label = Lookup Area, Name (auto-generated) = lookup_area, Save, Name auto-magically becomes lookup-area
    2. Step 1: Update Label = Area, Save, no change to Name (lookup-area)

    Now anytime I change the LABEL value and save, it updates the NAME value to “match”.

      The Use Case

    This is undesirable for me as the pod name is extraneous in the column LABEL and just annoying for users to see when adding data, but I do need it in the column name that’s accessible via PHP so I can access the column name for manipulation of other things

    e.g. in setting post title based on POD values.

    ` if ($postType === ‘lookups’)
    {
    $fields = array( ‘post_title’, ‘lookup-area’, ‘lookup-value’ );
    }`

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Scott Kingsley Clark

    (@sc0ttkclark)

    I haven’t seen this issue happen before for anyone. I’ll do some digging and see if I can find anything that could potentially cause this particular issue.

    In the mean time, could you provide your Site Health debug information so I can see if there may be other factors causing your problem?

    Thread Starter becca37

    (@becca37)

    [I need sleep, ignore this post. Back in a few with the real one.]

    • This reply was modified 2 years, 3 months ago by becca37.
    Thread Starter becca37

    (@becca37)

    {gack} I found it. It was me.

    I have a function in my theme that keeps post/page title and name in sync, and it’s impacting the PODs plugin updates as well. Well, {duh!}.

    if ( ! in_array( $data['post_status'], array( 'draft', 'pending', 'auto-draft' ) ) ) 
    {
            $data['post_name'] = sanitize_title( $data['post_title'] );
    }

    So off to find out how to keep it from affecting the PODs admin area and impact only the actual front-facing posts/pages, if possible.

    Thanks and sorry for my confusion. :0)

    Thread Starter becca37

    (@becca37)

    Well, that was fairly painless. :0)

    if ( ! in_array( $data['post_type'], array( '_pods_field', '_pods_group', '_pods_pod' ) ) )
    {
    	if ( ! in_array( $data['post_status'], array( 'draft', 'pending', 'auto-draft' ) ) ) 
    	{
    			$data['post_name'] = sanitize_title( $data['post_title'] );
    	}
    }
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Set Column LABEL and NAME to Different Values’ is closed to new replies.