Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix MassiveSearchExpressionLanguage with object/stdClass for block settings #175

Conversation

popoplanter
Copy link
Contributor

Fixes search reindex for ArticleDocument and PageDocument by catching NoSuchIndexException

@alexander-schranz
Copy link
Member

alexander-schranz commented Feb 8, 2024

Settings when empty are a \stdClass this currently required because how JSON Serializer works as empty array is converted to [] but the frontend expect an object {} for the Sulu JADMIN and so it is \stdClass which seems to fail currently in the massive search bundle property accessor. The NoSuchIndexException is throw when tried access a object by array selectors. This way we avoid currently this error and return the default value. /cc @wachterjohannes

@wachterjohannes
Copy link
Member

@popoplanter the change seems legit! but please fix php-cs

@alexander-schranz alexander-schranz changed the title Update MassiveSearchExpressionLanguage.php Fix MassiveSearchExpressionLanguage with object/stdClass for block settings Feb 8, 2024
@alexander-schranz alexander-schranz merged commit 3d1b065 into massiveart:2.8 Feb 8, 2024
6 checks passed
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.

3 participants