Closed bgyori closed 3 years ago
I think in general TextContentSessionHandler
is the more modern tool. I think the other is a holdover short-cut function that is pretty deprecated in it methodology.
So should this function be removed if this fix is not meged?
That is a good point, it probably should be. Let us double check and make sure no one is using it. I believe it was Albert that initially created the function for use with Adeft (or else I did at his request), and has since abandoned it in favor of TextContentSessionHandler
.
We should keep this open until it is resolved or we will forget!
Found this PR because also tried using get_content_by_refs
and had similar issues. TextContentSessionHandler
works but doesn't allow to specify text type (for the case when we're only interested in one type of content, e.g. title).
I will merge this fix once Klas's PR is merged. We can come back to optimizing access to the text content in the database at a later date.
I tried
get_content_by_refs
to fetch some text content and ran into and issue with passing only atrid_list
that this PR fixes. But then found that this function doesn't return for a really long time (maybe deprecated?) so as an alternative, I'm usingTextContentSessionHandler.get_text_content_from_text_refs
, which seems to work well.