Page 1 of 1

Expired article links in category and newsflash modules

Posted: Fri Apr 13, 2018 8:11 am
by alan-donny
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

Re: Expired article links in category and newsflash modules

Posted: Fri Apr 13, 2018 8:59 am
by SharkyKZ
Can't editors set 'Finish Publishing' date?

Re: Expired article links in category and newsflash modules

Posted: Fri Apr 13, 2018 9:41 am
by alan-donny
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

Re: Expired article links in category and newsflash modules

Posted: Fri Apr 13, 2018 9:52 am
by Webdongle
What module ?
If Joomla core module please list steps to reproduce the error https://volunteers.joomla.org/teams/bug-squad

Re: Expired article links in category and newsflash modules

Posted: Fri Apr 13, 2018 12:33 pm
by SharkyKZ
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.

Re: Expired article links in category and newsflash modules

Posted: Fri Apr 13, 2018 1:12 pm
by Webdongle
"Finish publishing date is always used - expired articles are not shown to users unless they have 'Edit State' permissions"
That is expected behaviour.

Re: Expired article links in category and newsflash modules

Posted: Mon Apr 16, 2018 1:30 pm
by alan-donny
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

Re: Expired article links in category and newsflash modules

Posted: Mon Apr 16, 2018 5:05 pm
by SharkyKZ
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.

Re: Expired article links in category and newsflash modules

Posted: Mon Apr 16, 2018 6:16 pm
by Webdongle
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.

Re: Expired article links in category and newsflash modules

Posted: Mon Apr 16, 2018 6:19 pm
by Webdongle
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.

Re: Expired article links in category and newsflash modules

Posted: Tue Apr 17, 2018 1:17 am
by brian
@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

Re: Expired article links in category and newsflash modules

Posted: Tue Apr 17, 2018 8:43 am
by Webdongle
@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.

Re: Expired article links in category and newsflash modules

Posted: Tue Apr 17, 2018 9:09 am
by brian
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.

Re: Expired article links in category and newsflash modules

Posted: Tue Apr 17, 2018 9:51 am
by Webdongle
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>

Re: Expired article links in category and newsflash modules

Posted: Tue Apr 17, 2018 10:07 am
by Per Yngve Berg
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.

Re: Expired article links in category and newsflash modules

Posted: Thu Apr 26, 2018 10:35 am
by alan-donny
Hi everyone,

I just wanted to thank everyone for their input on this.

It seems clear this is something I can't achieve without touching core files. I tried styling system-unpublished to no avail, it was all or nothing.

I've had to compromise as I've found you can use the publish date instead of create date in the module settings which means the front end editors can now set the start time to before work starts so my "Today" module does not display the previous days items at all.

This doesn't solve the problem with my latest articles module but I think we'll have to live with that for now.

I think it's a real shame that an option to hide expired links in modules isn't a native feature - I've worked with Joomla since 2012 and think it's the most flexible CMS for a corporate website. Unfortunately, it's the first time since then I've had to build a site for front end editing with some staff logged in all day to access content set at Manager level.

As a sub note, I think the Joomla ACL is really impressive - easy to work with and very flexible - a must have for an intranet.

Thanks again,