Skip to content

Commit c800df4

Browse files
committed
- Fixed "INVALID FIELDS" alert and block size formatting issues with large collections like Infolist particle (#3243)
1 parent d300770 commit c800df4

File tree

4 files changed

+40
-51
lines changed

4 files changed

+40
-51
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
- Removed support for PHP versions below 8.1
1616
- Added documentation about CSP requirements - 'unsafe-eval' is needed for admin functionality (#3255)
1717
3. [](#bugfix)
18+
- Fixed "INVALID FIELDS" alert and block size formatting issues with large collections like Infolist particle (#3243)
1819
- Fixed incorrect formatting in changelog file (#3305)
1920
- Fixed missing translation on WordPress for "Content" tab (#3302)
2021
- Fixed unwanted whitespace before DOCTYPE in Grav platform HTML output (#3287)

package-lock.json

Lines changed: 25 additions & 49 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

platforms/common/application/fields/submit.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,13 @@ var submit = function(elements, container, options) {
4141
}
4242

4343
if (override && !override.checked()) { return; }
44-
if (!validateField(input)) { invalid.push(input); }
44+
45+
// Fix for large collections (issue #3243): ensure Block Size field is properly handled
46+
// Skip validation for empty block size field but still include it in the form submission
47+
var skipValidation = name && name.indexOf('block-size') !== -1 && (!value || value === '');
48+
if (!skipValidation && !validateField(input)) {
49+
invalid.push(input);
50+
}
4551

4652
if (isArray(value)) {
4753
value.forEach(function(selection) {

platforms/common/js/main.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1246,7 +1246,13 @@ var submit = function(elements, container, options) {
12461246
}
12471247

12481248
if (override && !override.checked()) { return; }
1249-
if (!validateField(input)) { invalid.push(input); }
1249+
1250+
// Fix for large collections (issue #3243): ensure Block Size field is properly handled
1251+
// Skip validation for empty block size field but still include it in the form submission
1252+
var skipValidation = name && name.indexOf('block-size') !== -1 && (!value || value === '');
1253+
if (!skipValidation && !validateField(input)) {
1254+
invalid.push(input);
1255+
}
12501256

12511257
if (isArray(value)) {
12521258
value.forEach(function(selection) {

0 commit comments

Comments
 (0)