Skip to:
Content
Pages
Categories
Search
Top
Bottom

Private Message Button Not Working Right?


  • RT77
    Participant

    @rt77

    Hello I think I have a bug here, ok I am on buddypress Version 3.1.0 and logged in as admin I click on a member in the members directory and it has a button for “private message”, when clicked on I am assuming it is supposed to open the compose message box with the members name in the send to field but it is not doing that for some reason. I am assuming this also because of the url link. https://www.theexample.com/members/admin/messages/compose?r=thememberid
    So is this a bug and how can I fix this if it is?

Viewing 8 replies - 1 through 8 (of 8 total)

  • RT77
    Participant

    @rt77

    the url link is just for example and not mine it’s just to show that the link structure contains “compose” and the members id..


    RT77
    Participant

    @rt77

    anyone? this is on buddypress profiles.. all plugins are deactivated so nothing is interfering as far as I know. When the “Private Message” Button is clicked it does not open the compose message with the user name in the title.. I think it might be a bug?


    vesterde
    Participant

    @vesterde

    I also think this is a bug, but while we wait for an official response, I’ve managed to work around it.

    Technically, this only happens if you’re using the Nouveau template, legacy still works fine.

    There are two steps to fix the issue. Firstly, in your theme folder create the folder(s) buddypress/common/js-templates/messages and inside messages, create index.php.

    Into index.php here, copy the contents of the buddypress plugin file (within the plugin folder) bp-templates/buddypress/common/js-templates/messages/index.

    Inside the newly copied index.php file, go to line 37, where the input named “send_to” is located and change it to this:

    Github gist #1

    That was the first step, the second one is to add the following filter to functions.php:

    Github Gist #2

    That fixed it for me.

    The problem seems to be 2 things.

    Firstly, the link being generated on for the user list view has “…#compose?r=…”, which is meant to use the compose view as a backbone view I presume, but that ends up not switching to the compose at all, so switching out # for / makes it go to the correct location.

    Secondly, the input field has no code (PHP or Javascript within the Backbone engine) that should take the query variable and inject it as the recipients username. The code itself does exist (bp.Nouveau.getLinkParams), I just don’t know why it wasn’t implemented here somehow.

    Hope this helps.


    r-a-y
    Keymaster

    @r-a-y

    Thanks for the report and suggested fix, @vesterde.

    I’ve linked to this thread in this ticket – https://buddypress.trac.wordpress.org/ticket/7908


    keyadigital
    Participant

    @keyadigital

    I’m having perhaps a related issue with messages. When I switch to the old theme the messages work fine. Here is my original post:

    _______________________
    Greetings!

    I just installed BP version 3.1.0 with WooCommerce StoreFront theme on WP 4.9.8 hosted on WPEngine.

    When I go to a users profile and click private message, it takes me to the messages tab, but the compose fields do not show. The URL appears to have the proper query string with the users name. Example: compose?r=julesyoga

    Could caching be preventing the page from loading perhaps?

    Do you know any reason why the page isn’t loading in compose mode and the name isn’t being populated.

    site: https://access.julesmitchell.com/
    wp version: 4.9.8

    Thanks so much!


    r-a-y
    Keymaster

    @r-a-y

    @keyadigital – I’ve merged your post into this thread since it is more appropriate. Please check the post I made just before for a potential fix.


    keyadigital
    Participant

    @keyadigital

    Thank you so much!


    bamadale
    Participant

    @bamadale

    THANK YOU SO MUCH for this help!

    It worked PERFECTLY! We were really in a bind with a new website we just launched.

    I hope this is included in the next revisions of BuddyPress!

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.
Skip to toolbar