Site logo

[Resolved] Error – PHP 8.0

Home Forums Support [Resolved] Error – PHP 8.0

Home Forums Support Error – PHP 8.0

Viewing 15 posts - 1 through 15 (of 21 total)
  • Author
    Posts
  • #1605250
    Kumar

    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

    #1605292
    Tom
    Lead Developer
    Lead Developer

    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 🙂

    #1606089
    Kumar

    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

    #1606220
    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

    #1606960
    Tom
    Lead Developer
    Lead Developer

    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?

    #1607090
    Kumar

    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

    #1608245
    Tom
    Lead Developer
    Lead Developer

    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

    #1608296
    Kumar

    I think it looks the same
    See screengrab here
    https://snipboard.io/rBZLvM.jpg

    Regards
    Kumar

    #1609985
    Tom
    Lead Developer
    Lead Developer

    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/

    #1611187
    Kumar

    Not sure where the problem is.

    I have reverted back to php 7.4 and it has resolved the issue.

    Thanks
    Kumar

    #1611277
    Tom
    Lead Developer
    Lead Developer

    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.

    #1627579
    Kumar

    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

    #1628186
    Tom
    Lead Developer
    Lead Developer

    That username seems to have 2FA activated – can we deactivate that for now?

    #1628244
    Kumar

    Hi Tom

    Please try now.

    Thanks
    K

    #1629588
    Tom
    Lead Developer
    Lead Developer

    Does it still happen if you activate the parent theme instead of the child theme?

Viewing 15 posts - 1 through 15 (of 21 total)
  • You must be logged in to reply to this topic.