ElkArte Community

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

Title: Report Personal message
Post by: radu81 on October 28, 2019, 09:38:50 am
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, 04:00:32 pm
Smells like @emanuele at work :D
Title: Re: Report Personal message
Post by: radu81 on October 28, 2019, 05: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 October 31, 2019, 08:08:37 pm
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, 11:03:47 am
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, 06: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, 06: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 01, 2019, 08:24:15 pm
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 01, 2019, 09:32:17 pm
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, 04:56:29 pm
/me is innocent