solved Forum Widget Returns Empty Result

alt=
Tatiana Dokuchic
@tatiana-dokuchic
8 years ago
83 posts
I'm just starting to understand JR Forums and how they relate to the old Ning Forums.

I created a new profile "Forums". I created a new quota "Forums" and my new profile is the only one in that quota.

I imported a small set of discussions from my Ning site to the Forums profile. I then turned Categories on. It all looks as expected with the posts that I imported. Whew!

On my main page I used Site Builder to add a Forums widget. Nothing displays in it. Zip - Zilch - Nada. I've tried everything I could think of but now I'm stuck.

The main page is at:
http://livinghistoryvw.com/

There's a second Test page (with only one Forum widget) at:
http://livinghistoryvw.com/test

Thanks!

ETA: The results are the same whether I use Lucid or Ningjr
updated by @tatiana-dokuchic: 12/27/16 10:26:17PM
michael
@michael
8 years ago
7,714 posts
What are you wanting to show? The forums datastore is slightly different than other datastores in that it has replies too.

eg: ask for a site builder Item List of blogs and you get 1,2,3,4,5,6 blogs. Each one is a blog. But ask for the same list of fourms and you get a forum post with all of its replies each on their own _item_id. If you can say what your trying to build, it will be easier to build.

--edit--
At a guess, I reckon you're probably after this widget setup:
{jrCore_list module="jrForum" order_by="_created desc" limit="5" group_by="forum_group_id"}

Use the above code in the "Template Code" widget, or you can build the same in the "Item List" widget with:
LIST MODULE: forum
ORDER BY: _created | descending
GROUP BY: forum_group_id
updated by @michael: 09/26/16 09:12:42PM
alt=
Tatiana Dokuchic
@tatiana-dokuchic
8 years ago
83 posts
Hi Michael

I should have been more specific. Yes that is exactly the List-Forum widget that I am using (right now in its simplest form) as I want to show a list of forum topics.

{jrCore_list module="jrForum" limit="5"}

Unfortunately, the result is blank. It's like the widget can't find any data belonging to my "Forums" profile which is active with profile privacy "Global - visible to everyone".

"Forums" contains data that I've imported from my Ning site as well as some new topics & categories added after the import.

You can see that data starting here http://livinghistoryvw.com/forums/forum which looks as I expected but doesn't display via the widget here http://livinghistoryvw.com/test

Thanks!
updated by @tatiana-dokuchic: 09/27/16 06:20:40AM
paul
@paul
8 years ago
4,326 posts
Try adding the quota_check parameter to the call -

{jrCore_list module="jrForum" limit="5" quota_check=false}


--
Paul Asher - JR Developer and System Import Specialist
paul
@paul
8 years ago
4,326 posts
Just by way of an explanation, the forum posts likely belong to profiles who do not have the Forum module enabled in their quota, so that is why the jrCore_list is not returning those items. The quota_check parameter overides that test.


--
Paul Asher - JR Developer and System Import Specialist
alt=
Tatiana Dokuchic
@tatiana-dokuchic
8 years ago
83 posts
Hi Paul.

You're right that the profiles don't have the Forum module enabled as I didn't want regular member creating their own forums.

Using "quota_check=false" gets us part way as it returns results but they are a bit wonky.

Clicking on the topic title results in a "This page does not exist" i.e. it's pointing to the wrong link for the post body. How would we update that link path?

ETA: If that's not possible what's the best way around this?


I can see that if I do enable the Forum module for everyone (which I really don't want to do) the default widget works just as expected.
updated by @tatiana-dokuchic: 09/27/16 08:00:13AM
paul
@paul
8 years ago
4,326 posts
Can I get onto your site to check this out?
Open a support ticket with your admin login and link to the page where this is happening.
Thanks


--
Paul Asher - JR Developer and System Import Specialist
alt=
Tatiana Dokuchic
@tatiana-dokuchic
8 years ago
83 posts
Done. Thank you very much.
michael
@michael
8 years ago
7,714 posts
If you want JUST the forum topics, then you're always going to need more than just the minimum:
{jrCore_list module="jrForum" limit="5"}
because that will include each of the replies too.

To get just the topics you could use either
{jrCore_list module="jrForum" search1="forum_title_url LIKE %"}
Which reads "Get me all forum posts that have a forum_title_url" which only the topic place holders do, or
{jrCore_list module="jrForum" group_by="forum_group_id"}

Which reads "Get me all forum posts and group them by their group id" which will squash all posts into one result, so you only get 1 result from any one forum thread.
alt=
Tatiana Dokuchic
@tatiana-dokuchic
8 years ago
83 posts
Excellent point, Michael.

Paul provided me with:
{jrCore_list module="jrForum" limit="5" search="forum_cat LIKE %" quota_check=false} 

Which I updated to show latest first & exclude the Marketplace category:
{jrCore_list module="jrForum" search="forum_cat LIKE %" search1="forum_cat != Marketplace" order_by="_created desc" limit="10" quota_check=false}

Apparently the links didn't work because of a bug in a Forum Module template which he also corrected.

Many thanks to you both!