Users running a non-download version of Vanilla (pulled from github), on branch release/2019.016 or master from the last 2 weeks should upgrade to release/2019.017 or latest master for security reasons. Downloaded official open sources releases are not affected.
Please upgrade here. These earlier versions are no longer being updated and have security issues.

Problem with the target after form post

steamsteam - #1 foro planes amigo
edited November 2015 in Vanilla 2.0 - 2.8

I have a problem with the target after form post.
From a comment I want to send a private message through popup window.

I have created url like:
echo anchor .... url('/messages/add/'.$Args['Author']->Name.'?Target='.urlencode('/discussion/pmessage'), true), 'PM Popup', ...

I see two ways:

1 - After submit form, I try to redirect to my custom method to show message and do nothing.
public function DiscussionController_pmessage_Create($Sender) { $Sender->informMessage("Your private message is sent."); }
but vanilla can not find it. I prefer this solution, but it does not work.

2 - Another solution is redirect back
If I redirect with self Target='.urlencode($Sender->SelfUrl)
It redirects me to start of the discussion losing the position of message.

I have to put url as / discussion / comment / 93 / # Comment_93 or is there another way? Then would have to find how display the message to the user.

Thanks in advance.



Sign In or Register to comment.