Skip Navigation

[Resolved] Toolset Messaging: Reply to message causes "You cannot view this message"

This support ticket is created 4 years, 2 months 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 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Tagged: 

This topic contains 21 replies, has 2 voices.

Last updated by simonM-5 4 years, 2 months ago.

Assisted by: Shane.

Author
Posts
#1488823

I am trying to:
Implement Toolset Messaging, following the following documentation:
https://toolset.com/learn/how-to-create-a-messaging-system-with-toolset/

1) I am able to view a Nanny via "Find a Native Nanny", then send a message to the Nanny using Toolset Messaging.
2) The message appears OK in the Nanny's inbox
3) When the Nanny clicks anywhere on the message in her inbox in order to bring up the reply form, she gets the message "You cannot view this message".

I saw a similar post on your support site, but it is impossible to follow because all links are from some customer. I believe I have followed the set up guide correctly but cannot pinpoint the error. It would appear to be a simple access problem, that the Nanny is for some reason not allowed to view the reply form or similar, but cannot find where to set this.

Thanks and regards
Simon

#1488913

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Simon,

Thank you for getting in touch.

I suspect the issue here is that the user isn't able to create a post in the messaging CPT based on the permissions. The user can only read the messages but they can't create a message on their own.

Could you try using access to allow the user to create messages.

Once you have done this please let me know the results.

Thanks,
Shane

#1488921

Hi Shane

Thanks for the fast reply. I suspected something like this. I already checked the following. Am I missing a tickbox somewhere else?

Under Toolset > Access > Toolset Forms > Post Forms Front-end Access Group, the Nannies are allowed to use "New Message" and "Reply message" forms.

Under Toolset > Access > Post Types > Messages, Nannies are also allowed to "Edit own" and "Read".

Thanks and regards
Simon

#1488923

PS I just tried adding "Edit any" under Toolset > Access > Post Types > Messages > "Edit own" and "Read" for role Nannies. That didn't help either

Cheers
Simon

#1488939

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Simon,

Try this Toolset > Access > Post Types > Messages > "Edit own" and "Read" and "Publish".

I suspect they would need to be able to publish the message in order for it to get sent.

Thanks,
Shane

#1488941

Hi Shane

Tried that, didn't work.

Regards
Simon

#1489079

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Simon,

Thank you for trying.

In this case I would need to take a personal look at it.

Could you provide me with a Nanny account that would allow me to see the issue ?

Also please let me know what should I click or where should I go so that the issue is visible.

Thanks,
Shane

#1489109
#1490441

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Simon,

I was able to figure out what is happening here.

So the problem is 2 fold. The first is with the view that you were using to display the messages.

You were doing this.

[wpv-view name="Messages received" info="id"]

When it should be

[wpv-view name="Messages received" info="[wpv-current-user info='id']"]

Because you want to display the messages for the current user.

Now on the messages page like here:
hidden link

You were using a conditional to check the message to custom field. Now if that field is not set to the ID of the current user viewing the message then you will get the error.

Setting the field to the id of the user you gave me I was able to see and edit the message.

Please let me know if this helps.
Thanks,
Shane

#1490471

HI Shane

Thanks for the update.

I used the default text for the views, as installed by Messaging Module. I didn't actively change this from info="[wpv-current-user info='id']"] to info="id"...

I'll review this and get back to you.
Cheers
Simon

#1490569

Hi Shane

I believe the problem is with the Fusion Builder editor. On the page hidden link when I paste in this text:


[toolset_access role="Guest" operator="allow"]
Message for guests
[/toolset_access]
[toolset_access role="Guest" operator="deny"]
[wpv-view name="Messages received" info="[wpv-current-user info='id']"]
[/toolset_access]

and save it, when I go back in again, it is being misinterpreted. In Visual mode, it is appearing as:


[toolset_access role="Guest" operator="allow"]
Message for guests
[/toolset_access]
[toolset_access role="Guest" operator="deny"]

View Messages received

"]
[/toolset_access]

And in Text Mode it is further changed to what you were seeing with just the "id":


[toolset_access role="Guest" operator="allow"]
Message for guests
[/toolset_access]
[toolset_access role="Guest" operator="deny"]

[wpv-view name="Messages received" info="id"]"]
[/toolset_access]

How can we get around this? Is there a way to force Fusion Builder to interpret it correctly? With escape characters or the like? Or is it a codepage issue?!

Thanks and regards
Simon

#1490571

Hi Shane

I believe the problem is with the Fusion Builder editor. On the page hidden link when I paste in this text:


[toolset_access role="Guest" operator="allow"]
Message for guests
[/toolset_access]
[toolset_access role="Guest" operator="deny"]
[wpv-view name="Messages received" info="[wpv-current-user info='id']"]
[/toolset_access]

and save it, when I go back in again, it is being misinterpreted. In Visual mode, it is appearing as:


[toolset_access role="Guest" operator="allow"]
Message for guests
[/toolset_access]
[toolset_access role="Guest" operator="deny"]

View Messages received

"]
[/toolset_access]

And in Text Mode it is further changed to what you were seeing with just the "id":


[toolset_access role="Guest" operator="allow"]
Message for guests
[/toolset_access]
[toolset_access role="Guest" operator="deny"]

[wpv-view name="Messages received" info="id"]"]
[/toolset_access]

How can we get around this? Is there a way to force Fusion Builder to interpret it correctly? With escape characters or the like? Or is it a codepage issue?!

Thanks and regards
Simon

#1491071

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Simon,

I realised this but you will need to report the issue to the fusion builder team.

If they are not serializing the code correctly from their editor then there is nothing we can do. However I did notice that the information is being saved correctly in the database itself because it shows up correctly on the frontend.

Thanks,
Shane

#1491157

Hi Shane

I've managed to overcome the Fusion builder problem in inbox using the following notation:

[toolset_access role="Guest" operator="allow"]
Message for guests
[/toolset_access]
[toolset_access role="Guest" operator="deny"]
{!{wpv-view name="Messages received" info="{!{wpv-current-user}!}"}!}
[/toolset_access]

This allows me to see the messages in the inbox of the user, but clicking on the message still returns the "You cannot view this message" access denial message.

What else are we missing here?

Cheers
Simon

#1492133

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Simon,

I see the issue. Currently you have this

{!{wpv-current-user}!}

You actually need to let the she shortcode pass the ID of the current user into the view. So what this would look like is.

{!{wpv-view name="Messages received" info="{!{wpv-current-user info='id'}!}"}!}

This should pass the correct user ID into the views shortcode.

Thanks,
Shane

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.