Skip Navigation

[Resolved] Conditional logic issue displayed on Microsoft Edge

This support ticket is created 5 years, 10 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.

Our next available supporter will start replying to tickets in about 1.87 hours from now. Thank you for your understanding.

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)

Author
Posts
#1188088

I am trying to: Not display some content for the logged in users when they see their own profile

Link to a page where the issue can be seen: hidden link but you need to be logged in

I expected to see: that the conditional logic don't display nothing same as in Firefox and in Chrome

Instead, I got: the content are displayed but not correctly.

#1188247

Shane
Supporter

Languages: English (English )

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

Hi Francesco,

Could you send me a screenshot of the issue ?

I checked in edge and i saw no difference between it, chrome and firefox.

Thanks,
Shane

#1188261
firefox-.png
edge-not-ok.png

Yes, see the two attached image, one from Edge and other from Firefox

#1189003

Shane
Supporter

Languages: English (English )

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

Hi Francesco,

Your conditional logic is not correct for what you want to achieve.

You want this to display if the Author of the page ID is not the same as the user ID correct?

Currently with your setup it will display if they are not equal. This is true for all browsers.

Please confirm exactly what you want to display so I can correct it for you.

Thanks,
Shane

#1189079

Hi Shane,
yes, I want this to display if the Author of the page ID is not the same as the current logged in user ID.

#1189107

Shane
Supporter

Languages: English (English )

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

Hi Francesco,

This is what is currently happening.

The area displays for me since my ID is not the same as the author. So i'm not seeing any issue.

Thanks,
Shane

#1189111
edge-not-ok.png

And why in Edge, in "Mio Profilo" page, where I'm the logged in user and the author of the Profilo post, I see this? So for conditional logic settings it don't should be displayed... And it is displayed with some issue...

#1189166

Shane
Supporter

Languages: English (English )

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

Hi Francesco,

The mio-profilo/ page this is where all the profiles are loaded correct?
Whats the profile page of the user that You provided for me because this page was not created by my user so I'm seeing the section in all instances.

For your own debugging to check the conditional, you can add debug="true" to your conditional and then check if ID's in the conditional are in fact the same.

Thanks,
Shane

#1189171

The mio-profilo/ page this is where is loaded the current user profile.

The Profile post is hidden link

and here the conditional logic work fine... mmmm

#1189187

Shane
Supporter

Languages: English (English )

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

edge.PNG

Hi Francesco,

No the mio-profile page is actually doing it correct. The code is loading the ID of the creator of the mio-profile page. Which is not the actual profile page that the user created.

Take a look here hidden link

This is the actual page of my user profile. If I go to the mio-profile page the user that is loaded is not the account you gave me. This why there are issues with the conditional.

It actually works fine in edge. See Screenshot

#1189192

If I go to the mio-profile page the user that is loaded is not the account you gave me. This why there are issues with the conditional.
Ok, and I need to solve this!
Else, I should do a clone of the Content template, and assign the new Content template to the mio-profilo and deleting the conditional logic and his content...
I think it is the fastest solution.

#1189235

Shane
Supporter

Languages: English (English )

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

Hi Francesco,

Could you let me know how the menu was added?

You may need to create a view that lists all the profile links and just add a filter to it so that it only displays the link the profile of the currently logged in user.

Thanks,
Shane

#1189253

So, before I have used the view, https://toolset.com/forums/topic/how-to-have-the-correct-value-from-the-loop/ here the ticket where To solution found was to use the conditional logic.
This because inside there is a shortcode of a messaging plugin that generate some issues when is inside the View....

But, the next work is to create the messaging system using toolset. But I think it will have the same issues.

#1189740

Shane
Supporter

Languages: English (English )

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

Hi Francesco,

I see however the this will need to change or figure some other way to add the messaging system. What you can do is to this page to display the results for the correct user you will need to pass their user ID into the URL.
hidden link

This way it will load the page for that user. However you will need to add the filter to your view to get the correct ID from the url parameter.

From there you can check if the user ID in the url is the same as the user id of the currently logged in user because as mentioned the mio-profilo page is a static page where you are loading the profiles but the user who visits isn't the author.

Thanks,
Shane