# Changelog for FetchIt

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [3.1.4] - 2026-09-09

### Fixed

- Form-level success and validation messages now update in the form on AJAX submit via `[data-success]` and `[data-validation-error]` (#15). Custom templates need these attributes instead of `[[+fi.success:…]]` conditionals for AJAX.
- Whitespace-only FormIt field errors (e.g. `fi.error.email`) no longer mark the form as failed (#14). Placeholders are sanitized with `strip_tags` and `html_entity_decode`; blank `validation_error_message` falls back to the lexicon key.
- PHP 8 warning for undefined `$_SESSION['fetchit_called']` in `registerScript()` (#13).
- PHP 8 warnings for undefined `$_SESSION['FetchIt']` when saving or reading snippet properties.
- Dead `!isset($_POST)` check in `action.php` replaced with `empty($_POST)` so GET requests redirect correctly.
- Custom `successMessage` from the FetchIt snippet call is used in the AJAX success response.

### Changed

- Frontend build dependencies bumped to Rollup 4; CI and release workflows added for the `next` branch (MODX 3.2.4-pl build host).

## [3.1.3] - 2026-07-21

### Fixed

- Fatal error `Serialization of 'PDO' is not allowed` on frontend with MODX 3.2.2+ / PHP 8.3+ (#17).
  Action properties are no longer stored with the FetchIt instance; custom snippets should use `$modx->services->get('FetchIt')`.

## [3.1.2] - 2023-11-11

### Added

- Added error for Recaptcha V3.

### Changed

- Fixed when MODX installed not in the root.

## [3.1.1] - 2023-07-14

### Changed

- Fixed support in php 8.

## [3.1.0] - 2023-06-12

### Added

- Default notifier.

## [3.0.0] - 2023-06-06

### Added

- MODX 3 support.

## [1.0.1] - 2023-03-21

### Changed

- Fixed undefined fetchit bug when snippet calls by fenom.

## [1.0.0] - 2023-03-10

### Changed

- Fixed undefined variable $hash.

## [1.0.0-beta] - 2023-02-20

### Added

- First init.
