Notice

The forum is in read only mode.

Support Forum

Welcome! Support Forums have been reactivated
Welcome the Technical Support section. Help us in assisting you by providing us with a concise and descriptive elaboration of your issues. Be specific and if possible, provide us with a step-by-step instruction in replicating your problem.

Discussion Number Capped at 10

9 years 5 months ago
  • Gene's Avatar
    Topic Author
  • Gene
  • Offline
  • Fresh Boarder
  • Posts: 7
  • Thank you received: 0
Licenses:
JomSocial Expired

Hello,

When I view a particular group at the top of the page and under the main graphic there is a list of er of members, discussions, announcements, etc. Even though there are more than 10 discussions in this group that number does not match the number of actual discussions in the group. How can I make this change?

Attachments:
9 years 5 months ago
  • Dimas Tekad Santosa's Avatar
  • Dimas Tekad Santosa
  • Visitor
  • Thank you received: 0
Licenses:

HI Gene,

What Jomsocial version are you using? I cant see it from backend, since the backend access is not working "Username and password do not match or you do not have an account yet."

If you used old Jomsocial version, please you upgrade to the latest one, because this is old issue.

thank you

9 years 5 months ago
  • Gene's Avatar
    Topic Author
  • Gene
  • Offline
  • Fresh Boarder
  • Posts: 7
  • Thank you received: 0
Licenses:
JomSocial Expired

Hi Dimas,

I'm running 3.1.1 right now but am looking to upgrade to 3.2 by the end of the year. Is there a fix for it in 3.1?

Thank you,
Gene

9 years 5 months ago
  • Dimas Tekad Santosa's Avatar
  • Dimas Tekad Santosa
  • Visitor
  • Thank you received: 0
Licenses:

Hi Gene,


Please you open file components/com_community/models/discussions.php, replace function getDiscussionTopics with this code :

public function getDiscussionTopics( $groupId , $limit = 0 , $order = '' )
	{
		$db			= $this->getDBO();
		$limit		= ($limit == 0) ? $this->getState( 'limit' ) : $limit;
		$limitstart	= $this->getState( 'limitstart' );

		$query	= 'SELECT COUNT(*) FROM ' . $db->quoteName('#__community_groups_discuss') . ' '
				. 'WHERE ' . $db->quoteName( 'groupid' ) . '=' . $db->Quote( $groupId )
				. 'AND ' . $db->quoteName('parentid') .'=' . $db->Quote( '0' );

		$db->setQuery( $query );
		$total	= $db->loadResult();
		$this->total	= $total;

		if($db->getErrorNum())
		{
			JError::raiseError( 500, $db->stderr());
		}

		if( empty($this->_pagination) )
		{
			jimport('joomla.html.pagination');

			$this->_pagination	= new JPagination( $total , $limitstart , $limit);
		}

		$orderByQuery	= '';
		switch( $order )
		{
			default:
				$orderByQuery = 'ORDER BY a.' . $db->quoteName('lastreplied') .' DESC ';
				break;
		}

		$query		= 'SELECT a.*, COUNT( b.' . $db->quoteName('id').' ) AS count, b.' . $db->quoteName('comment') .' AS lastmessage , b.' . $db->quoteName('post_by') .' AS lastmessageby '
					. ' FROM ' . $db->quoteName( '#__community_groups_discuss' ) . ' AS a '
					. ' LEFT JOIN ' . $db->quoteName( '#__community_wall' ) . ' AS b ON b.' . $db->quoteName('contentid') .'=a.' . $db->quoteName('id')
					. ' AND b.' . $db->quoteName('date') .'=( SELECT max( date ) FROM ' . $db->quoteName('#__community_wall').' WHERE ' . $db->quoteName('contentid').'=a.' . $db->quoteName('id').' ) '
					. ' AND b.' . $db->quoteName('type').'=' . $db->Quote( 'discussions' )
					. ' LEFT JOIN ' . $db->quoteName( '#__community_wall' ) . ' AS c ON c.' . $db->quoteName('contentid').'=a.' . $db->quoteName('id')
					. ' AND c.' . $db->quoteName('type').'=' . $db->Quote( 'discussions')
					. ' WHERE a.' . $db->quoteName('groupid').'=' . $db->Quote( $groupId )
					. ' AND a.' . $db->quoteName('parentid').'=' . $db->Quote( '0' )
					. ' GROUP BY a.' . $db->quoteName('id')
					. $orderByQuery
					. 'LIMIT ' . $limitstart . ',' . $limit;

		$db->setQuery( $query );
		$result	= $db->loadObjectList();

		if($db->getErrorNum())
		{
			JError::raiseError( 500, $db->stderr());
		}

		return $result;
	}

If still working, please provide me the FTP access

thank you

9 years 5 months ago
  • Gene's Avatar
    Topic Author
  • Gene
  • Offline
  • Fresh Boarder
  • Posts: 7
  • Thank you received: 0
Licenses:
JomSocial Expired

Hi Dimas,

I swapped out the code for that section but it hasn't fixed the issue. It's still showing a max of 10 discussions. Is there somewhere else we should be looking? Sorry but I cannot grant FTP access.

Thanks,
Gene

9 years 5 months ago
  • Dimas Tekad Santosa's Avatar
  • Dimas Tekad Santosa
  • Visitor
  • Thank you received: 0
Licenses:

Hi Gene,

I see, i think update to the newest is required because I think the patch will be effected to another functions.

thank you

9 years 5 months ago
  • Gene's Avatar
    Topic Author
  • Gene
  • Offline
  • Fresh Boarder
  • Posts: 7
  • Thank you received: 0
Licenses:
JomSocial Expired

Hi Dimas,

Understood - I will look for this to be working when we migrate to 3.2.

Thank you for taking a look into this and for your quick replies!

Gene

9 years 5 months ago
  • Dimas Tekad Santosa's Avatar
  • Dimas Tekad Santosa
  • Visitor
  • Thank you received: 0
Licenses:

You're welcome..

9 years 4 months ago
  • Gene's Avatar
    Topic Author
  • Gene
  • Offline
  • Fresh Boarder
  • Posts: 7
  • Thank you received: 0
Licenses:
JomSocial Expired

This was resolved with the migration to 3.2.1.5.

Thanks,
Gene

Moderators: Piotr Garasiński
Powered by Kunena Forum

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW