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

GetMappedResult returns null for IEnumerable<IContentItemFieldsSource> #354

Open
twozero6 opened this issue Feb 19, 2025 · 4 comments
Open

Comments

@twozero6
Copy link

Brief bug description

For all migrated items, GetMappedResult returns null for IEnumerable fields on the migrated types.

These are typically "Legacy Media" items. The media item is visible in the selector when editing the migrated page in the content tree. It is also possible to click "Edit" on the media item, and it correctly goes to the Edit screen in the Content Hub, where the image is also visible.

To work around the issue, I need to deselect the content item on the Page in the tree and then re-select the same content item. Once I do that, GetMappedResult correctly returns the content item in the property of that page. Additionally, if there are 3 different properties of type IEnumerable that are initially null, deselecting then reselecting just one will "fix" all three properties.

Output logs

There are no errors related to the page and content items in question.

Repro steps

  1. Go to a migrated page in the content tree and note that media items are visible
  2. Query the page with the ContentQueryExecutor.GetMappedResult and note that the media fields \ properties are null
  3. Go to the migrated page in the tree, deselect the media item, then reselect it
  4. Query the page with the ContentQueryExecutor.GetMappedResult and note that the media fields \ properties are populated

Test environment

v30.1.1

@akfakmot
Copy link
Collaborator

Hi @twozero6,

is the database, that your query operates on, a result of migration by the newest MT release (2.4.0) or some previous version. If it was migrated by older version, is it possible to remigrate using 2.4.0? We've fixed a similar issue in 2.4.0.

If remigration is not possible, I would ask you for .bak backup of your disfunctional database. I'd be able to identify if the fixed bug is the root cause and provide a patch script.

Thanks

@twozero6
Copy link
Author

Hi @akfakmot, I just upgraded to 2.4.0 and confirmed I am seeing the same issue. Let me know if a copy of my DB would be helpful. Thank you!

@akfakmot
Copy link
Collaborator

@twozero6 Thanks. Yes, a copy of the source database is a guaranteed way to find out what's wrong

@twozero6
Copy link
Author

@akfakmot I uploaded it to the same shared drive as before. It's the one ending in ***-com-2020 - I uploaded both a bacpac and a bak file. Thank you!

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

No branches or pull requests

2 participants