Skip Navigation

[Resolved] After PHP ugrade to 8.0 I receive the error coming from layouts genesis

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

This topic contains 16 replies, has 2 voices.

Last updated by Angele 3 years, 8 months ago.

Assisted by: Waqar.

Author
Posts
#1885739

After PHP ugrade to 8.0 I receive the error coming from layouts genesis.

Fatal error: Declaration of Layouts_Integration_Layouts_Row_Type_Content::htmlOpen($markup, $args) must be compatible with WPDDL_Row_Type_Preset_Normal::htmlOpen($markup, $args, $row = null, $renderer = null) in /home/www/software_lupe/wp-content/plugins/layouts-genesis/application/layouts/row/type/content.php on line 16

#1890351

Hi,

Thank you for waiting.

During testing on my server, I couldn't reproduce this error.

Can you please share a clone/snapshot of your website, so that this can be investigated further?
( ref:https://toolset.com/faq/provide-supporters-copy-site/ )

Note: I've set your next reply as private.

regards,
Waqar

#1893551

Hi Angelika,

Thank you for sharing this and I'll keep you updated with the findings.

regards,
Waqar

#1894749

Thank you for waiting and I was able to reproduce this on my test server too.

I've raised this with the concerned team and will keep you updated through this ticket.

We appreciate your report.

#1894753

Hello Waqar,
I am glad, that you could reproduce the error. Thanks for the info and have a nice day 🌺

#1978375

Hello Waqar,

any Update here? 2 months gone now.

#1979301

Hi,

Thanks for checking in and I apologize I couldn't follow up on this sooner.

Our development team found that the file "/wp-content/plugins/layouts-genesis/application/layouts/row/type/content.php" found in your website's clone is different from the original plugin code that we rolled out.

It is likely due to some custom modifications added to that copy specifically and which can be fixed, by changing line #16, from


public function htmlOpen( $markup, $args ) {

To:


public function htmlOpen( $markup, $args, $row = null, $renderer = null ) {

This should do the trick and please let us know in case it still persists.

regards,
Waqar

#1979711

Thank you,
I have no idea, why this wrong string could happen. I assume, while I tested line 16 after the error messages. In my recent file, the line is, as you described (so like it should be).

But the error persists when I switch to PHP 8.0. I see a totally crashed website and the message about a *critical error*.
Strangely enough I don't get any further hints in error.log or when I set debug to true in wp-config.php.

#1979715

Hm, my previous post is not visible (at least for me).
So I post again:

I have no idea, why the line has been wrong in the file I sent to you.
On my installed website, the line is correct like you'd written

public function htmlOpen( $markup, $args, $row = null, $renderer = null ) {

I doube checked it and switched to PHP 8.8

The problem persists.

Strangely enough I don't get any debug messages, when I enable

 wp_debug

to true. And in the error.log the same.

#1979717

My replies don't show up, I tried twice. I sent you an email now. The problem persists

#1979741

Thanks for writing back.

I see 3 different messages posted from your side since my last reply. Can you refresh the ticket's page and confirm if you see them?
( https://toolset.com/forums/topic/after-php-ugrade-to-8-0-i-receive-the-error-coming-from-layouts-genesis/ )

Is it possible that someone worked on this website before you and made the custom changes to the plugin's files?

Here is the unmodified copy of the plugin (version 1.9.2) and you can compare the code in your copy and even test to activate it as it is:
hidden link

But please be advised that if the custom changes previously added in the plugin file(s) were to add some design changes, they'll be lost.

I'll recommend making a backup copy of your existing plugin files and then use the unmodified copy on the website and see if the error is fixed.

#1979753

Hello Waqar,
Can you refresh the ticket's page and confirm if you see them?
I have issues with Chrome and this ticket. Problaby a cache thing on your server? I do now see all posts.

Is it possible that someone worked on this website before you and made the custom changes to the plugin's files?
No this was me. I checked old backups and uploaded the original file. I have tested a lot to fix the issue myself.

The original file (you linked to) did not fix the issue. You had installed my mirror site (see https://toolset.com/forums/topic/after-php-ugrade-to-8-0-i-receive-the-error-coming-from-layouts-genesis/#post-1894749).

Are you able to confirm?

#1980867

Yes, I can confirm that I no longer see the errors/warnings related to Genesis Layout plugin after making the suggested change in the code.

Can you please share temporary admin login details, especially the FTP access details, so that I can check the plugin files in use?

I've set your next reply as private.

#1980885

Do I understand right, that you have tested with the mirror website, that I had sent you 2 months ago and you switched to PHP 8.0?
And you did not get a fatal error?

I get this error but no information in the error.log or wp-debug.log.

I do never give login credentials. You have a clone (mirror) website and should get this error too.

#1981009

Yes, your understanding is correct and after making the suggested change in the code, I no longer see the errors/warnings related to Genesis Layout plugin on your website's clone.

I've put that clone on an online server so that you can see it.
hidden link

The server's PHP info is available at:
hidden link

To see and log the errors and warnings, I've added these lines in the website's "wp-config.php" file:
( ref: https://wordpress.org/support/article/debugging-in-wordpress/ )


define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );

This screenshot shows the fatal error resulting from the Genesis Layouts plugin, that you originally reported in this ticket:
hidden link
( it was taken before making any changes to the Genesis Layouts plugin files )

After I made the suggested change in the plugin's code ( screenshot: hidden link ), that specific error from the Genesis Layouts plugin is fixed as you can see by visiting the website's homepage:
hidden link

There are other errors and warnings from other plugins as you can see online and the fatal error is now coming from the "responsive-menu" plugin:


Uncaught Error: Call to undefined function ctype_alpha() in /...../wp-content/plugins/responsive-menu/vendor/twig/twig/lib/Twig/Lexer.php:393

I hope this explanation helps.