{"action":"created","issue":{"url":"https://api.github.com/repos/eventespresso/event-espresso-core/issues/245","repository_url":"https://api.github.com/repos/eventespresso/event-espresso-core","labels_url":"https://api.github.com/repos/eventespresso/event-espresso-core/issues/245/labels{/name}","comments_url":"https://api.github.com/repos/eventespresso/event-espresso-core/issues/245/comments","events_url":"https://api.github.com/repos/eventespresso/event-espresso-core/issues/245/events","html_url":"https://github.com/eventespresso/event-espresso-core/issues/245","id":258664166,"number":245,"title":"One $question_id passed in twice while another doesn't get passed in at all","user":{"login":"weis0292","id":8814724,"avatar_url":"https://avatars2.githubusercontent.com/u/8814724?v=4","gravatar_id":"","url":"https://api.github.com/users/weis0292","html_url":"https://github.com/weis0292","followers_url":"https://api.github.com/users/weis0292/followers","following_url":"https://api.github.com/users/weis0292/following{/other_user}","gists_url":"https://api.github.com/users/weis0292/gists{/gist_id}","starred_url":"https://api.github.com/users/weis0292/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weis0292/subscriptions","organizations_url":"https://api.github.com/users/weis0292/orgs","repos_url":"https://api.github.com/users/weis0292/repos","events_url":"https://api.github.com/users/weis0292/events{/privacy}","received_events_url":"https://api.github.com/users/weis0292/received_events","type":"User","site_admin":false},"labels":[{"id":22687541,"url":"https://api.github.com/repos/eventespresso/event-espresso-core/labels/question","name":"question","color":"cc317c","default":true}],"state":"open","locked":false,"assignee":{"login":"tn3rb","id":1751030,"avatar_url":"https://avatars1.githubusercontent.com/u/1751030?v=4","gravatar_id":"","url":"https://api.github.com/users/tn3rb","html_url":"https://github.com/tn3rb","followers_url":"https://api.github.com/users/tn3rb/followers","following_url":"https://api.github.com/users/tn3rb/following{/other_user}","gists_url":"https://api.github.com/users/tn3rb/gists{/gist_id}","starred_url":"https://api.github.com/users/tn3rb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tn3rb/subscriptions","organizations_url":"https://api.github.com/users/tn3rb/orgs","repos_url":"https://api.github.com/users/tn3rb/repos","events_url":"https://api.github.com/users/tn3rb/events{/privacy}","received_events_url":"https://api.github.com/users/tn3rb/received_events","type":"User","site_admin":false},"assignees":[{"login":"tn3rb","id":1751030,"avatar_url":"https://avatars1.githubusercontent.com/u/1751030?v=4","gravatar_id":"","url":"https://api.github.com/users/tn3rb","html_url":"https://github.com/tn3rb","followers_url":"https://api.github.com/users/tn3rb/followers","following_url":"https://api.github.com/users/tn3rb/following{/other_user}","gists_url":"https://api.github.com/users/tn3rb/gists{/gist_id}","starred_url":"https://api.github.com/users/tn3rb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tn3rb/subscriptions","organizations_url":"https://api.github.com/users/tn3rb/orgs","repos_url":"https://api.github.com/users/tn3rb/repos","events_url":"https://api.github.com/users/tn3rb/events{/privacy}","received_events_url":"https://api.github.com/users/tn3rb/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2017-09-19T01:00:41Z","updated_at":"2017-09-20T02:21:59Z","closed_at":null,"author_association":"NONE","body":"### Is this a bug report?\r\n\r\n* [ ] yes\r\n* [ ] no\r\n* [x] I don't think so\r\n\r\n### What branch did this occur in?\r\n4.9.45.p\r\n\r\n### What version of WordPress is on the site this issue happened?\r\n4.8.1\r\n\r\n### If you were directed to create an issue here by the EE support team, what is the link to your original EE support forum thread?\r\nhttps://eventespresso.com/topic/autofill-filter-not-receiving-correct-values/#post-251478\r\n\r\n### Outline the steps to reproduce\r\nI wrote a filter to handle FHEE__EEM_Answer__get_attendee_question_answer_value__answer_value.  One of the parameters passed in is $question_id.  I have six questions, four of which are the default questions.  In the admin console, the other two are 11 and 13, but for some reason, they both come through as question ID 11.  My code then fills in both questions with the answer for question 11.  Everything in the database appears to be correct, I just can't get 13 to come through the method.  11 gets passed in twice.\r\n\r\n\r\n### Please include any screenshots or screencasts that can help illustrate the issue (if possible).\r\n```\r\nfunction autofill_custom_question_answers($value, EE_Registration $registration, $question_id, $system_id = null) {\r\n\tglobal $current_user;\r\n\tif ((!$current_user instanceof WP_USER) || !$registration->is_primary_registrant()) {\r\n\t\treturn $value;\r\n\t}\r\n\r\n\tswitch ($question_id) {\r\n\t\tcase 11:\r\n\t\t\t$value = esc_attr(get_the_author_meta('my_user_meta_field', $current_user->ID));\r\n\t\t\tbreak;\r\n\t}\r\n\r\n\treturn $value;\r\n}\r\n```\r\n\r\n### Please include any links to the page(s) demonstrating this issue (if possible).\r\nThe plugin is currently deactivated because it doesn't work.\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/eventespresso/event-espresso-core/issues/comments/330726341","html_url":"https://github.com/eventespresso/event-espresso-core/issues/245#issuecomment-330726341","issue_url":"https://api.github.com/repos/eventespresso/event-espresso-core/issues/245","id":330726341,"user":{"login":"tn3rb","id":1751030,"avatar_url":"https://avatars1.githubusercontent.com/u/1751030?v=4","gravatar_id":"","url":"https://api.github.com/users/tn3rb","html_url":"https://github.com/tn3rb","followers_url":"https://api.github.com/users/tn3rb/followers","following_url":"https://api.github.com/users/tn3rb/following{/other_user}","gists_url":"https://api.github.com/users/tn3rb/gists{/gist_id}","starred_url":"https://api.github.com/users/tn3rb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tn3rb/subscriptions","organizations_url":"https://api.github.com/users/tn3rb/orgs","repos_url":"https://api.github.com/users/tn3rb/repos","events_url":"https://api.github.com/users/tn3rb/events{/privacy}","received_events_url":"https://api.github.com/users/tn3rb/received_events","type":"User","site_admin":false},"created_at":"2017-09-20T02:21:59Z","updated_at":"2017-09-20T02:21:59Z","author_association":"MEMBER","body":"bah sorry... scrap what I wrote above... end of the day for me here and I read your response incorrectly....\r\n\r\n> I only want to set the default before the form is displayed.\r\n\r\nthen try the `FHEE__EE_SPCO_Reg_Step_Attendee_Information___generate_question_input__input_constructor_args` filter which is also in that same emthod as the other EE_Question filter. This one however filters the input options used to generate each form input. The default value for the input is specified by the value set in `$input_constructor_args['default']`. So whatever you set there will be used as the default input value and NOT affect what the user enters if the form is refreshed, or has to be resubmitted due to validation errors."}}
{"actor":{"display_login":"tn3rb"}}