Jump to content


Issue Information

  • #000177

  • Issue

  • 4 - High

  • Fixed

  • 1.0.2

  • 1.1.0 Beta 1

Issue Confirmations

  • Yes (0)No (0)
Photo

Convert bug

Posted by Stormraven on 25 March 2010 - 11:28 AM

I've tried to convert old comments to the support thread replies, I've checked all the permissions and everything is set up to how it should be but I keep getting this error:

Topic reply could not be posted
The following error was returned by classPost.php: NO_REPLY_PERM

Updating status to: Awaiting Feedback

There appears to be 4 separate places in the posting class where such an exception can be thrown. Try this. Edit /admin/applications/forums/sources/classes/post/classPost.php and find:

//-----------------------------------------
		// Checks
		//-----------------------------------------
		
		if( $topic['poll_state'] == 'closed' and $this->getAuthor('g_is_supadmin') != 1 )
		{
			throw new Exception( 'NO_REPLY_PERM' );
		}
		
		if( $topic['starter_id'] == $this->getAuthor('member_id') )
		{
			if( ! $this->getAuthor('g_reply_own_topics'))
			{
				if ( $this->_bypassPermChecks !== TRUE )
				{
					throw new Exception( 'NO_REPLY_PERM' );
				}
			}
		}

		if( $topic['starter_id'] != $this->getAuthor('member_id') )
		{
			if( ! $this->getAuthor('g_reply_other_topics') )
			{
				if ( $this->_bypassPermChecks !== TRUE )
				{
					throw new Exception( 'NO_REPLY_PERM' );
				}
			}
		}

		$perm_id	= $this->getAuthor('org_perm_id') ? $this->getAuthor('org_perm_id') : $this->getAuthor('g_perm_id');
		$perm_array = explode( ",", $perm_id );

		if ( $this->registry->permissions->check( 'reply', $this->getForumData(), $perm_array ) === FALSE )
		{
			if ( $this->_bypassPermChecks !== TRUE )
			{
				throw new Exception( 'NO_REPLY_PERM' );
			}
		}
Change it to this:

//-----------------------------------------
		// Checks
		//-----------------------------------------
		
		if( $topic['poll_state'] == 'closed' and $this->getAuthor('g_is_supadmin') != 1 )
		{
			throw new Exception( 'NO_REPLY_PERM1' );
		}
		
		if( $topic['starter_id'] == $this->getAuthor('member_id') )
		{
			if( ! $this->getAuthor('g_reply_own_topics'))
			{
				if ( $this->_bypassPermChecks !== TRUE )
				{
					throw new Exception( 'NO_REPLY_PERM2' );
				}
			}
		}

		if( $topic['starter_id'] != $this->getAuthor('member_id') )
		{
			if( ! $this->getAuthor('g_reply_other_topics') )
			{
				if ( $this->_bypassPermChecks !== TRUE )
				{
					throw new Exception( 'NO_REPLY_PERM3' );
				}
			}
		}

		$perm_id	= $this->getAuthor('org_perm_id') ? $this->getAuthor('org_perm_id') : $this->getAuthor('g_perm_id');
		$perm_array = explode( ",", $perm_id );

		if ( $this->registry->permissions->check( 'reply', $this->getForumData(), $perm_array ) === FALSE )
		{
			if ( $this->_bypassPermChecks !== TRUE )
			{
				throw new Exception( 'NO_REPLY_PERM4' );
			}
		}
Save and upload, and then re-run this tool. I need to find out which of these checks specifically it's failing on, so let me know exactly what the error is this time.

Done, this is the error that comes up mate.

Topic reply could not be posted
The following error was returned by classPost.php: NO_REPLY_PERM3

Hope this helps =]

Are you on IP.Board 3.0.5? The _bypassPermChecks flag should stop that error.

This is what my IP version is: v3.0.5 (ID:30012)

=[

Can you PM me the info for your site (FTP, admin account)? There's no reason you should be getting that error.

Updating status to: Fixed
Updating severity to: 4 - High
Issue fixed in: 1.1.0





0 user(s) are reading this issue

0 members, 0 guests, 0 anonymous users