Skip Navigation

[Gelöst] showing info where not wanted

This support ticket is created vor 4 Jahre, 11 Monate. 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.

Heute stehen keine Supporter zur Arbeit im Werkzeugsatz-Forum zur Verfügung. Sie können gern Tickets erstellen, die wir bearbeiten werden, sobald wir online sind. Vielen Dank für Ihr Verständnis.

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/Karachi (GMT+05:00)

Dieses Thema enthält 13 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von Waqar vor 4 Jahre, 11 Monate.

Assistiert von: Waqar.

Author
Artikel
#1267311

ok , so here versteckter Link i have a tool tip where when you hover over event it opens a tooltip.
i have used this view here versteckter Link
i have inserted it into this file here /home/gundogworldco/public_html/wp-content/themes/simply-responsive-cp/tribe-events/month/mobile.php using <?php echo do_shortcode( '[wpv-view name="judge-on-tooltip"]' ); ?>.

it functions as i want , the only problem is if you hover over the event on the 4th of june it is correct, if you goto the next month (july) it also adds it to the tooltips for all those events (those events have no judges assined yet however.)

if you click on the events the judge only shows on the event for the 4th of june as it should.

#1267313

you must be logged in to see the events calendar page use the same details as wp-admin login details please

#1267939

Waqar
Supporter

Sprachen: Englisch (English )

Zeitzone: Asia/Karachi (GMT+05:00)

Hi Martin,

Thank you for contacting us and I'd be happy to assist.

Based on what you've shared, this seems to be the scope issue, after the calendar's view is refreshed through the AJAX.

The view in question no longer seems to have the correct ID of the current event whose Tooltip is being viewed.

To fix this you can follow these steps:

1. In the view's "Query Filter" settings ( at versteckter Link ), select the relationship name and also the option "The post with ID set by the shortcode attribute: wpvrelatedto"
( screenshot: versteckter Link )

2. Next, in your template file where you're calling the view ( do_shortcode( '[wpv-view name="judge-on-tooltip"]' ) ), update the shortcode, to specifically include the ID of the current event whose Tooltip is being viewed:


echo do_shortcode( '[wpv-view name="judge-on-tooltip" wpvrelatedto="'.$event_ID.'"]' );

Important note: Please make sure that $event_ID contains the correct event's ID in the template and you can consult, The Events Calendar plugin's support team or documentation for this.

I hope this helps and please let me know if you need any further assistance around this.

regards,
Waqar

#1268341

thanks waqas , this didnt resolve the problem but made it worse , it was late when i made the post , there is also this file /home/gundogworldco/public_html/wp-content/themes/simply-responsive-cp/tribe-events/month/single-event.php i think the tooltip gets info from there.

#1269173

does it make sense waqas? the calendar is subscription only , it is meant to be release in 6 1/2 hours , i can reelease with out this problem fixing , what do you think?

#1269249

Waqar
Supporter

Sprachen: Englisch (English )

Zeitzone: Asia/Karachi (GMT+05:00)

Hi Martin,

Thanks for writing back and sorry about the delay.

Let me rephrase what seems to be the issue and how it can be solved.

If you'll load these pages directly in the browser, you'll see that the view "judge on tooltip" functions correctly:
versteckter Link
versteckter Link

But, if you navigate to versteckter Link by clicking "July" from versteckter Link only then the issue with the view can be seen.

This is because of The Events Calendar plugin's AJAX feature in the calendar view which is reloading the month, without reloading the page.

To get this fixed, you have a couple of choices:

1. A simpler option is to consult The Events Calendar plugin's support team and ask how this AJAX feature can be disabled from the calendar.

OR

2. If you'd like to keep this AJAX feature, you can ask The Events Calendar support team to let you know how can you access the ID of the current event (which updates properly with the AJAX function) in the template file, where you're calling your view.

Once you know how to get that ID, you can follow steps 1 and 2, that were mentioned in my first reply.

I hope this makes it more clear.

regards,
Waqar

#1271657

this is incorrect

If you'll load these pages directly in the browser, you'll see that the view "judge on tooltip" functions correctly:
versteckter Link
versteckter Link

But, if you navigate to versteckter Link by clicking "July" from versteckter Link only then the issue with the view can be seen.

the tooltip shows the wrong info no matter what page and ajax loaded or not. in the events calendar settings there is a setting to disable live refresh. if this is disabled the problem is still there.

