• I’m curious why the behavior of select values was changed in 7.5.2, and not announced. Things that check the value of posted data to redirect things, such as the method used for redirecting mail with pipes example that has frequently caused users problems may once again start causing problems for users as a result of the documentation no longer matching the functionality.

    It would seem that even a single select dropdown (does not allow for multiple selections) now arrives in the back as an array, rather than a single value, which makes things that check the value from posted_data no longer function because all that it will compare against now is ‘Array’.

    This is in relation to a more complicated version of the example, which redirects based on the user’s state, which are grouped together in a hooked function, along with functionality to modify output on the Thank You page. However, when the posted data goes from [‘your-state’ => ‘value’] to [‘your-state’ => [‘0’ => ‘value’] ], it is suddenly harder to verify data, especially when such a change is not announced in the changelog.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    Where can we see the website in question?

    Thread Starter catnaveo

    (@catnaveo)

    The website is xactedm.com, but the impacted functionality is purely on the sending side, through hooked functions.

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    On which page on the site do you have the form having the issue?

    but the impacted functionality is purely on the sending side, through hooked functions.

    Not sure if I understand your issue correctly. If you mean you have customized the plugin’s behavior through a filter or action hook, post the code, please.

    Thread Starter catnaveo

    (@catnaveo)

    It is the RFQ page. And, as indicated in the last paragraph, it is a hooked function. I’ve included the majority of the relevant code (via gist), both as 7.5.1.7 where it worked one way, and after where it has new requirements.

    It is using pipes to have different values than what is displayed in the form, which after some digging, I finally found a comment online about the front-end of the form not being where that was broken, as it uses the label as the value on the front, but uses the defined value by pipes on the back via posted_data. Since the label value is not the one we need, nor using, I cannot use $_POST.

    It just seems an odd change to happen suddenly between minor versions. I’m trying to understand the change, and why it doesn’t appear to have been part of the changelog, since it is affecting a rather simple accessor of single value variables.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Behavior Change in Select Value Submitted Data’ is closed to new replies.