When I want to Edit in a poll "Add another choice"
Drupal save a new choice but without text
example
Do ..................... ?
1-Yes
2-No
when trying edit in this poll and add a new choice it will be
Do ..................... ?
1-Yes
2-No
3-

whit out saving a text to the new poll

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Shyamala’s picture

Unable to replicate this in Drupal 7.7. More over in Drupal 7.7 the button to add choices reads More choices and not Add a new choice.

catch’s picture

Status: Active » Postponed (maintainer needs more info)

Looks like this needs more information.

ahm_hefni’s picture

Status: Postponed (maintainer needs more info) » Active
FileSize
23.35 KB

About my steps
1- After downloading drupal 7.7 and enable the poll module
2- I Added a new poll
what is your Favourite color?
1-white
2-green
then saving the poll

after that I want to add more choice "blue"
so I press Edit then More Choices and add the blue in the last textbox
after saving the text of the last choice "blue" is empty as the Image
I hope you can help me

marcingy’s picture

This issue can be replicated following the steps above on the second edit no text is saved for any of the poll choices although the choices themselves do appear on the page as radio buttons. The values themselves are not present in the database.

xjm’s picture

Version: 7.7 » 8.x-dev

I duplicated this bug using the steps to reproduce in #3.

marcingy’s picture

Status: Active » Needs review
FileSize
2.12 KB

Seems like it was a bad merge query. Patch and test provided.

xjm’s picture

+++ b/includes/form.incundefined
@@ -283,6 +283,8 @@ function drupal_build_form($form_id, &$form_state) {
   if (!isset($form_state['input'])) {
     $form_state['input'] = $form_state['method'] == 'get' ? $_GET : $_POST;
+	//print_r($_POST);
+	//die();

Some leftover test code. :)

Functionally, I confirmed that the patch resolves the issue.

13 days to next Drupal core point release.

marcingy’s picture

doh

xjm’s picture

Status: Needs review » Reviewed & tested by the community

I confirmed that:

  • The patch looks fine.
  • The test in the patch fails without the fix and passes with it.
  • The patch resolves the issue.
ahm_hefni’s picture

Status: Reviewed & tested by the community » Closed (fixed)

Thanks,

marcingy’s picture

Status: Closed (fixed) » Reviewed & tested by the community

This hasn't been committed to core yet it needs to stay open until it is!

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.x and 7.x, with a minor edit to the comment ("went -> when").

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.