- Posts: 4
- Thank you received: 0
Support for SermonSpeaker 5.x is in bugfix mode only, the same as it is for Joomla 3.10.
I will not add any new features to this releases.
Please upgrade to SermonSpeaker 6.x and Joomla 4.x, which is better anyway.
I will not add any new features to this releases.
Please upgrade to SermonSpeaker 6.x and Joomla 4.x, which is better anyway.
Trashed sermons appearing in front-end
- Steffan Harris
- Topic Author
- Offline
- New Member
Less
More
26 Jun 2013 15:57 #3605
by Steffan Harris
Trashed sermons appearing in front-end was created by Steffan Harris
Hi,
If I trash a sermon in the back end, the front end will continue to show this sermon. Take a look at line 107 in components/com_sermonspeaker/models/sermons.php. I would add "AND sermons.state = 1" to the end of the query to fix this.
Steffan
If I trash a sermon in the back end, the front end will continue to show this sermon. Take a look at line 107 in components/com_sermonspeaker/models/sermons.php. I would add "AND sermons.state = 1" to the end of the query to fix this.
Steffan
Please Log in or Create an account to join the conversation.
- Thomas Hunziker
- Offline
- Administrator
26 Jun 2013 16:07 #3606
by Thomas Hunziker
Replied by Thomas Hunziker on topic Trashed sermons appearing in front-end
It is filtered by the state already (on line #175). It should show all sermons if you're logged in as administrator (or someone with edit rights), and only show published sermons if you're a guest or only registered user.
Can you test if that is the case?
Can you test if that is the case?
Please Log in or Create an account to join the conversation.
- Steffan Harris
- Topic Author
- Offline
- New Member
Less
More
- Posts: 4
- Thank you received: 0
26 Jun 2013 16:12 #3607
by Steffan Harris
Replied by Steffan Harris on topic Trashed sermons appearing in front-end
That is the case. The problem I have is that I do not want administrators to see all sermons on the front-end, especially if they can't see them in the back-end. People expect to see a 'finished work' on the front end, and 'everything' in the back-end, but this seems to be the other way around.
Why would somebody want to see trashed sermons in the front-end?
Why would somebody want to see trashed sermons in the front-end?
Please Log in or Create an account to join the conversation.
- Thomas Hunziker
- Offline
- Administrator
26 Jun 2013 17:58 #3608
by Thomas Hunziker
By the way: It should be the same behaviour as you have with articles as far as I know.
Replied by Thomas Hunziker on topic Trashed sermons appearing in front-end
People with edit rights are also allowed to (re-)publish trashed sermons. That's why they can see trashed sermons. They can also see them in the backend, one just has to set the filter to "trashed".Steffan Harris wrote: Why would somebody want to see trashed sermons in the front-end?
By the way: It should be the same behaviour as you have with articles as far as I know.
Please Log in or Create an account to join the conversation.
- Steffan Harris
- Topic Author
- Offline
- New Member
Less
More
- Posts: 4
- Thank you received: 0
27 Jun 2013 11:37 #3616
by Steffan Harris
Replied by Steffan Harris on topic Trashed sermons appearing in front-end
I've noticed that unpublished articles appear on the front-end, but trashed articles do not. It seems as if "unpublished" and "trashed" are two separate statuses for articles. If I wanted to re-publish a trashed sermon, I would do this in the back end. The purpose of trashing an article is to make it non-visible in the front-end. Then, if I want to view the article in the front-end before it is published, I change the status to unpublished, then if I like it, publish it.
So... front-end should only deal with publish/unpublish, back-end should deal also with trashed. This is how it works for articles
So... front-end should only deal with publish/unpublish, back-end should deal also with trashed. This is how it works for articles
Please Log in or Create an account to join the conversation.
- Thomas Hunziker
- Offline
- Administrator
27 Jun 2013 12:12 - 27 Jun 2013 12:12 #3618
by Thomas Hunziker
Replied by Thomas Hunziker on topic Trashed sermons appearing in front-end
Yeah, there are 4 states in Joomla
Thanks for testing the behaviour.
You can add the following code to /components/com_sermonspeaker/models/sermons.php around line #182
Best after the part where it says
It will be fixed for the next release then.
- -2 -> Trashed
- 0 -> Unpublished
- 1 -> Published
- 2 -> Archived
Thanks for testing the behaviour.
You can add the following code to /components/com_sermonspeaker/models/sermons.php around line #182
Code:
// do not show trashed links on the front-end
$query->where('sermons.state != -2');
Best after the part where it says
Code:
// Filter by state
$state = $this->getState('filter.state');
if (is_numeric($state))
{
$query->where('sermons.state = '.(int) $state);
}
It will be fixed for the next release then.
Last edit: 27 Jun 2013 12:12 by Thomas Hunziker.
Please Log in or Create an account to join the conversation.
Time to create page: 0.118 seconds