TinyPortal

Development => Bugs/Errors => Feedback => Fixed Bugs => Topic started by: @rjen on May 11, 2018, 11:50:04 AM

Title: Proper error message for articles that are 'off limits'
Post by: @rjen on May 11, 2018, 11:50:04 AM
With the new GDPR rules coming up I have changed some permissions on the articles on my forum. One page is a 'facebook' pages with pictures of members of the club.

This used to be publicly visible, but I have changed it to now only be visible to certain membergroups (using a category permission on the article).

Now I find that if the article is accessed directly by a user that does not have permission for the category, a 'meaningless' page is presented. Blocks are there, article is not showing (which is good) but there is also no notice for the user on why the page is blank...

See attachment 1.

I would like the user to be shown a notice like in attachment 2.

The text should read something like: "The article you are looking for is off limits to you"

(check: https://www.fjr-club.nl/index.php?page=14)
Title: Re: Proper error message for articles that are 'off limits'
Post by: tino on May 11, 2018, 02:39:13 PM
I assume you made the modification on your copy for the second image?
Title: Re: Proper error message for articles that are 'off limits'
Post by: @rjen on May 11, 2018, 03:28:40 PM
No, the second image is the message that TP displays when trying to open a non-existing article page (for example https://www.fjr-club.nl/index.php?page=9999)

or on this site: https://www.tinyportal.net/index.php?page=9

If the page exists, but is not accessible with my permission, it just does not show ANY message...
Title: Re: Proper error message for articles that are 'off limits'
Post by: tino on May 11, 2018, 05:44:28 PM
I understood that, was just curious how you got the second image.

This Pull Request will fix that;

https://github.com/Tinyportal/TinyPortal/pull/70

I'm moving it to bugs not a Feature Request as I would say it's unintended behaviour.
Title: Re: Proper error message for articles that are 'off limits'
Post by: @rjen on May 11, 2018, 06:30:50 PM
Quote from: tino on May 11, 2018, 05:44:28 PM
I understood that, was just curious how you got the second image.

This Pull Request will fix that;

https://github.com/Tinyportal/TinyPortal/pull/70

I'm moving it to bugs not a Feature Request as I would say it's unintended behaviour.

Thanks!

But to make it better this text string should also be updated now...

$txt['tp-articlenotexist'] = 'The article isn\'t active, hasn\'t been approved yet, or simply does not exist.';

change to:

$txt['tp-articlenotexist'] = 'This article is not available. You may not have permission to see the article, it isn\'t active, hasn\'t been approved yet, or simply does not exist.';
Title: Re: Proper error message for articles that are 'off limits'
Post by: tino on May 12, 2018, 10:46:50 AM
Updated the language string to above.

This will be part of 1.5.1 whenever that is released.
Title: Re: Proper error message for articles that are 'off limits'
Post by: lurkalot on May 12, 2018, 11:59:38 AM
Quote from: tino on May 12, 2018, 10:46:50 AM
Updated the language string to above.

This will be part of 1.5.1 whenever that is released.

Thank you tino.  ;)