Problem with archive in Health Sciences theme

Problem with OJS, Health Sciences ver.
Covers started to be distributed strangely. I have all the covers 210x315 px, as advised and I still see image like this:
covers are distributed according to no logic.

Hi @TruePepe,

Is this on your live site? Perhaps you could provide a link (it’s too small to tell from the screenshot).

PKP Team

Yes, it is
address of the page is

I think I do know, what the reason is, however, I do not know, how to solve it. The problem arises when the issue is removed and there is a lacking ID in the issues table (issue_id is 266 and then 268, there is no 267 in the database).

I have kinda solved the problem, changing issueArchive.tpl file lines 39-54 as follows:

	{$num = $issues|@count}
	{foreach from=$issues item="issue" key="i"}
		{if $num % 4 == 0 && $num > 0}
			{assign var="open" value=false}
		{if $num % 4 == 0}
			<div class="row justify-content-around">
			{assign var="open" value=true}
		<div class="col-md-3 col-lg-2">
			{include file="frontend/objects/issue_summary.tpl" heading="h2"}

@TruePepe Great, I suspected that the ‘i’ is causing the troubles. Will bring the fix to the theme next week. Thank you!

Yes, $i is an issue id. When you have never deleted any issue, everything is OK. When there is any discontinuity in issue_ids, the problem arises.

I will correct myself: when you count down, there may be a problem on the last page. The simplest way is the best:

{$num = 0}

on the beginning, and

{$num = $num+1}

in the loop. Now the last page of the archive also looks perfect.