#1271737

Waqar
Supporter

Sprachen: Englisch (English )

Zeitzone: Asia/Karachi (GMT+05:00)

Hi Martin,

I'll need to see how the view "judge on tooltip" is being called into the template file on your website, to troubleshoot this.

Can you please share a backup/snapshot of your website, in reply to this message?

Here is a guide on how to share a backup/snapshot:
https://toolset.com/faq/provide-supporters-copy-site/

Note: Your next reply will be private so that you can share it securely.

regards,
Waqar

#1271903
#1272557

did you get the files ok waqas?

#1272657

Waqar
Supporter

Sprachen: Englisch (English )

Zeitzone: Asia/Karachi (GMT+05:00)

Hi Martin,

Thank you for the duplicator package and I was able to download and deploy it successfully, on my own server.

Unfortunately, I'm having some difficulty with a number of errors/warnings, most likely due to the difference in the PHP version used between the two servers, but I've made some progress around it.

I'll need some more time to complete this troubleshooting and will share my findings, as soon as, I've found the missing link.

regards,
Waqar

#1272949

thanks waqas , here is the response from the event tribe help desk

Hello,

it looks like the exact same judge is being displayed on each event tooltip, regardless of any judge info on the individual events. I think what Waqar was saying about using the event ID is correct.

It's a little bit difficult for me to tell you the best way to add the ID without being familiar with the plugin and shortcode you're using (I tried to take a look at how this was configured on this page but wasn't able to access it), but for the month view tooltip, it can be found in the $event_id variable in wp-content/plugins/the-events-calendar/src/views/month/single-event.php. Within the context of the tooltip.php template where you have added your shortcode, try using [[=eventId]] if $event_id doesn't work in the shortcode. You can also try using the global $post, which in the context of the tooltip, should be the current event.

Thanks,

Jennife

#1273269

Waqar
Supporter

Sprachen: Englisch (English )

Zeitzone: Asia/Karachi (GMT+05:00)

Hi Martin,

Thank you for waiting and for sharing the message from the Tribe's help desk.

During troubleshooting, I noticed that the way The Event Calendar's plugin's template for the Tooltip works, it is not a good idea to call the Toolset View's output inside the "tooltip.php" file.

Instead, the output from the view to show the judge's information should be called in the parent file "single-event.php" and then it can be passed on to the tooltip template ( "tooltip.php" file ).

1. Please open the "single-event.php" from your theme and update your code from:


$additional_data['Stake'] = isset($customFields['Stake']) ? $customFields['Stake'] : '';
$additional_data['Close'] = isset($customFields['Close']) ? $customFields['Close'] : '';
$additional_data['Draw'] = isset($customFields['Draw']) ? $customFields['Draw'] : '';

To:


$additional_data['Stake'] = isset($customFields['Stake']) ? $customFields['Stake'] : '';
$additional_data['Close'] = isset($customFields['Close']) ? $customFields['Close'] : '';
$additional_data['Draw'] = isset($customFields['Draw']) ? $customFields['Draw'] : '';
$additional_data['judgeOutput'] = do_shortcode( '[wpv-view name="judge-on-tooltip" wpvrelatedto="'.$post->ID.'"]' );

Note: how the output of the view is being stored in a template's variable, so that it can later be used through a template tag.

2. Next, in your theme's "tooltip.php" file, you can show the judge's information like this:


<div class="tribe-event-additional_data">JUDGES: [[=raw judgeOutput]]</div>

3. To remove extra HTML content from the view's output, you can check the option "Disable the wrapping DIV around the View", just above the "Output Editor" section, from the view' edit screen.

I hope this helps and please let me know how it goes.

regards,
Waqar

#1273541

unbelievable !! you nailed it waqar! thank you so much.... if you email me at martinprocter@hotmail.co.uk a charity of your choice i will make a donation for all the help you have given me with my site. im very appreciative. thanks again its perfect!!

#1273553

Waqar
Supporter

Sprachen: Englisch (English )

Zeitzone: Asia/Karachi (GMT+05:00)

Hi Martin,

So glad that it is sorted out.

Appreciate your generous offer and feel to reach to us anytime - we're here to help!

regards,
Waqar

Dieses Ticket ist jetzt geschlossen. Wenn Sie ein Toolset Kunde sind und Hilfe benötigen, eröffnen Sie bitte ein neues Support-Ticket.