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

#4179: Dataset ComplexDataFacade returning wrong empty value #4180

Open
wants to merge 1 commit into
base: 2.x
Choose a base branch
from

Conversation

stefan-korn
Copy link
Contributor

@stefan-korn stefan-korn commented May 6, 2024

fixes #4179

@dafeder
Copy link
Member

dafeder commented May 13, 2024

@stefan-korn I'm not sure about this -- can you give an example case where $dist->{$matches[2]} would be unset?

@stefan-korn
Copy link
Contributor Author

@dafeder : Have you read the description in #4179 ? I cannot reproduce this on plain DKANv2, only with our customized schema. But it should not return an empty array as value there, this is wrong in my opinion.

@dafeder
Copy link
Member

dafeder commented May 21, 2024

@stefan-korn I did read it, I'd like to observe the behavior before and after the fix to properly review. Can you post an example schema that would let me reproduce the issue?

@stefan-korn
Copy link
Contributor Author

@dafeder : I am attaching an example of dataset.json which can produce the issue. There is new property "dctconformsto" in the distribution (as an array of objects).
The steps to reproduce the issue are:

  • add a dataset with a distribution that has this property filled (once or more).
  • add the property to the search index DKAN.
  • Reindex the search index
  • indexing will fail with Error: Object of class stdClass could not be converted to string in Drupal\search_api\Plugin\search_api\data_type\StringDataType->getValue() (line 23 of /var/www/plain-dkan/docroot/modules/contrib/search_api/src/Plugin/search_api/data_type/StringDataType.php).

dataset.json

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.

Dataset ComplexDataFacade returning wrong empty value
2 participants