Skip Navigation

[Resolved] Split: Templates problems after update

This thread is resolved. Here is a description of the problem and solution.

Problem:

The issue here was that the user's frontend page was not loading correctly and was throwing the error

Fatal error: Uncaught Error: Object of class WP_Term could not be converted to string in /home/travelingfaq/public_html/dev/wp-content/plugins/toolset-blocks/vendor/toolset/dynamic-sources/server/Integrations/ThirdParty.php:157 Stack trace: #0 /home/travelingfaq/public_html/dev/wp-content/plugins/toolset-blocks/vendor/toolset/dynamic-sources/server/Integrations/ThirdParty.php(157): str_replace('\r\n', '<br />', Object(WP_Term)) #1 /home/travelingfaq/public_html/dev/wp-includes/class-wp-hook.php(292): Toolset\DynamicSources\Integrations\ThirdParty->replace_in_shortcode_output(Object(WP_Term), '__current_post', 4615, 'post-taxonomies...', 'age-group', Array) #2 /home/travelingfaq/public_html/dev/wp-includes/plugin.php(212): WP_Hook->apply_filters(Object(WP_Term), Array) #3 /home/travelingfaq/public_html/dev/wp-content/plugins/toolset-blocks/vendor/toolset/dynamic-sources/server/DynamicSources.php(811): apply_filters('toolset/dynamic...', Object(WP_Term), '__current_post', 4615, 'post-taxonomies...', 'age-group', Array) #4 / in /home/travelingfaq/public_html/dev/wp-content/plugins/toolset-blocks/vendor/toolset/dynamic-sources/server/Integrations/ThirdParty.php on line 157

Solution:
Through testing I was able to find that the issue was being caused by using Taxonomies as a dynamic content option for the Ultimate addon for gutenburg info box block.

At the moment the issue has been escalated to our 2nd tier supporters and developers.

However the workaround to this can be seen at the link below.

https://toolset.com/forums/topic/split-templates-problems-after-update/#post-2070369

This support ticket is created 3 years, 12 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
- 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)

This topic contains 7 replies, has 2 voices.

Last updated by nadavL 3 years, 11 months ago.

Assisted by: Shane.

Author
Posts
#2070241

Guys, I really don't know what else to do.
I just can't build the site. I haven't made any progress for over a week. Each time there's something else that stops working and crushes the website.

I've set a dev environment to avoid more problems and I restored the site from a backup of May 16, before the problems started.
I rebuild everything I've done during toes days, it seems to work fine.

Then I started working on the site and after few hours, something went wrong. Now, one specific Tour showing an error with an empty page (see image 1 attached). Other Tour posts seem ok.
The link in the error message is: https://wordpress.org/support/article/faq-troubleshooting/

I really don't know what to do. I'm working only with plugins and themes recommended by you and feel like the development just going backward.

You can check it by going to hidden link and then:
* Click on 'Trip Planner' and choose 'Overview Guide To Travel In Greece'
* On the next page, scroll down and under 'Related Tours' title open each of the linked tours and you'll see that 2 are working fine, but "Test Tour 4 Connected to Greece" doesn't work.

Please advise what to do. I really need to finish building this website.

Thanks

#2070245

Shane
Supporter

Languages: English (English )

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

Hi Nadav,

Given that the previous ticket was marked as resolved, the credentials for the site was automatically removed.

Can you provide them once more so that I can have a look ?

Thanks,
Shane

#2070369

Shane
Supporter

Languages: English (English )

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

Screenshot 2021-05-27 at 10.56.56 AM.png

Hi Nadav,

I've found the issue. It turns out the Ultimate addon for Gutenburg is causing the error below to be thrown.

Fatal error: Uncaught Error: Object of class WP_Term could not be converted to string in /home/travelingfaq/public_html/dev/wp-content/plugins/toolset-blocks/vendor/toolset/dynamic-sources/server/Integrations/ThirdParty.php:157 Stack trace: #0 /home/travelingfaq/public_html/dev/wp-content/plugins/toolset-blocks/vendor/toolset/dynamic-sources/server/Integrations/ThirdParty.php(157): str_replace('\r\n', '<br />', Object(WP_Term)) #1 /home/travelingfaq/public_html/dev/wp-includes/class-wp-hook.php(292): Toolset\DynamicSources\Integrations\ThirdParty->replace_in_shortcode_output(Object(WP_Term), '__current_post', 4615, 'post-taxonomies...', 'age-group', Array) #2 /home/travelingfaq/public_html/dev/wp-includes/plugin.php(212): WP_Hook->apply_filters(Object(WP_Term), Array) #3 /home/travelingfaq/public_html/dev/wp-content/plugins/toolset-blocks/vendor/toolset/dynamic-sources/server/DynamicSources.php(811): apply_filters('toolset/dynamic...', Object(WP_Term), '__current_post', 4615, 'post-taxonomies...', 'age-group', Array) #4 / in /home/travelingfaq/public_html/dev/wp-content/plugins/toolset-blocks/vendor/toolset/dynamic-sources/server/Integrations/ThirdParty.php on line 157

Through my checks it is being thrown because of the use of the dynamic source for the Taxonomy term in the description of the Info Box block from the Ultimage addon for Gutenburg.

I've found a workaround for this by not using the dynamic source in the sidebar but using our Inline Dynamic Source option. See Screenshot.

Once you remove the dynamic source option in the sidebar, just click in the description space on the block, you will get the options from my screenshot where you see i've highlighted the inline dynamic source option. Clicking this will present you with the options to add the taxonomy to the block as well.

I've already implemented the workaround for you and the page should be loading fine. I also escalated the issue to our 2nd tier supporters so they can have a look at the issue as well, however this should get you going with your website.

Thanks,
Shane

#2070393

Shane, thank you very much for that help.

Please note 2 things:
1. I have the same block using taxonomy on the same Tours template (see attached image) and this doesn't cause any issues.
2. (you might wanna split it) I have Accordion Block with FAQ. Each time I edit that page this view resets and I have to choose the Accordion and reselect the FAQ source. It's an easy fix but shouldn't happen.

Thanks

#2070395

Shane
Supporter

Languages: English (English )

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

Hi Nadav,
1. I have the same block using taxonomy on the same Tours template (see attached image) and this doesn't cause any issues.

I'm not seeing the attached image. Can you resend the image.

2. (you might wanna split it) I have Accordion Block with FAQ. Each time I edit that page this view resets and I have to choose the Accordion and reselect the FAQ source. It's an easy fix but shouldn't happen.

Can you send me a link to the page with issue.

Thanks,
Shane

#2071109
Screenshot 2021-05-27 191618.jpg

1. Attached

2. It's Toolset Template >> Template for Trips

Thanks

#2071249

Shane
Supporter

Languages: English (English )

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

Hi Nadav,

Not sure why it doesn't throw an error for this taxonomy, however I was able to replicate the issue and submitted to our 2nd tier for further review.

The accordion is from the UAG plugin so I wouldn't be able to debug this to see what the issue is. I would recommend getting in touch with Ultimate Addon for Gutenburg team for them to have a look at this is further details.

However I did add some text to the bottom of the template and when i saved the accordion was still there.

Thanks,
Shane

#2071327

My issue is resolved now. Thank you!