5

I've noticed that when an article is unpublished in the back end, it's still viewable when an admin is logged into the front end. This has causes some confusion with some (easily confused) clients.

Is there a way to hide unpublished articled completely without deleting them?

I realise that some templates will add an unpublished label to the article on the front end making it very clear it's unpublished, however my template doesn't add this feature.

Perhaps there is a very simple solution that I have over looked already?

3 Answers 3

4

From what I already know, this is a purposely built-in feature, which allows admins (only) to view and manage articles via the frontend.

Example:

The Social Media Executive writes a blog post and sets it to unpublished. They then send the link to the Social Media Manager/Directory to review and maybe tweak. This saves them having to login to the backend and find the article in the Content Manager.


Admittedly, this feature could be confusing to some, however unfortunately, it's one of those situations where not everyone can be catered for.

What you could do is create a Template Override, check the status of the article and if it's set to unpublished, then perform an action such as redirect the user to the homepage or display a notification.

1

Unpublished articles are visible in front-end ONLY for administrators etc. Your clients will never see unpublished article in front-end, even if they are registered (You should never give them higher permissions then this). So there is no way they can get confused.

If you still want to disable this feature for administrators on front-end you will need to modify following models:

  • article.php
  • articles.php
  • featured.php
2
  • Believe me, there is always a way they can get confused! I realise the articles only visible to admins, the users in question are set as Super Admins. Thanks for the suggestion though :)
    – jonboy
    Commented Aug 12, 2015 at 15:46
  • I was talking about articles situation, not in general. That's probably not the best solution for you to have so many Super Administrators. There should not be more then one Super Administrator. If you need them to have administrator rights simply use Administrator group. Modifying models is the only save solution to filter this data that way. You can also try to modify JUser::authorise to return false on those permissions in frontend (or front-end views you want to change). But I can't guarantee success. Commented Aug 12, 2015 at 16:15
0

For me this is a bug. Article publishing should not be confused with filtering. Social Media Executive should simply allow reading to a specific group of users.

1
  • Is this "resolving advice"? This feels more like commentary. Commented Nov 15, 2022 at 21:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.