The next version will fix this edge-case, but for now I can propose another workaround.
The quick & dirty way is to assign these posts to a new thread.
This will get a list of affected post_id. If this is a just a few it is easy to just
This happens because there is a report for a still existing post that has had it's thread hard-deleted. This shouldn't happen.Just updated 2.13.x -> 2.14.8
ErrorException: [E_WARNING] Attempt to read property "prefix_id" on null src/addons/SV/ReportImprovements/Job/Upgrades/EnrichReportPostInstall.php:63
The quick & dirty way is to assign these posts to a new thread.
SQL:
select xf_report.content_id
from xf_report
straight_join xf_post on xf_report.content_id = xf_post.post_id
left join xf_thread on xf_thread.thread_id = xf_post.thread_id
where xf_report.content_type = 'post' and xf_thread.thread_id is null
This will get a list of affected post_id. If this is a just a few it is easy to just
update xf_post set thread_id = ? where post_id = ?
otherwise it make take a little more work.