Author search returns error sometimes after upgrade

Describe the issue or problem
On post post upgrade from 3.1.1 to, we receive multiple template errors on the search/author page, for authors which has submissions(?) which don’t have an Issue (when I inspect with smarty debug). This is a long lived OJS which has been previously upgraded from 2.x.

The error output is

PHP Fatal error:  Uncaught Error: Call to a member function getPublished() on null in /var/www/ojs/cache/t_compile/16a771d26dda746108b2d26b8c49c8bfbea663f8^

The bug did not show up until after the upgrade, because the test server is behind a firewall, and we didn’t consider the path ourselves, since we don’t link to it from the site. However it looks like many crawlers visits paths for specific authors, maybe browsing the the list.

Steps I took leading up to the issue

  1. Upgrade server from 3.1 to
  2. Fix multiple bugs in between, based on forum posts
  3. See error

What application are you using?

Additional information
I can add/override the {if $issueId && $issue->getPublished() && $section && $journal} to templates/frontend/pages/searchAuthorDetails.tpl to make the loop pass without issues, but I think we need to understand the underlying issue with what happened with the data, but I’m unsure where to look in the database or how to proceed.