• Resolved eWallz

    (@archonic08)


    hello shamim,
    this is a great plugin.

    i just installed on test website on localhost but im getting the invalid token error notification everytime user send/reply message.
    In actual, when i checked all the inbox, the message were sent successfully (received/posted) but on the sender side keep on displaying error notification.
    i have no idea of what cause the problem.

    screenshot here: https://snag.gy/KudfO.jpg

    thanks

    https://www.ads-software.com/plugins/front-end-pm/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Shamim Hasan

    (@shamim51)

    is message already sent?
    If yes, your browser is sending the form more than once, only first form will be send and others will show invalid token. It is to prevent multiple form submission.

    Thread Starter eWallz

    (@archonic08)

    yes, the first message was sent when i clicked the send button but it doesnt shows the “message successfully sent”.
    i think it has something to do with the theme compatibility. i’m using betheme 6.
    how can i force it to use plugin css instead of using theme css?

    when i tested on other site using vantage theme, the message was sent ok but it show warning error line 197 like this.

    https://snag.gy/M5Wdb.jpg

    Plugin Author Shamim Hasan

    (@shamim51)

    This warning will show very first time when you install this plugin in a new website and send message. it will not show any other time.

    Thread Starter eWallz

    (@archonic08)

    yes you are right. its only shows once.

    but i still cant fixed the issue with the first site with the token error.
    is there any workaround to prevent the plugin from inheriting resource/css from the theme?

    Plugin Author Shamim Hasan

    (@shamim51)

    for token error, you can pass success message for token error. So that if token error occurred that will show a success message.

    which css is using from theme? are those define in this plugin? You can add custom css in back end settings page of this plugin.

    Thread Starter eWallz

    (@archonic08)

    hi shamim, what do you mean by…

    “for token error, you can pass success message for token error. So that if token error occurred that will show a success message.”

    sorry i dont get it..
    do you mean i can bypass the token error? and show the success message instead? how? please guide me thanks

    Plugin Author Shamim Hasan

    (@shamim51)

    in fep-class.php around line 313 remove

    if (!fep_verify_nonce($message['token'], 'new_message'))
            $errors->add('InvalidToken', __("Invalid Token. Please try again!", 'fep'));

    and around line 330 find

    if(count($errors->get_error_codes())==0){

    replace with

    if(count($errors->get_error_codes())==0 && fep_verify_nonce($message['token'], 'new_message')){

    Thread Starter eWallz

    (@archonic08)

    your solution works flawlessly!!
    tested many times and works like charm. Thank you very much!!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Error: Invalid Token.’ is closed to new replies.