TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

April 18, 2024, 05:00:02 AM

Login with username, password and session length
Members
  • Total Members: 3,885
  • Latest: Growner
Stats
  • Total Posts: 195,164
  • Total Topics: 21,219
  • Online today: 190
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online

Proper error message for articles that are 'off limits'

Started by @rjen, May 11, 2018, 11:50:04 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

@rjen

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)
Running Latest TP on SMF2.1 at: www.fjr-club.nl

tino

I assume you made the modification on your copy for the second image?

@rjen

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...
Running Latest TP on SMF2.1 at: www.fjr-club.nl

tino

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.

@rjen

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.';
Running Latest TP on SMF2.1 at: www.fjr-club.nl

tino

Updated the language string to above.

This will be part of 1.5.1 whenever that is released.

lurkalot

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.  ;)