Expired article links in category and newsflash modules

General questions relating to Joomla! 3.x. Please consider the availability of third-party templates and extensions when deciding which Joomla version to use.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
alan-donny
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Fri Apr 13, 2018 7:37 am

Expired article links in category and newsflash modules

Postby alan-donny » Fri Apr 13, 2018 8:11 am

Hi everyone,

I've searched high and low for a solution to an issue I have with links to expired articles showing for logged in users in my modules: articles - category and articles - newsflash.

I believe though that this is normal Joomla behaviour.

The scenario I have is that an article is posted on an intranet site that informs of a situation specific to one day only and set to expire at the end of the day, which it does.

When Users login the following day (manager level and below) they can still see the article link. I have tried setting Relative date to 1 in the Filtering options which helps but if an item is added part way through the day, the link will show until part way through the following day. I can overcome this by amending the create date time to before work starts.

However, all articles are added from the front end so editors / publishers can't amend the create date - it can only be done via the backend which users don't have access to..

Is anyone aware of a way by which I can simply hide expired links in these modules? I still need to see the expired articles on their relevant pages. Or, as a last resort, perhaps a way of adding the expired badge to the module links.

Any help would be greatly appreciated.

Thank you in advance of any thoughts or ideas!

Regards,

Alan

SharkyKZ
Joomla! Guru
Joomla! Guru
Posts: 884
Joined: Fri Jul 05, 2013 10:35 am
Location: Unknown

Re: Expired article links in category and newsflash modules

Postby SharkyKZ » Fri Apr 13, 2018 8:59 am

Can't editors set 'Finish Publishing' date?

alan-donny
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Fri Apr 13, 2018 7:37 am

Re: Expired article links in category and newsflash modules

Postby alan-donny » Fri Apr 13, 2018 9:41 am

Hi SharkyKZ,

Thanks for the quick reply.

Yes they can but expired article links still show in the module for logged in users so, for example, if an editor creates an article at 10:00am stating a person is off ill today, the module (set to one day in Filtering Options) will show the expired article link until 10:00am the following day creating the impression that the person is off ill again when actually they are back at work.

This is the issue I want to try to overcome. The module appears to use create date rather than finish date.

The only fix I have a the moment is to edit the create date in the backend to set it to before work starts but this is not very practical.

Regards,

Alan

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 34022
Joined: Sat Apr 05, 2008 9:58 pm

Re: Expired article links in category and newsflash modules

Postby Webdongle » Fri Apr 13, 2018 9:52 am

What module ?
If Joomla core module please list steps to reproduce the error https://volunteers.joomla.org/teams/bug-squad

SharkyKZ
Joomla! Guru
Joomla! Guru
Posts: 884
Joined: Fri Jul 05, 2013 10:35 am
Location: Unknown

Re: Expired article links in category and newsflash modules

Postby SharkyKZ » Fri Apr 13, 2018 12:33 pm

alan-donny wrote:Hi SharkyKZ,

Thanks for the quick reply.

Yes they can but expired article links still show in the module for logged in users so, for example, if an editor creates an article at 10:00am stating a person is off ill today, the module (set to one day in Filtering Options) will show the expired article link until 10:00am the following day creating the impression that the person is off ill again when actually they are back at work.

This is the issue I want to try to overcome. The module appears to use create date rather than finish date.

The only fix I have a the moment is to edit the create date in the backend to set it to before work starts but this is not very practical.

Regards,

Alan
Finish publishing date is always used - expired articles are not shown to users unless they have 'Edit State' permissions.

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 34022
Joined: Sat Apr 05, 2008 9:58 pm

Re: Expired article links in category and newsflash modules

Postby Webdongle » Fri Apr 13, 2018 1:12 pm

"Finish publishing date is always used - expired articles are not shown to users unless they have 'Edit State' permissions"
That is expected behaviour.

alan-donny
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Fri Apr 13, 2018 7:37 am

Re: Expired article links in category and newsflash modules

Postby alan-donny » Mon Apr 16, 2018 1:30 pm

Hi Webdongle,

Thank you for your reply.

I accept this is expected behaviour but was looking for ideas on a workaround. Managers are set up to see additional content and must be logged in. This then creates the problem of seeing links in the modules for expired items. This leads to confusion and potentially misleading information.

