Skip Navigation

[Resolved] View crashing after PHP 8 update

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 10 months, 4 weeks ago.

Assisted by: Nigel.

Author
Posts
#2680421
2a.png

I updated my server to PHP 8 and have found various issues since.

The issue I cannot resolve involves a view creating SVG paths, which makes certain pages crash, while others work fine (I don't know why only some crash).

The View is named "SVG Path Loops", and below is the incriminated code in the loop:
-----------------------------------------------------------------------------------
<g id="the-svg" class="svgel">

<path id="p-[wpv-post-id]" class="[wpv-view name="svg-path-color"]" d="[types field='path' output='raw'][/types]" style="fill:none;" title="[wpv-post-title] - [types field='grade'][/types]"/>

<circle id="c-[wpv-post-id]" class="rcircle" style="fill:white; stroke:rgb(255,0,0); stroke-opacity:0.45;" cx=[punct]x[/punct] cy=[punct]y[/punct] r="15"/>

<text id="t-[wpv-post-id]" class="rposition" style="fill:rgb(0,0,0); font-size:15px; font-weight:900" fill="black" x=[punct]tx[/punct] y=[punct]ty[/punct]> [types field='route-position' output='raw'][/types] </text>

<text visibility="hidden" id="l-[wpv-post-id]" class="labeltxt" fill="black" text-anchor="middle" x=[punct]ttx[/punct] y=100>[wpv-post-title] - [types field='grade'][/types] / [types field='height'][/types]m</text>

</g>

#2680442

Nigel
Supporter

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

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

Hi there

Do you have more details about the errors?

When you say certain pages "crash", I assume you mean they fail to load on the front end. Which sounds like a PHP error occurs and prevents the complete page from being generated.

Do you have details of the errors?

If you haven't already, turn on the debug log by editing your wp-config.php file and change the line with WP_DEBUG like so:

define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
define('WP_DISABLE_FATAL_ERROR_HANDLER',true);

That will create a debug.log file in your /wp-content/ directory which you can examine in any text editor.

Try visiting the same pages that crash and then inspect the log.

Can you share what you find?

#2680514
error.png

Hi Nigel,
yes, when i say it "crashes" I believe it is a PHP error, as I get a blank page with a general error (see image)
I checked the Debug Log but cannot understand why this is happening

You can have a look at this page: hidden link

Debug log: hidden link

#2680605

Nigel
Supporter

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

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

In the debug.log you shared I can see lots of errors, many of which appear to originate with custom code added at Toolset > Settings > Custom Code.

Could you please disable all of the code snippets you added there, and then try to load the page again to see if it still fails or now works.

#2680699

Thank you Nigel. I see it is coming from a specific snippet. I'll find a contractor from your lists to solve this.
all the best