Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR 500 Beim Bearbeiten eines Threads, der von einem anderen User abonniert wurde #5

Closed
markocupic opened this issue May 11, 2018 · 3 comments

Comments

@markocupic
Copy link
Contributor

Hallo
Wenn ich ein Thema bearbeite, welches von einem anderen User aboniert wurde, kommt es zu einer Fehlermeldung:
Dies steht im error log:
[2018-05-11 20:38:40] app.CRITICAL: An exception occurred. {"exception":"[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Type error: Too few arguments to function con4gis\ForumBundle\Resources\contao\classes\C4GForumHelper::getUrlForThread(), 3 passed in /srv/www/web600/htdocs/forum_ja/vendor/con4gis/forum/Resources/contao/classes/C4GForumSubscription.php on line 410 and exactly 5 expected at /srv/www/web600/htdocs/forum_ja/vendor/con4gis/forum/Resources/contao/classes/C4GForumHelper.php:3068)"} []

Und das steht in der Browser console:
PUT http://forum.degam.de/con4gis/forumService/233/sendpost:15?id=0 500 (Internal Server Error)

@markocupic
Copy link
Contributor Author

markocupic commented May 11, 2018

Der Fehler liegt in C4GForumHelper::getUrlForThread(),
Die Funktion verlangt 5 Parameter, übergeben werden aber nur 3!

Wenn die beiden letzen Parameter optional gemacht werden, kommt es zu keiner Fehlermeldung.
Ich weiss aber nicht, was der Hack sonstwo bewirkt ;-)

public function getUrlForThread($threadId,$forumId=0, $sUrl=false, $paramForumbox='', $paramForum='')
	{
		if($sUrl !== false){
			$this->frontendUrl = $sUrl;
		}
		if ($forumId==0)
		{
			$data = $this->Database->prepare(
				"SELECT pid FROM tl_c4g_forum_thread WHERE id=?")
	 								 ->execute($threadId);
			$forumId = $data->pid;
		}
		$paramForum = $paramForum ? $paramForum : 'forum';
		return strtok($this->frontendUrl,'?') . '?state='.$paramForum.':'.$forumId.';readthread:'.$threadId;
	}

@rabauss
Copy link

rabauss commented May 15, 2018

the problem seems to be fixed with the last commit
3849320
can you bump up the version number?

@coastforge-mei
Copy link
Contributor

released v3.1.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants