News: TinyPortal Release Schedule. Please read this update for More Info.

Login  |  Register
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media
Welcome, Guest. Please login or register.
Did you miss your activation email?

April 08, 2020, 04:00:30 AM

Login with username, password and session length

Recent

Members
  • Total Members: 3777
  • Latest: Mike
Stats
  • Total Posts: 189583
  • Total Topics: 20808
  • Online Today: 65
  • Online Ever: 917
  • (January 21, 2020, 09:02:26 AM)
Users Online
Users: 0
Guests: 29
Total: 29

Author Topic: Proper error message for articles that are 'off limits'  (Read 1297 times)

0 Members and 1 Guest are viewing this topic.

Offline @rjen

  • Support Team
  • *
  • Posts: 2014
    • FJR-club Nederland
Proper error message for articles that are 'off limits'
« on: May 11, 2018, 04: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)
Running TP1.6.4 on SMF2.0 at: www.fjr-club.nl

Testing TP on SMF2.0
Testing TP on SMF2.1 RC2
Want to check what php version I am testing on? See: PHP Info

Offline tino

  • Developer
  • *
  • Posts: 1738
Re: Proper error message for articles that are 'off limits'
« Reply #1 on: May 11, 2018, 07:39:13 AM »
I assume you made the modification on your copy for the second image?

Offline @rjen

  • Support Team
  • *
  • Posts: 2014
    • FJR-club Nederland
Re: Proper error message for articles that are 'off limits'
« Reply #2 on: May 11, 2018, 08:28:40 AM »
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 TP1.6.4 on SMF2.0 at: www.fjr-club.nl

Testing TP on SMF2.0
Testing TP on SMF2.1 RC2
Want to check what php version I am testing on? See: PHP Info

Offline tino

  • Developer
  • *
  • Posts: 1738
Re: Proper error message for articles that are 'off limits'
« Reply #3 on: May 11, 2018, 10:44:28 AM »
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.

Offline @rjen

  • Support Team
  • *
  • Posts: 2014
    • FJR-club Nederland
Re: Proper error message for articles that are 'off limits'
« Reply #4 on: May 11, 2018, 11:30:50 AM »
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 TP1.6.4 on SMF2.0 at: www.fjr-club.nl

Testing TP on SMF2.0
Testing TP on SMF2.1 RC2
Want to check what php version I am testing on? See: PHP Info

Offline tino

  • Developer
  • *
  • Posts: 1738
Re: Proper error message for articles that are 'off limits'
« Reply #5 on: May 12, 2018, 03:46:50 AM »
Updated the language string to above.

This will be part of 1.5.1 whenever that is released.

Offline lurkalot

  • Administrator
  • *
  • Posts: 6474
    • Camera Craniums
Re: Proper error message for articles that are 'off limits'
« Reply #6 on: May 12, 2018, 04:59:38 AM »
Updated the language string to above.

This will be part of 1.5.1 whenever that is released.

Thank you tino.  ;)