After upgrade my T4 based Joomla site to recent Joomla and T4 (Joomla 4.0.1 & T4 2.0.1), each article contain badge "Expired" right between article's title (above published date & tags). How to avoid it?

No other plugins/components used.

Hope for your quick help!

    alexhaha
    Hi
    Let me check it in new package and get back to you. A similar topic is also added in another products.
    I will update you here.

      Ninja Thank you! Waiting patiently! Have to say that problem still here after recent Joomla update to 4.0.2

        alexhaha
        Hi
        You can open this file:

        /plugins/system/t4/themes/base/html/com_content/featured/default_item.php

        find the code at Line 35:

        $isUnpublished     = J3J4::checkUnpublishedContent($item);

        Replace the code with below code

        $isUnpublished     = J3J4::checkUnpublishedContent($this->item);

        Let me know if it helps.

          Ninja

          No, it doesn't work. Also I have to notice - I never use featured articles. This badge is in article view and article category view. I made some new articles after upgrade - the same badge.

          <span class="badge badge-warning">Expired</span>

            Ninja

            I solved problem by deleting some templates overrides, so problem was template modification.. seems some functions were deprecated in J4 and cause such strange behavior. So it's not T4 bug in itself. Thanks you very much for support!

            some details:

            I used Ja Stark as example for my own template

            it has such code in override for article layout (html/com_content/article/project.php)

            it contain such part of code:

            	<?php if ((strtotime($this->item->publish_down) < strtotime(Factory::getDate())) && $this->item->publish_down != Factory::getDbo()->getNullDate()) : ?>
            		<span class="badge badge-warning"><?php echo Text::_('JEXPIRED'); ?></span>
            	<?php endif; ?>

            this part of code cause that warning badge after upgrade to J4. Everything is ok after delete. Probably problem is with getDbo() function which is deprecated in J4. And of course I had no expired articles at all ("Finish Publishing" (publish_down) left blank for each article). BTW, I noticed this part of code is still used in JA Stark template current version 2.0.0, but maybe you did some corrections there?

            Any suggestion how to change it?

            ps

            my site is still on WampServer so I can't send a link.

              alexhaha
              Hi
              You should mentioned that template name as the fix if for T4 template and you posted on T4 not JA Stark.
              Glad to hear its works.
              For stark please post on the same template and wait for template release for Joomla 4 as current version is not for Joomla 4.

              Ninja locked the discussion.
              Write a Reply...
              You need to Login to view replies.