I would like to overcome this in some way, perhaps by a module override to display the expired badge at the beginning or end of the link and wondered if anyone has encountered this before as, to me, it seems a glaringly obvious shortfall in functionality - the expired badge is shown if you go to the article so it would make sense to see it without having to click through.

Any suggestions would be greatly appreciated...

Thanks again,

Alan

SharkyKZ
Joomla! Guru
Joomla! Guru
Posts: 884
Joined: Fri Jul 05, 2013 10:35 am
Location: Unknown

Re: Expired article links in category and newsflash modules

Postby SharkyKZ » Mon Apr 16, 2018 5:05 pm

Article authors can set 'Start Publishing Date' to the start of the day (00:00:00) so articles are filtered properly.

Or, if you want to display expired badge instead, create a template override.

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 34022
Joined: Sat Apr 05, 2008 9:58 pm

Re: Expired article links in category and newsflash modules

Postby Webdongle » Mon Apr 16, 2018 6:16 pm

Joomla core displays expired Articles to any logged in user who has Permission to edit them. It would be illogical to prevent users from seeing Articles they are allowed to edit.

Expired Articles are 'marked as 'expired' to any logged in user who has Permission to edit them. If you are seeing expired Articles to edit but they are not 'marked as 'expired then you have a Template with a badly written Template Override.

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 34022
Joined: Sat Apr 05, 2008 9:58 pm

Re: Expired article links in category and newsflash modules

Postby Webdongle » Mon Apr 16, 2018 6:19 pm

SharkyKZ wrote:Article authors can set 'Start Publishing Date' to the start of the day (00:00:00) so articles are filtered properly....
Incorrect as Authors are not allowed to 'Edit State'.


SharkyKZ wrote:....
Or, if you want to display expired badge instead, create a template override.
As previously stated no override is needed but if not showing then a badly written override is in place.

User avatar
brian
Joomla! Master
Joomla! Master
Posts: 11551
Joined: Fri Aug 12, 2005 7:19 am
Location: Leeds, UK
Contact:

Re: Expired article links in category and newsflash modules

Postby brian » Tue Apr 17, 2018 1:17 am

@webdongle I guess the core joomla templates are badly written then as they do not display any information regarding an article being expired in the modules referred to by the original poster. Seriously though there is no code in either of those modules to display the "expired" status of an article
"Exploited yesterday... Hacked tomorrow"
Blog http://brian.teeman.net/
Joomla Hidden Secrets http://hiddenjoomlasecrets.com/

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 34022
Joined: Sat Apr 05, 2008 9:58 pm

Re: Expired article links in category and newsflash modules

Postby Webdongle » Tue Apr 17, 2018 8:43 am

@brian

I have tested with
Protostar as default
And
Logged in user as Editor
And article expired.

The word 'Expired' appears in the Featured blog. Can't be bothered to check if the same happens in Category Blog view.

User avatar
brian
Joomla! Master
Joomla! Master
Posts: 11551
Joined: Fri Aug 12, 2005 7:19 am
Location: Leeds, UK
Contact:

Re: Expired article links in category and newsflash modules

Postby brian » Tue Apr 17, 2018 9:09 am

Such a shame that you didnt read the original report or the title of the report. This is nothing to do with the blog view it is about the modules!!!!

> I've searched high and low for a solution to an issue I have with links to expired articles showing for logged in users in my modules: articles - category and articles - newsflash.
"Exploited yesterday... Hacked tomorrow"
Blog http://brian.teeman.net/
Joomla Hidden Secrets http://hiddenjoomlasecrets.com/

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 34022
Joined: Sat Apr 05, 2008 9:58 pm

Re: Expired article links in category and newsflash modules

Postby Webdongle » Tue Apr 17, 2018 9:51 am

Oh yeah Category doesn't either ... /components/com_contact/views/category/tmpl/default_children.php doesn't have the code to display expired. Nor does the newsflash module or the category module. Only Featured has

Code: Select all

<span class="label label-warning"><?php echo JText::_('JEXPIRED'); ?></span>

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 24164
Joined: Mon Oct 27, 2008 9:27 pm
Location: Akershus, Norway

Re: Expired article links in category and newsflash modules

Postby Per Yngve Berg » Tue Apr 17, 2018 10:07 am

Do they not have the "system-unpublished" class either?

With CSS, a red border around it or a background can be put.

As I remember, this feature have been around since version 1.5.


Return to “General Questions/New to Joomla! 3.x”

Who is online

Users browsing this forum: jamthejame and 36 guests