Skip Navigation

[Resolved] Messaging System Layout Template – not related messages are displayed

This thread is resolved. Here is a description of the problem and solution.

Problem:

After opening a message in the inbox, all messages are displayed, also not related ones even when logged in user is author or receiver of the message.

Solution:

You can filter view's result by custom field "first-message-id" value, for example:

https://toolset.com/forums/topic/messaging-system-layout-template-not-related-messages-are-displayed/#post-1888509

Relevant Documentation:

https://toolset.com/documentation/user-guides/views/passing-arguments-to-views/#accessing-the-arguments

This support ticket is created 4 years ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 8 replies, has 2 voices.

Last updated by alperenK 3 years, 12 months ago.

Assisted by: Luo Yang.

Author
Posts
#1884227
not-related-messages.png

Tell us what you are trying to do?
After opening a message in the inbox, all messages are displayed, also not related ones even when logged in user is author or receiver of the message
Is there any documentation that you are following?
could not find a solution
Is there a similar example that we can see?
I have attached a front end picture
What is the link to your site?
hidden link (maintenance mode on, Minesh is already involved in another task)

#1884769

Hello,

I can get your website credentials from your previous thread:
https://toolset.com/forums/topic/problems-with-using-the-messaging-system/#post-1884045

But it is not valid, I get these error message:

Access protected
Due to attacks the access from foreign countries has been denied. Please contact your hosting provider for instructions to remove this restriction.

Please check it, make sure it is a valid admin account, and can login your website. thanks

#1885263

Hi Luo, it is an admin account, but somehow it restricts some countries. I don't understand how Minesh is able to login and you not.. Can you say me your country that I can check if something is blocked? Thank you!

#1885583

I am using Hong Kong IP address: 129.226.11.13

#1885981

Hong Kong is now whitelisted, can you please try again? Thank you Luo

#1886325
inbox.JPG

I can login your website, where and how can I see the screenshot you mentioned above.

I assume we are talking about the inbox page of your website:
hidden link

I can see only one message, see my screenshot inbox.JPG

Is this problem resolved? or is there any steps missing?

#1886595
message-single-item.png

Hi Luo, the problem here occurs on the "Messages - single item" Layout if you click on this message to "reply" you will see the problem page:

Backend:
hidden link

Frontend:
hidden link

Here it shows "ALL" messages from everyone (also not related user can see other messages..)

#1888509

Thanks for the details, I have done below modifications in your website:
Edit the content template:
hidden link

Replace the "Related messages" with below:
[wpv-view name="Related messages" message='[wpv-post-field name="wpcf-first-message-id"]' raw="true"]

Shortcode [wpv-post-field name="wpcf-first-message-id"] will get current message post's custom field "first-message-id" value, and pass to above view, and filter the result, please test it again, check if it is fixed.

More help:
https://toolset.com/documentation/user-guides/views/passing-arguments-to-views/#accessing-the-arguments

#1888855

My issue is resolved now. Thank you!