Skip to content

Conversation

martinlagler
Copy link
Contributor

@martinlagler martinlagler commented Apr 9, 2025

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Related issues/PRs sulu/SuluHeadlessBundle#147
License MIT

What's in this PR?

Cast the smart_content page parameter to int before comparing.

Why?

Because otherwise the value is too big for Elasticsearch and an error is thrown...

{"error":{"root_cause":[{"type":"input_coercion_exception","reason":"Numeric value (1.1068046444225731e+20) out of range of int (-2147483648 - 2147483647)\n at [Source: (org.elasticsearch.common.io.stream.ByteBufferStreamInput); line: 1, column: 354]"}],"type":"input_coercion_exception","reason":"Numeric value (1.1068046444225731e+20) out of range of int (-2147483648 - 2147483647)\n at [Source: (org.elasticsearch.common.io.stream.ByteBufferStreamInput); line: 1, column: 354]"},"status":500}

?page=zh1m6

@martinlagler
Copy link
Contributor Author

@alexander-schranz Maybe this should also be changed (https://github.com/sulu/sulu/blob/2.6/src/Sulu/Component/SmartContent/ContentType.php#L335)
as \PHP_INT_MAX is to big and breaks ES.

@martinlagler martinlagler added the Bug Error or unexpected behavior of already existing functionality label Apr 9, 2025
@alexander-schranz alexander-schranz merged commit c30a960 into sulu:2.6 Apr 10, 2025
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Error or unexpected behavior of already existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants