[Resolved] PHP Errors When Trying to make Child Theme

Home Forums Support [Resolved] PHP Errors When Trying to make Child Theme

Home Forums Support PHP Errors When Trying to make Child Theme

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1266790
    Michael

    I am looking to create a child theme and get the following php errors when doing so:

    Notice:  Trying to access array offset on value of type null in ...wp-content/plugins/gp-premium/page-header/functions/functions.php on line 25
    
    Notice:  Trying to access array offset on value of type null in ...wp-content/plugins/gp-premium/page-header/functions/functions.php on line 26
    
    Notice:  Trying to access array offset on value of type null in ...wp-content/plugins/gp-premium/page-header/functions/functions.php on line 32
    
    Notice:  Trying to access array offset on value of type null in ...wp-content/plugins/gp-premium/page-header/functions/functions.php on line 37
    
    Notice:  Trying to access array offset on value of type null in ...wp-content/plugins/gp-premium/page-header/functions/functions.php on line 42
    
    Notice:  Trying to access array offset on value of type null in ...wp-content/plugins/gp-premium/page-header/functions/functions.php on line 46
    
    Notice:  Trying to access array offset on value of type null in ...wp-content/plugins/gp-premium/page-header/functions/functions.php on line 52
    
    Notice:  Trying to access array offset on value of type null in ...wp-content/plugins/gp-premium/page-header/functions/functions.php on line 649
    
    Notice:  Trying to access array offset on value of type null in ...wp-content/plugins/gp-premium/page-header/functions/functions.php on line 649
    
    Notice:  Trying to access array offset on value of type null in ...wp-content/plugins/gp-premium/page-header/functions/functions.php on line 653
    
    Notice:  Trying to access array offset on value of type null in ...wp-content/plugins/gp-premium/page-header/functions/functions.php on line 649
    
    Notice:  Trying to access array offset on value of type null in ...wp-content/plugins/gp-premium/page-header/functions/functions.php on line 649
    
    Notice:  Trying to access array offset on value of type null in ...wp-content/plugins/gp-premium/page-header/functions/functions.php on line 653
    
    Notice:  Trying to access array offset on value of type null in ...wp-content/plugins/gp-premium/page-header/functions/functions.php on line 649
    
    Notice:  Trying to access array offset on value of type null in ...wp-content/plugins/gp-premium/page-header/functions/functions.php on line 649
    
    Notice:  Trying to access array offset on value of type null in ...wp-content/plugins/gp-premium/page-header/functions/functions.php on line 653
    
    Notice:  Trying to access array offset on value of type null in ...wp-content/plugins/gp-premium/blog/functions/images.php on line 140
    
    Notice:  Trying to access array offset on value of type null in ...wp-content/plugins/gp-premium/blog/functions/images.php on line 277
    
    Notice:  Trying to access array offset on value of type null in ...wp-content/plugins/gp-premium/page-header/functions/functions.php on line 677
    
    Notice:  Trying to access array offset on value of type null in ...wp-content/plugins/gp-premium/page-header/functions/functions.php on line 415
    
    Notice:  Trying to access array offset on value of type null in ...wp-content/plugins/gp-premium/page-header/functions/page-header.php on line 126
    
    Notice:  Trying to access array offset on value of type null in ...wp-content/plugins/gp-premium/page-header/functions/functions.php on line 292
    
    Notice:  Trying to access array offset on value of type null in ...wp-content/plugins/gp-premium/page-header/functions/functions.php on line 293
    
    Notice:  Trying to access array offset on value of type null in ...wp-content/plugins/gp-premium/blog/functions/images.php on line 277
    
    #1266796
    Leo
    Staff
    Customer Support

    Hi there,

    Can you try using a default child theme from here?
    https://docs.generatepress.com/article/using-child-theme/

    Let me know ๐Ÿ™‚

    #1267663
    Michael

    That is what I originally did. I get this error when trying to edit the header.php file and was trying to get around it.

    Unable to communicate back with site to check for fatal errors, so the PHP change was reverted. You will need to upload your PHP file change by some other means, such as by using SFTP.

    #1267771
    Leo
    Staff
    Customer Support

    So you’ve added the header.php file in the child theme and trying to edit it?

    Sounds like the edit is causing the issue and not because of making the child theme?

    #1267958
    Michael

    Correct. I can’t save it no matter what I edit.

    #1268037
    Leo
    Staff
    Customer Support

    What exactly are you trying to edit?

    The edit is causing the PHP error so you would need to double check your code/edit.

    #1268039
    Michael

    I am trying to edit header.php to add PHP to keep track of views per post using Advanced Custom Fields.

    But I can’t edit header.php at all. I can’t even put a random space somewhere and save it.

    #1268043
    Leo
    Staff
    Customer Support

    Sounds like there is already an existing error.

    Can you remove the existing one and add a fresh one instead?
    https://github.com/tomusborne/generatepress/blob/master/header.php

    #1269062
    Michael

    I have an issue editing any of the PHP files in the WordPress dashboard. I just edited them offline and uploaded via file manager. That work around is good enough for now. Thanks for your help.

    #1269179
    Leo
    Staff
    Customer Support

    No problem ๐Ÿ™‚

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