Repository navigation
Fix regressions from PRs merged since 7.1.1 - #3766
Crabcyborg wants to merge 5 commits into
Conversation
Settings far from the viewport load only when needed, so code that read another field's settings before they arrived found nothing. Refill a logic value dropdown once its source field's settings load, keeping the chosen value, and refresh the calculation field list once the settings it checks for excluded options arrive. When a dependent field's settings fail to load during a choice rename, queue the logic remap and replay it on that field's rows when its settings load later. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The field sources and the field chunks are saved in separate transients, so two requests building the list at once could store one's sources with the other's fields. Save a signature of the field list with the sources and rebuild when it does not match. Key the per-request cache by blog as well as form, so a list loaded before switch_to_blog() is not reused for another blog. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The frm_update_entry_meta filter runs before the unchanged check, so a listener that keeps state from it never heard back when the write was skipped. Fire frm_entry_meta_unchanged on the skip path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
npm passed --no-cache to every add-on's own build script, and sass rejects it, which stopped the formidable-surveys release. Remove the webpack cache folder before building instead. Install Lite's dependencies when its closure compiler is missing, since add-ons minimize with it. Clear the webpack cache when .browserslistrc or package.json changes, so a cached build cannot keep stale bundles. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Lite loads JS strings from JSON translations, and language packs leave them out of the PHP translations, so an add-on string moved to the formidable domain because Lite used it only in JS showed in English. Skip .pot entries whose references are all scripts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 8 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
There was a problem hiding this comment.
Approve, with non-blocking notes and one gap I could not close (below).
Tests run: phpunit -c phpunit.xml --filter 'test_FrmFieldTransientCache|test_FrmEntryMeta' at eb3571a → 25 OK (90 assertions); --filter test_FrmField → 200 OK; node --test tests/js/*.test.mjs → 88 pass. Three mutants each fail their test: signature check ignored (test_sources_from_another_field_list_are_rebuilt), do_action removed (test_update_entry_metas_skips_unchanged_values), blog ID dropped from the request-cache key (test_request_cache_is_kept_per_blog). php-cs-fixer is clean on all five changed PHP files. CI skipped PHPCS, PHPStan, Mago, ESLint, Oxlint and Cypress at this head. I ran ESLint on admin.js (only two "rule definition not found" errors from my local sonarjs install). I could not run PHPCS (the harness vendor has no WPCS).
Checked and fine: the field-cache signature, the frm_entry_meta_unchanged action placement, the .pot parsing in the sniff, and the build-plugin.sh change (bash -n clean, lite_dir is resolved before the cd). I probed the sniff on a synthetic .pot: JS-only entries are dropped, and mixed, no-reference and msgctxt entries are kept. On the real languages/formidable.pot the sniff now loads 2,734 msgids against 2,905 before.
Not verified, please close it:
- Live repro of the logic/calc regressions. I built a 133-field form in the preview env, with a radio at the far end, and set the logic field to it. The value dropdown filled on both master's bundle and this PR's bundle, even with a 3s server delay on
frm_load_field_settings. The far field's settings were already in the page when I chose it, so I never reached the empty-dropdown state. That proves nothing for or against the fix. Testing step 2 (hold the request for one far field) is the one that would reach it. Install the hold before page scripts run, because my override installed after load missed requests that were already queued. ThependingLogicUpdatesreplay and the calc-list refresh are source-reviewed only. bin/build-plugin.shwas not run as a release build (the description says the same).- Committed bundle:
js/formidable_admin.jscontains the new source. A local rebuild in my scratch path differs at least in webpack module ids, and I did not prove full equivalence.
Non-blocking:
- The sniff change has no fixture in
phpcs-sniffs/tests/fixtures, although the repo has a harness for that. test_request_cache_is_kept_per_blogonly checks the key's shape. It never callsswitch_to_blog, so the multisite behaviour is untested.
Fixes regressions found while auditing the Lite and Pro PRs merged since v7.1.1.
What changed
frm_entry_meta_unchangedaction (from Skip entry meta updates when the value has not changed #3734). Thefrm_update_entry_metafilter runs before the unchanged check, so a listener keeping state from it never heard back when the write was skipped. The companion fix in formidable-code-field (https://github.com/Strategy11/formidable-code-field/pull/3) listens to it.npm run build -- --no-cachepassed the flag to every add-on's own build script, and sass rejects it, which stopped the formidable-surveys release. The script now removesnode_modules/.cache/webpackbefore building. It also runsnpm ciin Lite when Lite's closure compiler is missing, since Pro and other add-ons minimize with it. The webpack cache now also resets when.browserslistrcorpackage.jsonchanges, so a cached build cannot commit stale bundles.formidabledomain because Lite used them only in JS showed in English. The sniff now ignores.potentries whose references are all scripts. Pro's fix: https://github.com/Strategy11/formidable-pro/pull/7051.Merge note: once the sniff change is on master, these add-ons report UsePluginDomain errors until
phpcbf --sniffs=Formidable.Translations.UseSharedTranslationDomainis run on them: cart (2), events (2), image-editor (3), media-field (1), projects (1), quizzes (1), rating-icons (1). Pro is handled in its companion PR.Testing
admin-ajax.php?action=frm_load_field_settingsfor one far field whose logic uses a choice field (devtools request blocking), rename that choice, unblock, then select the far field. Its logic row shows the new value.~/test.sh --filter 'test_FrmFieldTransientCache|test_FrmField|test_FrmEntryMeta'. The new tests fail without the fix.npm run test:jspasses (88).php phpcs-sniffs/tests/run.phppasses..browserslistrctoie 11and runnpm run build:jstwice with the cache.js/frm_testing_mode.jshas no arrow functions on the second build.Verified locally: PHPUnit for FrmField (200 tests) and FrmEntryMeta (14), JS tests, phpcs, phpstan, php-cs-fixer, rector and mago on the changed PHP files, and the first two testing steps in a headless browser on form 650. Not run: an actual add-on release build.
🤖 Generated with Claude Code