Hello,

I discovered that the message "Not Yet Published" is displayed wrongly in some situations of the date setting.
The error can be found in frame work T3-3.1.1.

Solution for :
/plugins/system/t3/base-bs3/html/layouts/joomla/content/item_title.php
$timePublishDown = $item->publish_down != null
? strtotime($item->publish_down) : '';
$timePublishUp = $item->publish_up != null
? strtotime($item->publish_up) : '';
has to be modify to:
$timePublishDown = $item->publish_down != null
? $item->publish_down : '';
$timePublishUp = $item->publish_up != null
? $item->publish_up : '';

because else the check with
strtotime($timePublishUp)
strtotime(($timePublishDown)
will be:
strtotime(strtotime($item->publish_up))
strtotime(strtotime($item->publish_down))
which is obsiously wrong due to a double strtotime(strtotime

In t3-3.1.1 total 8 files have to be modified for this bug.
Search for "$timePublishUp" and "strtotime" in the t3-3.1.1 distribution to find the correct files.
See the corrected t3-3.1.1 in the appendix.

Regards,
Peter v.d. Hulst

t3-311-pch.zip
5MB

I can't replicate this issue so it'll be great if you guys can share the login credentials of your site: URL + super admin account so I can help.

    peterhulst

    Thanks for sharing, Peter!

    We will do some more testing and will release new version for T3 framework.

    5 days later

    HI

    The new version of T3 plugin has been released, pls backup your site and update.

    17 days later

    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

    Hi Monika,

    In Joomla 4, you should switch to use T3 BS3 Blank Template instead of T3 Blank.

    12 days later

    Very many of my custom websites are based on T3 blank, with much code adjustments, it´s not so easy to change to T3 BS3.
    I´ve choosed the template because it allows most flexibility, and I think I´m not the only one.

    I hope you will find a further solution for the T3 blank.

    Best regards
    Monika

      Hi moschra

      They are almost the same but the different Bootstrap only, you can simply install T3 BS3 and switch template 🙂

        19 days later
        7 days later
        Write a Reply...
        You need to Login to view replies.