Hello,
sorry for my bad english - I'm not a native speaker.
I migrated Joomla 3.10.11 to 4.2.6 using the T3 blank template. I had the same problem with the "expired warning" in articles. The plugin-Update to 3.1.2 did not solve the problem for us. The related files are identical.
I figured out that the problem is the difference between "getNullDate" (returning 0000-00-00 00:00:00) and publish_down (returning an empty string or null) - see the attached image.
So I tried to avoid the problem using another if statement in item_title.php (after line 47) and blog_style_default_item_title.php:
<?php if ((strtotime($timePublishDown) < strtotime(JFactory::getDate())) && $item->publish_down != JFactory::getDbo()->getNullDate()) : ?>
<?php if (! empty($item->publish_down)) : ?>
<span class="label label-warning"><?php echo JText::_('JEXPIRED'); ?></span>
<?php endif; ?>
<?php endif; ?>
It solved the problem for me. I don't know if this is a "good" solution - maybe there will be a better solution in an new version of the template / plugin.
Plaese note: Using this method the expired site is not displayed at all:
Best Regards
Monika