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.

Found 2 errors in code

  • Michael Becker
  • Michael Becker's Avatar Topic Author
  • New Member
  • New Member
More
24 Oct 2015 17:52 #5581 by Michael Becker
Found 2 errors in code was created by Michael Becker
Dear Thomas,

Thank you very much for your excellent work.
I am including sermon speaker into our totally redesigned live stream and video/audio sermon website. I am happy to find a component that is fitting so well to our needs.
During test and modification of some helper files I recorgnized two errors in the code.

#1 (e.g. in /modules/mod_latestsermons/tmpl/horizontal.php)
Code:
JRoute::_(SermonspeakerHelperRoute::getSpeakerRoute($row->speaker_slug, $row->speaker_catid));
should be
Code:
JRoute::_(SermonspeakerHelperRoute::getSpeakerRoute($row->speaker_slug));
otherwise you won't find all the related sermons in lists or table (because the category causes some strange side effects). If you remove the "catid" everything will work well and the speaker's detail page will show all related sermons or series.

#2 (e.g. in /components/com_sermonspeaker/views/sermon/tmpl/content.php
Code:
if ($this->params->get('show_tags', 1) and !empty($this->item->tags)) :
will always print the tags even if they are empty. I encountered this effect, because I added a headline, that was printed all the time.
If you change the code to
Code:
if ($this->params->get('show_tags', 1) and !empty($this->item->tags->itemTags)) :
everything works well.

In a couple of days our website will be online. I can send you a link and provide my new layouts, if you are interested.

Please Log in or Create an account to join the conversation.

More
24 Oct 2015 18:34 #5582 by Thomas Hunziker
I can see the second one, because $this->item->tags is an object that is always there. I think there is a difference between PHP versions in how emtpy objects are processed. May I know your PHP version?

The first one is strange. In theory it should work with the category id. If it doesn't work, then the code in the helper is faulty.
What was the issue you saw? Maybe I can reproduce it.

Please Log in or Create an account to join the conversation.

  • Michael Becker
  • Michael Becker's Avatar Topic Author
  • New Member
  • New Member
More
25 Oct 2015 00:11 #5583 by Michael Becker
Replied by Michael Becker on topic Found 2 errors in code
I am on Debian 7 with PHP 5.4 (PHP 5.4.45-0+deb7u1).

Concerning your question related to the first error:
The code generates something like
domain.de/predigtvideos/speaker/1-billy-sunday?catid=19
The appended "catid" causes the detailed single speaker view to omit all related sermons or sermon series. I added an example from Billy Sunday's sermon, that is still in our test environment. I suspect, that passing the catid value confuses the called component.
After removing the "?catid=" appendix everything works well (as mentioned in my post above). For me it does not make any sense to pass the catid, because we already have an unique identifier.

I hope this helps.
Attachments:

Please Log in or Create an account to join the conversation.

More
25 Oct 2015 19:30 #5584 by Thomas Hunziker
I see.

The tags one isn't depending on the PHP version. I see that is something I just copied from code, where it is wrong everwhere as well :)

The catid one is an issue in the helper. The layout would be correct. In theory, the category id would be used to find a matching menu item in case no specific one is found for that speaker. So the helper would first check for a menuitem specific to the speaker, then find a speaker list menuitem specific to the category and if still no luck find a generic one for the speakers list. If all fails, it takes just the first SermonSpeaker menuitem it finds.

I have to change the helper so the catid doesn't get included into the URL but only be used to find the best matching menuitem, then it will be fine (hopefully).

Please Log in or Create an account to join the conversation.

More
26 Oct 2015 13:46 #5585 by Thomas Hunziker
Will send you an email :)

Please Log in or Create an account to join the conversation.

Time to create page: 0.283 seconds
Powered by Kunena Forum