Archived topic
Error - PHP 8.0
20 replies · Started by Kumar on January 4, 2021
Hi,
I have the following error.
PHP message: PHP Fatal error: Uncaught ValueError: Unknown format specifier "#" in /www/parenthoodguide_108/public/wp-content/themes/generatepress/inc/structure/post-meta.php:460
PHP 8, latest GP And GP Premium
Could you please help?
Regards
Kumar
Hi there,
There is no # character on that line: https://github.com/tomusborne/generatepress/blob/3.0.2/inc/structure/post-meta.php#L460
Has the file been altered at all?
Let me know :)
Hi Tom,
Happy New Year!
Please see here and also the private box
https://snipboard.io/7BafKJ.jpg
These errors appear only for my french archive pages. Could it be conflicting with some CSS or hook?
Thanks
Kumar
Additional info to the above:
Hi Tom,
When I downgraded to 7.4 to my staging site - the french archives seem to work okay.
See url in private box.
Thanks
Kumar
There was some broken HTML in your private replies, so I had to remove them.
However, from what I saw, they were still saying something about line 460.
That line is compatible with PHP 8.0 - it's a core WordPress function.
Has the file on your end been altered at all?
I don't think we have altered any file as far as I know.
It makes me wonder if it is a hack or something? I do have a GP child theme
Appreciate any guidance on this.
Regards
Kumar
Does your line 460 of the following file match the core file?: https://github.com/tomusborne/generatepress/blob/3.0.2/inc/structure/post-meta.php#L460
I think it looks the same
See screengrab here
https://snipboard.io/rBZLvM.jpg
Regards
Kumar
I'm not sure what the error would be there then, as there is no # character on that line or in the core function that it's referencing: https://developer.wordpress.org/reference/functions/the_title_attribute/
I do have a test site using PHP8 and I'm not getting any errors: http://testingm.kinsta.cloud/
Not sure where the problem is.
I have reverted back to php 7.4 and it has resolved the issue.
Thanks
Kumar
We'll continue testing on our end.
On your end, it may be worth testing a fresh install on a PHP 8 install to see if you run into the same issue.
Hi Tom,
I have tried to re-install WordPress core on staging, but that didn't help either.
Changed to the 2021 default theme and the archive page loaded but when I re-activated GP - this came back.
https://staging-parenthoodguide.kinsta.cloud/fr/pregnancy/
Not sure, something surely up with this. (it looks like if the theme is expecting something else but somehow receives a # instead)
Would you mind looking into this for us?
Regards
K
That username seems to have 2FA activated - can we deactivate that for now?
Hi Tom
Please try now.
Thanks
K
Does it still happen if you activate the parent theme instead of the child theme?