Skip Navigation

[Resolved] after a theme update im struggling to show info

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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 14 replies, has 1 voice.

Last updated by martinP-13 1 week ago.

Assisted by: Minesh.

Author
Posts
#2841893

if you visit here (must be logged in (use toolset1 v@@FwYv4m# )
hidden link and in the date selector choose nov 2019 on the events under the 1st hover over the event
Novice AV Spaniel
CARMARTHENSHIRE WORKING GUNDOG SOCIETY 1 , now you will see judges and winner at the bottom of the list , this is populated with toolset it uses these 2 lines in my child theme using the event calendar template over ride
single-events.php
$additional_data['judgeOutput'] = do_shortcode( '[wpv-view name="judge-on-tooltip" wpvrelatedto="'.$post->ID.'" role="Judge"]' );
and
$additional_data['winnerOutput'] = do_shortcode( '[wpv-view name="view-to-show-all-dogs-related-to-an-event-tooltip-1" wpvrelatedto="'.$post->ID.'"]' );0

and in the 2nd template overide tooltip.php it uses these 2 lines
<div class="special-row-item-99"> <div class="tribe-event-additional_data">JUDGES: [[=raw judgeOutput]]</div></div>
and
<div class="special-row-item-99"> <div class="tribe-event-additional_data"> [[=raw winnerOutput]]</div></div>
as you see this works fine . (this is an old site)

i have updated theme and more important the events calendar hanged the structure of there plugins templates and dependants ( most annoying after much custom work and no warning)

so the equivalent page on my new site is here
hidden link

if you hover over the same events you will see that the judges and winner re now not found and the statement when there are no results is found.

the events calendar now uses the following to add extra info to the tooltip (this is how ever for there own additional fields)
hidden link

i have added the above 4 lines to the following file (the events calendar)
wp-content/themes/listivo-child/tribe/events/v2/month/ tooltip-extra-fields.php

as you see this does not find the info needed , in the functions.php i have the following added

add_action( 'tribe_template_after_include:events/v2/month/mobile-events/mobile-day/mobile-event/title',
function ( $file, $name, $template ) {
$template->template( 'month/tooltip-extra-fields' );
},
10,
3
);

can you please advise how i can drag this info in ? i have quite afew isues like this and hoping i can learn from this one sort the rest .. any logins needed can be provided , the site is backed up and can be worked on no problem,.

#2841921

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - I will require admin access details in order to check your current theme template and once I review that I will be able to guide you in the right direction.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#2841949

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I will require FTP/SFTP access details as well in order to access the theme files.

Can you please send that.

I have set the next reply to private which means only you and I have access to it.

#2842214

the file that is trying to get the winner/judges is a bit tricky to find you can locate it here
"httpdocs/wp-content/themes/listivo-child/tribe/events/v2/month/calendar-body/day/calendar-events/calendar-event/tooltip/title.php" its using the 4 lines in the 1st post
thankyou

#2842271

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I would say honestly that this is not a Toolset issue and you may need to check with Events calendar about the changes they made.

However - I would like to go extra mide and I would like to know, are you usnig the following view to display the Judes belogns to your event?
=> hidden link

If yes, are you using the above view at any other post/page?

#2842351

thankyou minesh
hidden link is not used in any other location just as above , that is a view i added to try to get this working , it wasnt used in the old site .
the old site used "<div class="special-row-item-99"> <div class="tribe-event-additional_data">JUDGES: [[=raw judgeOutput]]</div></div>"

from memory on the old site with older events calendar it used/month/single_Event.php to get the event/post ID for each event on the month calendar . the tooltip would then have the post/event id needed by toolset .
on the new set up the post/event id is not got by single_event.php because that file is no longer used . im trying to find out what file is now getting this info so i can get the event/post id for toolset ready to given to the tooltip .

ive reached out to the events calendar for clarity what file is getting the event/post id for each event on the calendar so we can pass the details needed for toolset in the tooltip.

thankyou once again
martin

#2842381

hi minesh , the events calendar confirmed the file responsible for getting each event for the calendar . this file gets the post id/events id etc . if can be found here (i made a template override so feel free to add anything needed for toolset if its needed)

httpdocs/wp-content/themes/listivo-child/tribe/events/v2/month/calendar-body/day/calendar-events/calendar-event.php

im hoping this helps to get to the bottom of this , i think its to do with toolset using post id and not event id (the way i set up originally)

once again thanks alot minesh

#2842739

hi minesh i have been doing some research on this . if i add

post id<?php $post_id = get_the_ID();
echo $post_id;

and also

event id <?php $event_id = get_the_ID();
echo $event_id;

to my tooltip file "httpdocs/wp-content/themes/listivo-child/tribe/events/v2/month/calendar-body/day/calendar-events/calendar-event/tooltip/title.php"

i get a reply for both the event id and the post id . both id are the same , but each events on the calndars tooltip has a different id .

take a look here hidden link and hover over a few events . you will notice the id's are not post or event ids . this is due to the events calendar recurring event processing . if you look here hidden link

it gives very good info , i do not know how to use this info how ever , but im sure it will cure my issue!! if the correct function or correct code is placed in my tooltip.php ....

many thanks again minesh any ideas ?
martin

#2843192

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Can you please check now: hidden link

I can see correct Judeges and Winner list on tooltip popup.

I've adjusted the code within the following PHP template file as given under:
=> httpdocs/wp-content/themes/listivo-child/tribe/events/v2/month/calendar-body/day/calendar-events/calendar-event/tooltip/title.php


//getting the current event ID and convering the current event ID to actual post ID
$event_id = get_the_ID();
$current_post_id = \TEC\Events\Custom_Tables\V1\Models\Occurrence::normalize_id( $event_id );

 <div class="special-row-item-99"><?php echo '<strong>Judges:</strong>' ?>
      <?php // echo do_shortcode( '[wpv-view name="view-to-show-judges-on-a-single-event-tooltip"]' ); ?>
		  <?php  echo do_shortcode( '[wpv-view name="view-to-show-judges-on-a-single-event-tooltip" wpvrelatedto="'.$current_post_id.'"]' );  ?> 
  </div>
	
	  <div class="special-row-item-99"><?php echo '<strong>Winner:</strong>' ?>
      <?php // echo do_shortcode( '[wpv-view name="view-to-show-judges-on-a-single-event-tooltip"]' ); ?>
		   <?php echo do_shortcode( '[wpv-view name="view-to-show-all-dogs-related-to-an-event-tooltip-1" wpvrelatedto="'.$current_post_id.'"]' ); ?>  
  </div>

#2843194

hi minesh ,i have some updates on this issue.

this worked on my old site as the events used the JSON to pass the post id to the tooltip . my toolset post_id fields where fetched no problem. move onto the new setup and the issue.

the events calendar now has recuring events (i do not use these but the events calendar still uses this setup ).
rather than each single event on the calendar month view using its event_id and post_id (which are apparently the same number)
it uses a Provisional Event ID . you can see an example here ( hidden link ).

if you now view this page here hidden link and hover over carmarthenshire on the 1st of nov
you can now see at the bottom the id's that are being gotten .

if you view the php template here wp-content/themes/listivo-child/tribe/events/v2/monthcalendar-body/day/calendar-events/calendar-event/tooltip/title.php

you can see the code used to get the various id's, the one that gets the correct id is <?php echo $post_id = \TEC\Events\Custom_Tables\V1\Models\Occurrence::normalize_id( $event_id );?> .

the file responsible for getting each events id;s is wp-content/themes/listivo-child/tribe/events/v2/monthcalendar-body/day/calendar-events.php

while i undesrtand what is happening and have an idea on how to fix it . i do not have the skills or knowledge to write that code to get the post_id . the events calendar can not help me as they stated they do not know how toolset works .
i would be very appreciative if you have any suggestions ? thanks alot as always
martin

#2843196

oh !!! i was writing this as you was busy fixing this !!

i can confirm it appears to be working flawlessly !!

i cannot thankyou enough , your knowledge and willingness to help is some what impressive

many many thanks

#2843201

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Glad to know that the solution I shared help you to resolve your issue.

You can mark resolve this ticket with some different message like "This issue is resolved now/today" and share your feedback 🙂

#2843208

thats not a problem , could you just confirm in
httpdocs/wp-content/themes/listivo-child/tribe/events/v2/month/calendar-body/day/calendar-events/calendar-event/tooltip/title.php

do i need these lines now or not ? (im presuming not)

$additional_data = array();
$additional_data['judgeOutput'] = do_shortcode( '[wpv-view name="judge-on-tooltip" wpvrelatedto="'.$post->ID.'" role="Judge"]' );
$additional_data['winnerOutput'] = do_shortcode( '[wpv-view name="view-to-show-all-dogs-related-to-an-event-tooltip-1" wpvrelatedto="'.$post->ID.'"]' );

can i change to
[wpv-view name="judge-on-tooltip" wpvrelatedto="'.$post->ID.'" role="Judge"]
too
[wpv-view name="judge-on-tooltip" wpvrelatedto="'.$current_post_id.'" role="Judge"] to use the original view . ( i presume so . )

also would i edit the view or the events calendar to make the info grabbed as a link ?

many thnaks

#2843326

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I do not added the code you mentioned:

$additional_data = array();
$additional_data['judgeOutput'] = do_shortcode( '[wpv-view name="judge-on-tooltip" wpvrelatedto="'.$post->ID.'" role="Judge"]' );
$additional_data['winnerOutput'] = do_shortcode( '[wpv-view name="view-to-show-all-dogs-related-to-an-event-tooltip-1" wpvrelatedto="'.$post->ID.'"]' );

You can go for code clean and remove any unwanted code.

can i change to
[wpv-view name="judge-on-tooltip" wpvrelatedto="'.$post->ID.'" role="Judge"]
too
[wpv-view name="judge-on-tooltip" wpvrelatedto="'.$current_post_id.'" role="Judge"] to use the original view . ( i presume so . )
===>
Yes you can and check the result.

#2843342

all cleaned up , view changed andworking flawlessy , thankyou minesh