ElkArte Community

Elk Development => Bug Reports => Topic started by: radu81 on October 28, 2019, 02:38:50 pm

Title: Report Personal message
Post by: radu81 on October 28, 2019, 02:38:50 pm
I tried here and also on my forum to report a personal message, but I gen an error, see the attached image. Is this a bug?
Title: Re: Report Personal message
Post by: Spuds on October 28, 2019, 09:00:32 pm
Smells like @emanuele at work :D
Title: Re: Report Personal message
Post by: radu81 on October 28, 2019, 10:29:26 pm
That option worked in the past, I don't remember if it was on elkarte 1.0 or 1.1.x, but I'm sure I received a couple of reports in the past.
Title: Re: Report Personal message
Post by: Spuds on November 01, 2019, 01:08:37 am
I have not had a chance to look at this yet, but I at least remembered to track it :) https://github.com/elkarte/Elkarte/issues/3364
Title: Re: Report Personal message
Post by: Spuds on November 01, 2019, 04:03:47 pm
Well darn it ... its actually something I did!

in PersonalMessage.controller.php find
Code: (find) [Select]
		if (empty($modSettings['enableReportPM']) || empty($this->_req->query->pmsg))
and replace it with
Code: (replace) [Select]
		if (empty($modSettings['enableReportPM']) || empty($this->_req->post->pmsg))
That should allow the report to go ...
Title: Re: Report Personal message
Post by: radu81 on November 01, 2019, 11:25:43 pm
Thanks for watching into this, but does not solve the problem. I steel see the same error when I try to report a PM, I did the test with a normal registered account.
Title: Re: Report Personal message
Post by: Spuds on November 01, 2019, 11:50:19 pm
Thats really strange since I test it and it worked .... could you try this instead

Code: [Select]
		if (empty($modSettings['enableReportPM']) || empty($this->_req->getPost('pmsg', 'intval',  $this->_req->getQuery('pmsg', 'intval', 0))))
Title: Re: Report Personal message
Post by: radu81 on November 02, 2019, 01:24:15 am
I did the first edit and checked twice if the file was correctly saved, but the first solution did not worked for me. The second one works perfectly (MP reported, I received the PM and the notification in ACP, no errors in elk log...).

Thanks for your help!
Title: Re: Report Personal message
Post by: Spuds on November 02, 2019, 02:32:17 am
Cool ! ... yeah I found there are two possible ways the data is sent, one by post and one by get ... Anyway the last fix catches either option ... It will be added to 1.1.7 (and 2.0)
Title: Re: Report Personal message
Post by: emanuele on November 03, 2019, 10:56:29 pm
/me is innocent