Expired article links in category and newsflash modules

General questions relating to Joomla! 3.x.

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.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Locked
alan-donny
Joomla! Apprentice
Joomla! Apprentice
Posts: 37
Joined: Fri Apr 13, 2018 7:37 am

Expired article links in category and newsflash modules

Post by 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! Hero
Joomla! Hero
Posts: 2909
Joined: Fri Jul 05, 2013 10:35 am
Location: Parts Unknown

Re: Expired article links in category and newsflash modules

Post by SharkyKZ » Fri Apr 13, 2018 8:59 am

Can't editors set 'Finish Publishing' date?

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

Re: Expired article links in category and newsflash modules

Post by 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: 44096
Joined: Sat Apr 05, 2008 9:58 pm

Re: Expired article links in category and newsflash modules

Post by 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
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

SharkyKZ
Joomla! Hero
Joomla! Hero
Posts: 2909
Joined: Fri Jul 05, 2013 10:35 am
Location: Parts Unknown

Re: Expired article links in category and newsflash modules

Post by 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: 44096
Joined: Sat Apr 05, 2008 9:58 pm

Re: Expired article links in category and newsflash modules

Post by 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.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

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

Re: Expired article links in category and newsflash modules

Post by 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! Hero
Joomla! Hero
Posts: 2909
Joined: Fri Jul 05, 2013 10:35 am
Location: Parts Unknown

Re: Expired article links in category and newsflash modules

Post by 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: 44096
Joined: Sat Apr 05, 2008 9:58 pm

Re: Expired article links in category and newsflash modules

Post by 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.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

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

Re: Expired article links in category and newsflash modules

Post by 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.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

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

Re: Expired article links in category and newsflash modules

Post by 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: 44096
Joined: Sat Apr 05, 2008 9:58 pm

Re: Expired article links in category and newsflash modules

Post by 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.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

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

Re: Expired article links in category and newsflash modules

Post by 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: 44096
Joined: Sat Apr 05, 2008 9:58 pm

Re: Expired article links in category and newsflash modules

Post by 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>
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

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

Re: Expired article links in category and newsflash modules

Post by 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.

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

Re: Expired article links in category and newsflash modules

Post by alan-donny » Thu Apr 26, 2018 10:35 am

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,


Locked

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