Modal Survey – WordPress Poll, Survey & Quiz Plugin changelog
Release notes for every version you can download from GPL Times, newest first.
- Latest 2.0.2.3.7 · 12 Nov 2026
- 32 versions
- Since Jun 2026
4 fixedJoin nowShow changesHide
Fixed
- Bug Fixes: Fixed conditions disappearing after saving a survey and reopening it. Saving stored the survey options as valid JSON, but every place that read them back (the survey editor, the front-end survey, the admin/auto-response emails, the REST API and the Participants page) first ran stripslashes() on the stored value. Conditions are stored as JSON strings nested inside the options, so their escaped quotes were removed and the whole options array could no longer be decoded. The editor then showed every survey setting at its default value (no conditions, default styles and texts), the next save permanently overwrote the stored settings with these defaults, and the conditions were not applied on the front end. The same happened to any survey whose texts contained a double quote. Options are now decoded as stored, and stripslashes() is only applied as a fallback for surveys saved by older versions, so existing surveys keep loading.
- Fixed saving a survey producing invalid, unreadable options when a text contained HTML with attributes (e.g. a Thank You message or a condition message with <p class="..."> or <a href="...">). wp_kses_post() was applied to the raw JSON string, which rewrote the escaped attribute quotes and broke the JSON. The options are now decoded first and wp_kses_post() is applied to each text value individually (including each field of every condition), so disallowed HTML such as scripts and event handlers is still removed while the JSON stays valid. Invalid options are now rejected with an error instead of being stored.
- Fixed "&" characters in condition redirect URLs and other plain-text options being saved as "&", which broke redirect URLs with more than one query parameter.
- Fixed saving a survey failing with "error: invalid survey data" (or a new survey being created without its questions) when a question or answer contained a double quote or a backslash. The questions were unslashed twice before decoding. The questions are now also validated before the survey settings are updated, so a rejected save no longer stores the new settings with the old questions.
- 2.0.2.3.6Join now
1 new1 improved2 fixedJoin nowShow changesHide
New
- Added "%%ANSWERS%%" as an alias of the [listofanswers] Auto Response smart tag.
Improved
- Documented the [name] and [listofanswers] Auto Response smart tags.
Fixed
- Fixed Auto Response emails showing long hash codes (e.g. "{1fcc73...}{1fcc73...}ANSWERS{1fcc73...}{1fcc73...}") instead of the participant's answers. Since WordPress 4.8.3, wpdb temporarily replaces every "%" with a per-request "{sha256 hash}" placeholder while building a query; some database migration, backup or search-replace tools write these placeholders into the database permanently, so a "%%ANSWERS%%" tag (or any "%" character) in the Auto Response was sent out as raw hashes. send_autoresponse() now restores these placeholders to "%" in the message, subject and sender name before rendering.
- Fixed the [listofanswers] Auto Response smart tag rendering an empty list (with "Undefined variable $fullrecords" / "foreach() argument must be of type array" PHP warnings) when the message did not also contain [score] or [correct]. The participant's records were only loaded for the score tags; they are now loaded whenever [listofanswers] is used.
- 2.0.2.3.5Join now
1 improved1 fixedJoin nowShow changesHide
Improved
- Fixed "TypeError: modalSurveyChart.generateLegend is not a function" when preparing charts for the PDF export. generateLegend() was removed in Chart.js v3, and the plugin ships Chart.js v4.5.1 (msChart.min.js). The color legend for each answer in the PDF is now built directly from the chart's own colors, so each answer in the PDF again shows a color swatch matching its slice in the chart.
Fixed
- Bug Fixes: Fixed the survey PDF export ("Export Charts" and "Export without Charts" in the Saved Surveys export menu) and all other survey exports (CSV, JSON, XML, XLS, TXT) doing nothing, with the browser console reporting "ReferenceError: export_survey is not defined". The export_survey() function in templates/assets/js/modal_survey_admin.js had been accidentally renamed to "questio", so every export button called a function that no longer existed. The function name has been restored. Personal (participant) exports were not affected.
- 2.0.2.3.4Join now
1 improved1 fixedJoin nowShow changesHide
Improved
- Hardened how the ms-uid tracking cookie's value is generated: it previously reused PHP's own session_id(), which is tied to a shorter-lived, unrelated session mechanism and could occasionally return the same value for different visitors. It's now a dedicated random token, and the plugin no longer starts a PHP session on every anonymous page view (which could also prevent full-page caching on pages containing a survey).
Fixed
- Bug Fixes: Fixed a bug where the Participants admin page ("Votes" column) could show one participant with a wildly inflated vote count (e.g. 174) while unrelated, differently-named participants were missing entirely. The visitor-tracking cookie (ms-uid) is read on every survey submission and used to look up/create a row in the participants table via "WHERE id = ...". Whenever that cookie failed to reach the server for any reason (blocked by the browser/an extension, cleared, or the page load never set one because output had already started), the code used an empty string for this lookup. Since the id column isn't unique, every affected visitor's answers silently landed on whichever single existing row already had an empty id - merging many different real people's submissions into one innocent participant's record instead of creating their own. The participant lookup/creation now always uses a fresh, unique id when the cookie is missing, so each affected visitor gets their own record instead of colliding with someone else's.
- 2.0.2.3.3Join now
1 fixedJoin nowShow changesHide
Fixed
- Bug Fixes: Fixed category score totals being unexpectedly inflated (or otherwise wrong) whenever a category tag used the ":weight" syntax (e.g. "[Depression Indicators:5]") on an answer that also had a legacy per-answer "score" value set. Previously the two were multiplied together (score * weight * count), so a legacy score left over from before the weighting feature existed would silently distort every weighted category's total, only "working" if that legacy score happened to be exactly 1. Category totals now use the explicit weight on its own (weight * count) whenever a weight is specified, and only fall back to the legacy per-answer score (score * count) when no weight is present - matching the exact behaviour from before per-category weighting was introduced. No changes are needed for existing surveys; category tags without a ":weight" suffix behave exactly as before.
- 2.0.2.3.2Join now
2 fixedJoin nowShow changesHide
Fixed
- Bug Fixes: Fixed a scoring/results accumulation bug where participant answer scores could become misaligned and add up incorrectly, and where the admin Participants page could show a "Undefined array key" PHP warning (modal_survey.php around the participants/scoring code, called from templates/settings_participants.php). Two parallel internal arrays used to reconstruct each participant's per-question answers and their associated score values were built out of step with each other whenever an answer's stored value was exactly "0" (a legitimate score/open-answer value): the code only added an entry to the values array when the value was "truthy", which in PHP treats "0" as false and skips it, while the corresponding entry was always added to the other array. This caused every subsequent value in that participant's list to line up with the wrong entry, corrupting totals and producing missing-index warnings. Both occurrences now always keep the two arrays in lock-step, regardless of whether the value is empty or zero.
- Bug Fixes: Fixed radar/pie/doughnut/polar/bar/line chart shortcodes ([survey_answers style="radarchart"], etc.) failing to render on the front end with browser console errors "Cannot read properties of undefined (reading 'register')" and "Cannot set properties of undefined (setting 'legend')". The shipped templates/assets/js/modal_survey_answer.min.js file was a stale, pre-Chart.js-v4 build that still called the old Chart.js v2 plugin registration API (Chart.pluginService.register), which no longer exists in the Chart.js v4.5.1 library bundled with the plugin (msChart.min.js). Sites running with default WordPress settings (SCRIPT_DEBUG off) load the .min.js file, so this broke chart rendering for every visitor regardless of caching, browser, or theme. The minified file has been regenerated from the current, Chart.js v4-compatible source (modal_survey_answer.js) and verified to initialize charts without error.
- 2.0.2.3.1Join now
2 fixedJoin nowShow changesHide
Fixed
- Bug Fixes: Fixed PHP warnings ("Trying to access array offset on value of type null" and "Uninitialized string offset 142") when rendering the [survey_answers]/[modalsurvey] shortcode on the front end. The grid-columns setting (options index 142) was being read from a raw character offset of the still-JSON-encoded options string instead of the decoded options array, which produced garbage/undefined results and warnings whenever the options string was shorter than 143 characters. The options are now decoded once into an array before any index is read.
- Bug Fixes: Fixed a critical bug where the entire Modal Survey admin screen could silently stop working: the Save button did nothing (no request was ever sent), and creating a new survey would hang and then create a bogus survey with ID 0. The admin JavaScript wrapped all of its button handlers in the deprecated jQuery(window).load(function(){...}) shorthand. In modern jQuery this is not treated as an event binding; jQuery.fn.load() unconditionally tries to read the first argument as a URL string (url.indexOf(" ")), and since a function was passed instead, this throws an immediate TypeError that aborts the entire script before any click handlers are registered. Replaced with the standards-compliant jQuery(window).on('load', function(){...}), which restores Save, Create Survey, and all other admin interactions.
- 2.0.2.3.0Join now
1 fixedJoin nowShow changesHide
Fixed
- Bug Fixes: Fixed fatal PHP 8.x TypeError (Unsupported operand types: string / int) on line 546 of settings_savedforms.php, which crashed the Saved Surveys page when opening a survey whose options array did not contain a stored animation speed (options[11]) or end delay (options[23]). This affected older surveys that pre-dated these settings. The fix adds numeric defaults (400ms and 0ms respectively) in the options initialisation block so division by 1000 is always safe.
- 2.0.2.2.9Join now
1 fixedJoin nowShow changesHide
Fixed
- Bug Fixes: Fixed PHP warning "Attempt to read property 'display_name' on bool" appearing 22 times in the Saved Surveys list (settings_savedforms.php). When a survey's owner account has been deleted, get_user_by() returns false; the code now checks instanceof WP_User before accessing display_name, showing 'Unknown' as a fallback instead.
- 2.0.2.2.4Join now
11 securityJoin nowShow changesHide
Security
- Security Fixes (internal audit):
- Critical: Added current_user_can('manage_options') capability check to manual plugin updater; previously any WP user could trigger a plugin overwrite.
- Critical: Removed print_r($this->temp_path) debug statement disclosing the absolute server filesystem path on the Update admin page.
- Critical: Added version downgrade protection to manual updater; uploading an older plugin version is now rejected.
- Added esc_html() around version strings and esc_html() around changelog content read from uploaded ZIP in the updater.
- Changed throw_error() to use wp_kses_post() instead of raw echo.
- Added ['allowed_classes' => false] + is_array() guard to all unserialize() calls on participant .custom field data in settings_participants.php, settings.php (send_admin_email, send_autoresponse), and all four export modules (csv, xls, txt, xml).
- Added wp_verify_nonce() CSRF protection to all three participant delete operations (delete_samesession, delete_incomplete, bulk delete_participants).
- Escaped survey name with esc_html() in settings_savedforms.php survey title output.
- Wrapped all custom-field configuration properties ($cf->id, $cf->name, $cf->warning, $cf->minlength, $cf->position) with esc_attr() in the survey editor.
- Replaced plugin_dir_path() server path disclosure in import error message with a safe relative path.
- 2.0.2.2.3Join now
2 fixed9 securityJoin nowShow changesHide
Fixed
- Bug: Fixed incorrect number_format call in survey_answers average-score path; third argument was the decimal count instead of the decimal separator, producing garbled output.
- Bug: Fixed undefined variable warnings in survey_open_answers, survey_records, and survey_compare_chart shortcode handlers when results are absent or labels/sessions are not set.
Security
- Security & Bug Fixes:
- Critical: Fixed logic bug where assignment operator was used instead of equality check for survey style detection, causing all surveys to incorrectly use the 'click' branch.
- Critical: Fixed path traversal vulnerability in campaign module loader; allowed module names are now strictly whitelisted.
- Critical: Sanitized cookie-sourced survey_viewed arrays with absint() before use in SQL IN clauses to prevent injection via crafted cookie values.
- All plugin cookies (ms-uid, ms-session, modal_survey) now set secure=is_ssl() and httponly=true, including legacy fallback setcookie() calls.
- Replaced insecure mt_rand()-based session ID generation with cryptographically secure bin2hex(random_bytes(16)).
- Escaped featured image URL with esc_url() in Open Graph meta output.
- Fixed unsanitized direct $_COOKIE['ms-uid'] access in ajax_survey_back; now uses sanitize_text_field/wp_unslash with isset guard.
- Reduced export directory permissions from 0777 to 0755.
- 2.0.2.2.0Join now
12 improvedJoin nowShow changesHide
Improved
- Completion Flow & PDF Export Improvements:
- Refactored survey completion flow to separate lightweight answer saving from mail/PDF finalization, reducing timeout risk for large exports.
- Added client-side canvas snapshot capture: survey result charts are now captured as base64 PNG data before mail/PDF generation begins.
- Implemented new
finalizeAJAX endpoint in settings.php to trigger mail and PDF exports after charts have been fully rendered on the client. - Enhanced front-end chart initialization with MutationObserver fallback to handle late-injected markup and delayed script loading gracefully.
- Updated modal_survey.js to track pending completion mail state and conditionally defer mail sending until after chart rendering completes.
- Improved modal_survey_answer.js with
window.ModalSurveyCaptureChartData()helper to extract chart canvases as base64 payloads for PDF embedding. - Result charts in generated PDFs now display the exact chart rendered to the user, eliminating missing or placeholder images.
- Documentation & Compatibility:
- Split completion request into two lightweight phases, improving reliability on servers with stricter timeout limits.
- Chart images are now properly embedded in PDF exports by capturing rendered Chart.js canvases on the client side.
- Bootstrap logic for answer charts is now resilient to DOM delays and late script injection, common in page builders and AJAX-heavy themes.
- 2.0.2.1.8Join now
1 improved7 fixed1 securityJoin nowShow changesHide
Improved
- Hardened the participant details view and list rendering so custom field labels/values are escaped before HTML output, this blocks execution even for already-poisoned records stored in the database.
Fixed
- Sanitized attacker-controlled custom field keys before storage.
- The form branch in ajax_survey_answer now unslashes and sanitizes each customfieldsarray[] key before using it as an array key.
- Empty keys are skipped.
- Corresponding values are unslashed and sanitized before save.
- Escaped legacy and current participant custom data on admin output in settings_participants.php
- Escaped other participant-derived fields shown in the same page (name, email, IP, survey title links, session attributes).
- Prevented undefined index behavior for the Summary tab when there are no sessions
Security
- Implemented a direct mitigation for the reported unauthenticated stored XSS path, covering both ingestion and rendering.
- 2.0.2.1.7Join now
2 new4 improvedJoin nowShow changesHide
New
- Added a retry-based bootstrap loop (polling with timeout) instead of immediate execution.
- Added fallback mounting to body if .entry-content is missing (answer init).
Improved
- Added dependency checks before init: jQuery exists, plugin method exists (pmsresults or modalsurvey), localized params exist (ms_answer_init_params or ms_init_params).
- For answer init, waits for Chart only when chart styles are present.
- Added graceful timeout with console warning instead of throwing hard errors.
- Kept DOMContentLoaded-safe startup for both scripts.
- 2.0.2.1.6Join now
1 new1 improvedJoin nowShow changesHide
New
- New Helper Method: Introduced a utility to safely read server variables using wp_unslash for improved data handling.
Improved
- Security Refactor: Replaced raw REQUEST_URI usage with the new helper method during constructor URL assembly to ensure consistent sanitization.
- 2.0.2.1.5Join now
4 improvedJoin nowShow changesHide
Improved
- Refactored Request Handling: Introduced helper methods to standardize $_REQUEST access.
- Code Cleanup & Modernization: Replaced raw $_REQUEST reads with helper methods
- Security & Consistency: Implemented consistent wp_unslash() and string sanitization across touched paths.
- Logic Simplification: Streamlined sspcmd=displaychart conditionals for improved readability without altering functional behavior.
- 2.0.2.1.4Join now
3 improved1 fixedJoin nowShow changesHide
Improved
- Hardened the main AJAX answer flow
- Replaced deprecated utf8_encode usage with a safe UTF-8 normalization helper
- Declared legacy status properties to prevent dynamic-property deprecation warnings
Fixed
- Fix PHP 8.2 deprecation notices
- 2.0.2.1.3Join now
1 fixedJoin nowShow changesHide
Fixed
- Fix hiding method at the end
- 2.0.2.1.1Join now
8 improved1 fixedJoin nowShow changesHide
Improved
- Refactored participant cleanup
- Hardened social meta handling
- Sanitaze inputs, post and other variables
- Replaced long OR chain with strict in_array(..., true) screen check.
- Replaced legacy var properties with protected typed properties.
- Standardized several loose comparisons (==) to strict (===) for options checks.
- Hardened server vars
- Fix code standard issues
Fixed
- Fix dynamic-property issues on modern PHP.
- 2.0.2.1.0Join now
14 improved2 fixedJoin nowShow changesHide
Improved
- Update Excel export: remove outdated PHPExcel and migrate the code to PHPSpreadsheet
- Update colorpicker plugin
- MySQL 8.0 Compatibility
- Modify Column Width Logic
- Total Votes Calculation: fix a small bug in how the total votes are displayed in the general survey export
- Fix Code Standards Issues
- Fix datepicker bugs, positioning
- Fix Modal width and button positions
- Fix wrong modal width
- Fix some admin page issues
- Fix WP Dashboard Votes by Day window
- Fix Unsanitized variables
- Fix Email Header Injection
- Strengthened Nonce Verification
Fixed
- Fix REST API Bug
- Fix Syntax Error in Path Construction
- 2.0.2.0.9Join now
1 improved1 fixedJoin nowShow changesHide
Improved
- Fix output method for social metas
Fixed
- Fix data saving
- 2.0.2.0.8Join now
1 improved1 fixedJoin nowShow changesHide
Improved
- Fix input values processing
Fixed
- Fixed the deletion of the survey data
- 2.0.2.0.6Join now
1 improvedJoin nowShow changesHide
Improved
- Updated Chart.js to v4.5.1
- 2.0.2.0.5Join now
1 improved1 fixedJoin nowShow changesHide
Improved
- Refactored some of the code for better compatibility
Fixed
- Fixed minor bugs
- 2.0.2.0.4Join now
3 fixedJoin nowShow changesHide
Fixed
- Fix some Chart problem
- Fixed minor bugs
- Fixed JS conflicts
- 2.0.2.0.3Join now
1 improved2 fixedJoin nowShow changesHide
Improved
- Documentation improvement and addition
Fixed
- Fix non-existent domain (in the document, in the plugin, on the CC website)
- Http to https fix (in the document, in the plugin, on the CC website)
- 2.0.2.0.2Join now
2 improved1 fixedJoin nowShow changesHide
Improved
- Improved MS admin update page
- Security improvements (MS admin update page and MS admin custom css page)
Fixed
- Fixed MS admin update page PHP 8.3.9 issue
- 2.0.2.0.1Join now
1 improved1 fixedJoin nowShow changesHide
Improved
- Minor optimization
Fixed
- Fixed minor bugs
- 2.0.1.9.9Join now
1 improvedJoin nowShow changesHide
Improved
- Minor optimization
- 2.0.1.9.7Join now
1 improvedJoin nowShow changesHide
Improved
- Minor optimization
- 2.0.1.9.6Join now
1 new1 fixedJoin nowShow changesHide
New
- Added option to translate the Thank you message dynamic string
Fixed
- Fixed minor CSS issue on the Participants Form in specific cases
- 2.0.1.9.5Join now
1 new1 improvedJoin nowShow changesHide
New
- Added option to show the survey as likert scale style
Improved
- Automatically removing spaces from email address on the participants form