Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improper Values Being Saved In Weekdays relationship Field #1862

Closed
Shelob9 opened this issue Nov 15, 2013 · 6 comments · Fixed by #2397
Closed

Improper Values Being Saved In Weekdays relationship Field #1862

Shelob9 opened this issue Nov 15, 2013 · 6 comments · Fixed by #2397
Labels
Status: Help Wanted We have not prioritized this yet, but you can help make it happen to speed it up Type: Bug

Comments

@Shelob9
Copy link
Contributor

Shelob9 commented Nov 15, 2013

User in this WPORG support thread Reports the following is occurring when saving a date field:

  • all day, saved array is
    ( [0] => 0 [1] => 1 [2] => 2 [3] => 3 [4] => 4 [5] => 5 [6] => 6 )
    Correct!
  • only Monday, saved array is 1
    Correct!
  • only Sunday, saved array is
    ( [0] => 0 [1] => 0 )
    Error! I expect "0" or ( [0] => 0 )
  • only Sunday and Monday, saved array is
    ( [0] => 0 [1] => 1 )
    Correct!
  • only Sunday and Tuesday, saved array is
    ( [0] => 0 [1] => 0 [2] => 2 )
    Error!
  • only Tuesday, saved array is
    ( [1] => 0 [2] => 2 )
    Error!
@ghost ghost assigned sc0ttkclark Nov 26, 2013
@sc0ttkclark sc0ttkclark removed their assignment May 26, 2014
@sc0ttkclark sc0ttkclark modified the milestones: Pods 3.1, Pods 3.0 Jun 4, 2014
@jamesgol
Copy link
Contributor

jamesgol commented Oct 8, 2014

I was digging into this one tonight, gotta give up for the night but I did figure some stuff out.

The jquery.pods.js code for checkboxes seems to assume everything is going to be boolean.

                            if ( $el.is( 'input[type=checkbox]' ) && !$el.is( ':checked' ) ) {
                                if ( 1 == val )
                                    val = 0;
                                else
                                    return true; // This input isn't a boolean, continue the loop
                            }

This only affects checkboxes and looks like anything that isn't CPT (since CPT doesn't use the jquery.pods.js currently).

A workaround for this is to use one of the other multi-select types until this gets figured out.

@sc0ttkclark
Copy link
Member

Pending 3.0-unstable PR

@sc0ttkclark sc0ttkclark reopened this Oct 27, 2014
@sc0ttkclark sc0ttkclark modified the milestones: Pods 3.0, Pods 3.1 Oct 27, 2014
@sc0ttkclark sc0ttkclark removed Status: Help Wanted We have not prioritized this yet, but you can help make it happen to speed it up Keyword: Puntable labels Oct 27, 2014
@sc0ttkclark sc0ttkclark added the Status: Help Wanted We have not prioritized this yet, but you can help make it happen to speed it up label Dec 29, 2015
@JoryHogeveen
Copy link
Member

I think this is fixed since these PRs:

#5467
#5528
#5538
#5687

Closing here.

@JoryHogeveen
Copy link
Member

Sorry, wrong field type.

@JoryHogeveen JoryHogeveen changed the title Improper Values Being Saved In Date Field Improper Values Being Saved In Weekdays relationship Field Jul 14, 2020
@JoryHogeveen
Copy link
Member

However. This is fixed in #2397

@JoryHogeveen
Copy link
Member

Might also be related: #1854

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Help Wanted We have not prioritized this yet, but you can help make it happen to speed it up Type: Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants