Skip Navigation

[Resolved] taxonomy archive crashes with long description

This support ticket is created 4 years, 11 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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 3 replies, has 2 voices.

Last updated by Nigel 4 years, 11 months ago.

Assisted by: Nigel.

Author
Posts
#1406573

When I have a long description (say few K), and output it at archive using [wpv-taxonomy-archive info='description'], page just crashes. Sometimes it shows WP error about crash, and sometimes it shows some broken shortcodes. Are you aware of such limitations?

I'm pretty sure that custom wysiwyg field will work, but I'd prefer to use standard description.

#1407013

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Looking at the source code for the wpv-taxonomy-archive shortcode it really is quite simple, it just gets the queried object which identifies the current archive and returns the description.

The only potential problem I see arising from Toolset is that it passes it through a debugging filter first.

Can you test on your site with an even simpler version of the shortcode that skips the debug filter?

Register the shortcode [archive-description] with the following:

add_shortcode('archive-description', function () {

    $queried_object = get_queried_object();
    $return = $queried_object->description;

    return $return;
});

The only other gotcha here would be if you include this shortcode inside a conditional statement, where it is known there are limitations on the length of text that can be included as the content of the shortcode.

#1407093

Oh, I do check the description for being empty. But actually now I don't need it anymore. I'll disable the check, and see how it goes...

#1408043

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

It was likely the conditional shortcode, then, not the taxonomy archive shortcode.

That's a known problem, but one which we cannot do much about: https://toolset.com/documentation/user-guides/views/views-shortcodes/#wpv-conditional