ajaxSubmit is checking for the wrong data type in the $settings array

Created on 20 March 2025, 16 days ago

Problem/Motivation

in ajaxSubmit() in BaseRatingForm.php we are checking for the wrong typeof variable.

For example if($settings['show_results'] === '1') but other settings are similarly checked like this in the submit hander

This is a boolean and not a string anymore andcauses the summary not be shown on ajax submit.

Will provide a MR.

πŸ› Bug report
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States loze Los Angeles

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @loze
  • Merge request !35check for boolean value not string β†’ (Open) created by loze
  • πŸ‡ΊπŸ‡ΈUnited States loze Los Angeles

    It was only these 2 places, but this gets it working correctly.

  • Pipeline finished with Failed
    16 days ago
    Total: 144s
    #453176
  • πŸ‡ΊπŸ‡ΈUnited States tr Cascadia

    Yes, thanks for finding that. Maybe the form definition for readonly, show_own_votes, and show_results also need to be changed a bit in VotingApiFormatter? They are checkbox elements, so I think they need a #return_value of TRUE if we want to keep these config settings booleans?

  • Pipeline finished with Failed
    15 days ago
    Total: 141s
    #454187
Production build 0.71.5 2024