Skip Navigation

[Escalated to 2nd Tier] conditional

This support ticket is created 3 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.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Tagged: 

This topic contains 12 replies, has 2 voices.

Last updated by Christian Cox 3 years, 9 months ago.

Assisted by: Christian Cox.

Author
Posts
#1954155

Try to execude view inside the condition, but wpv-view shortcode isn´t evaluated. Just printed on the screen.

While first two calls to past-meetups and next-meetups execute well, the other two embedded in wpv-condition don´t. What could be the reason?
Since i use this inside a sidebar i figured out, that it works well within common widgets. Instead of widgets i tried to use "Elements" from GeneratePress-Pro Theme and embedded these wpv-vies and conditions. It didn´t work as described. So looks like a compatibility issue.

[wpv-view name="past-meetups"]
[wpv-view name="next-meetups"]
--------
[wpv-conditional if=" ( ( NOW() lt $(wpcf-meetup-date) ) ) " debug="true" ]
Nächste Meetups
[wpv-view name="next-meetups"]
[/wpv-conditional]

[wpv-conditional if=" ( ( NOW() gte $(wpcf-meetup-date) ) ) " debug="true" ]
Vergangene MeetUps
[wpv-view name="past-meetups"]
[/wpv-conditional]
#1954253

Find out, that this could be a compatibility problem.

#1954561

Okay I'll be glad to take a closer look. I may need to log in to wp-admin to see how you have implemented Elements from GeneratePress so I can try to reproduce the problem in a local site. Can you provide login credentials here and provide a URL where I can see the problem on the front-end of the site?

#1961793

Hello, I apologize for the delay in response. I just tried to log in and take a closer look but I see a Fatal Error when I try to log in:

Warning: require_once(/home/www/zwift/wp-content/plugins/ob-zwift\vendor\autoload.php): failed to open stream: No such file or directory in /home/www/zwift/wp-content/plugins/ob-zwift/ob-zwift.php on line 16

Fatal error: require_once(): Failed opening required '/home/www/zwift/wp-content/plugins/ob-zwift\vendor\autoload.php' (include_path='.:/usr/share/php') in /home/www/zwift/wp-content/plugins/ob-zwift/ob-zwift.php on line 16

I'll try again in a few minutes to see if its just a temporary issue.

#1962881

Okay I was able to log in today and see how your Elements and conditionals are set up. I'm going to try to run some similar tests in a local environment to see if the problem is easily reproducible. I'll give you an update shortly.

#1962971

Okay I was able to run some tests locally and it seems that there is a compatibility issue with GP Premium's Elements feature and Toolset's conditional features. I see similar problems when using a conditional block or a conditional shortcode. In either case, content nested inside those conditionals is simply written to the page as shortcodes. If I use a conditional block and place other Toolset block content inside that conditional block, the results are the same - content is written out to the page as shortcodes. So it seems we have a compatibility issue here. Let me ask my 2nd tier support team to take a look at this, and I'll give you an update when I have some feedback to share.

#1963973

thanks, i also tried a lot - without success.

#1969541

Hi, just a quick update to let you know this issue has been escalated to our developers for resolution. I'll keep you posted here as I receive more information.

#1974523
#1974525
#1974563

Hello, I think the issue you experienced is unrelated to the issue described in the erratum. That erratum is specifically about Block Editor styles applied to GP blocks in Content Templates. For example, if you wanted to add a custom text color or font-family for a GP Button block in your post's Content Template, the GP-generated CSS would not include those styles on the front-end post.

The issue you have experienced is quite different, it is related to Toolset shortcodes not being executed inside an Element.

#1990869

if i use it as a after- or before-sidebar-hook in GP elements, it works. But not in the right way since i want to see it inside the sidebar. In this case the issue still remains.

#1990903

Thanks, I will let you know when I have information about this issue from our developers.