Skip to content

Add 'document' as content type in case if it's defaulted due to plugin error#2127

Merged
Seiger merged 1 commit intoevolution-cms:3.2.xfrom
elcreator:3.x
Sep 27, 2023
Merged

Add 'document' as content type in case if it's defaulted due to plugin error#2127
Seiger merged 1 commit intoevolution-cms:3.2.xfrom
elcreator:3.x

Conversation

@elcreator
Copy link
Copy Markdown

is_scalar is not enough validation as it not checks for empty value.

Way to reproduce the original issue - insert table with i.e. 200 rows to the multiTv input, with 7 text inputs (columns) in multiTV and save.
It will not fail if you create 20 not 200 records it will save successfully, otherwise $content['type'] becomes empty and document loses Published status

…n error

is_scalar is not enough validation as it not checks for empty value
@elcreator
Copy link
Copy Markdown
Author

image
For everyone concerned about reality of this scenario and why it's should be fixed here and not only at MultiTV module/snippet level:
The way PHP limits extra fields (by default every field after first 1000) is just by removing them from $_POST array
https://www.php.net/manual/en/info.configuration.php#ini.max-input-vars
I.e. if snippet/plugin/module uses more than max-input-vars fields in the POST, this variable (and not only this one but also "published" etc) becomes empty.

@Seiger Seiger merged commit 5d3ed46 into evolution-cms:3.2.x Sep 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants