Skip Navigation

[Resolved] updated and having issues

This support ticket is created 3 years, 1 month 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 4 replies, has 2 voices.

Last updated by Luo Yang 3 years, 1 month ago.

Assisted by: Luo Yang.

Author
Posts
#2215289

im currently updating my old site and have run into a few issues after updates

my old site here hidden link you will see

1st place dog .

on my new site that as toolset updates and wordpress i have the following issue

hidden link

it has errors and is not loading the 1st place dog.

if i load an equivalant page where there is no entry for 1st place dog like this one the page loads fine

hidden link

to load the 1st place dog uses this view here
hidden link

the view is as follows

<div class="special-row-item-11">
<h1 style="text-align: center;">[types field='dog-appearance-position'][/types]</h1>
[wpv-conditional if="( $(wpcf-dog-appearance-position).id(dog-appearance) eq '3' )"][wpv-view name="view-for-no-1st-place"][/wpv-conditional]
[wpv-conditional if="( $(wpcf-dog-appearance-position).id(dog-appearance) ne '3' )"]
<h2><span style="color:red">[types field='dogs-awards' separator=', ' item='@dog-dog-appearance.parent'][/types] </span>

[wpv-view name="view-to-show-affix-in-results-on-single-event-page" wpvrelatedto="[wpv-post-id item='@dog-dog-appearance.parent']"]
<span class="uppercase">[wpv-post-link item='@dog-dog-appearance.parent']</span></h2>

[types field='dogs-breed' item='@dog-dog-appearance.parent'][/types] : [types field='dog-sex' item='@dog-dog-appearance.parent'][/types] : [types field='dogs-dob' style='text' format='F j Y' item='@dog-dog-appearance.parent'][/types] <hr>

Owner: [wpv-view name="view-to-show-person-in-results-of-an-event-on-single-event-page-1" wpvrelatedto="[wpv-post-id item='@dog-dog-appearance.parent']" role="Owner"]<hr>
Handler: [wpv-view name="view-to-show-person-in-results-of-an-event-on-single-event-page-1" wpvrelatedto="[wpv-post-id item='@dog-dog-appearance.parent']" role="Handler"]<hr>
Breeder: [wpv-view name="view-to-show-breeder-in-results-of-an-event-on-single-event-page" wpvrelatedto="[wpv-post-id item='@dog-dog-appearance.parent']" role="Breeder"] <hr>

Sire: [wpv-view name="View-to-show-dogs-related-sire-and-dam-single-event-page-dogs-results" ids="[types field='sire-of-dog' item='@dog-dog-appearance.parent' output='raw'][/types]"]<hr>

Dam: [wpv-view name="View-to-show-dogs-related-sire-and-dam-single-event-page-dogs-results" ids="[types field='dam-of-dog' item='@dog-dog-appearance.parent' output='raw'][/types]"]<br>[/wpv-conditional]
</div>

if i remove the lines at the top

[wpv-conditional if="( $(wpcf-dog-appearance-position).id(dog-appearance) eq '3' )"][wpv-view name="view-for-no-1st-place"][/wpv-conditional]
[wpv-conditional if="( $(wpcf-dog-appearance-position).id(dog-appearance) ne '3' )"]

hidden link
this page now loads

however i need those conditions working,
you can login using toolset and toolset to see the pages as they are member pages
could you please assist?
many thanks

i can give login details if you set a private reply thanks

#2215567

Hello,

In the latest version of Toolset plugins, please replace the "id" attribute with "item", for example, replace this line from:
[wpv-conditional if="( $(wpcf-dog-appearance-position).id(dog-appearance) eq '3' )"][wpv-view name="view-for-no-1st-place"][/wpv-conditional]

To:
[wpv-conditional if="( $(wpcf-dog-appearance-position).item(dog-appearance) eq '3' )"][wpv-view name="view-for-no-1st-place"][/wpv-conditional]

More help:
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/item-attribute/

#2216091

many thanks for the info , i have changed .id to .item , my page now loads but it no longer displays the info in the view ,just the title , is there anything else that needs changing ie. on the view i use [wpv-post-id item='@dog-dog-appearance.parent'] would that still work ?
once again many thanks
martin

#2216363

The shortcode should be able to work, please check you are using the correct relationship slug "dog-dog-appearance.parent".

If you still need assistance for it, you can provide your website credentials in below private message box, also point out the problem post URL and view URL, I need to test and debug it in a live website, thanks

#2217251

Thanks for the details, please check the post view "view to show dog appearances in single event page organiser":
hidden link

1) in section "Content Selection", It is querying "Dog Appearances" posts, and the custom field "Dog Appearance Position" is in the same post type "Dog Appearances"
hidden link

2) In section "Loop item in view to show dog appearances in single event page organiser" of above post view:
You can display the field "Dog Appearance Position" value directly without item attribute, for example:
[types field='dog-appearance-position'][/types]

Same as above, in the wpv-conditional shortcode, you can use it without item attribute, for example:

[wpv-conditional if="( $(wpcf-dog-appearance-position) eq '3' )"][wpv-view name="view-for-no-1st-place"][/wpv-conditional]
[wpv-conditional if="( $(wpcf-dog-appearance-position) ne '3' )"]
...
[/wpv-conditional]