Viewing 28 posts - 1 through 28 (of 28 total)
  • Author
    Posts
  • #1367868

    Dear team.

    I have in a file called debug.log more than 2000 lines of this:

    [06-Oct-2022 19:25:14 UTC] PHP Warning: Use of undefined constant THEMENAME – assumed ‘THEMENAME’ (this will throw an Error in a future version of PHP) in /home/wp/disk/wordpress/wp-content/themes/enfold-child/functions.php on line 65

    I have included the code in the private content for you to check. It is the code I used in order to activate the mobile menu and the entry is for sure 5 years old.
    Is there anything I can do for this to resolve the error?

    Best
    Asterios

    #1367876

    Hi Asterios,

    Can you give us a copy of your child theme? you can upload it in ufile.io or google drive and put the link in private content.

    Best regards,
    Nikko

    #1367930

    Hello Nikko,

    thank you for the fast reply.
    Yes, of course. Please see in private content.

    Best
    Asterios

    #1368031

    Hi Asterios,

    In line 65 of your child theme’s functions.php file, please replace THEMENAME with ‘KMA-Enfold Child’ and see if this helps.

    Best regards,
    Nikko

    #1368044

    Hello Nikko,

    thank you, I did as you suggested.
    Can you please leave the thread open for 48 hours?
    On Monday morning, I will get back to you with a feedback.

    Have a nice weekend.
    Asterios

    #1368059

    Hi Asterios,

    Yes, we will this thread open for you :)
    Have a great weekend!

    Best regards,
    Nikko

    #1368092

    Hello Nikko,

    I can already now say that it won´t help. The logfile is full of lines with the error message.
    Maybe Kriesi should know about it, I don´t know…

    Best
    Asterios

    #1368115

    Hi Asterios,

    Can you send the debug file as well? so we can check.

    Best regards,
    Nikko

    #1368149

    Hello NIkko,

    I have added the document in the same file with the child theme.
    Just click on the link (private).

    Thank you
    Asterios

    #1368187

    Hi Asterios,

    Thanks for providing the debug file.
    I checked again what I recommended and it seems the single quote I pasted appears to be problematic, please replace the single quotes before and after KMA-Enfold Child manually and that should work.
    If it still does not work, please provide FTP and WP admin access so we can fix the problem for you.

    Best regards,
    Nikko

    #1368289

    Hello Nikko,

    thank you!
    I will, but I need more details.
    I haven´t really understood how I can do this.

    Sorry for that.

    Best
    Asterios

    #1368352

    Hi Asterios,

    I see, the error was the undefined constant THEMENAME and it points to line 65 in functions.php of your child theme.
    If you check line 65 it’s basically not just a single statement of code but a whole block of code that’s why it’s difficult to debug however if you check on the line, the part that really has the issue is this:

    register_nav_menu($key, THEMENAME.' '.$name);

    You just need to replace it with:

    register_nav_menu($key, 'KMA-Enfold Child '.$name);

    Best regards,
    Nikko

    #1368387

    Hello Nikko,

    I now understand, thank you.
    My mistake was this:

    register_nav_menu($key, THEMENAME. 'KMA-Enfold Child '.$name);
    

    Anyway, I have corrected it and hope that it will help.
    I will let you know later tonight or tomorrow.

    Best
    Asterios

    #1368443

    Hi Asterios,

    You’re welcome :)
    Just let us know how it goes, we’ll leave this thread open for you.

    Best regards,
    Nikko

    #1368473

    Hello Nikko,

    thank you for waiting!
    I have good and not so good news.
    The error seems to be gone. Thanks for the solution :-)

    Another error came up now:

    [11-Oct-2022 17:20:02 UTC] PHP Notice: Undefined variable: icon_beside in /home/wp/disk/wordpress/wp-content/themes/enfold-child/functions.php on line 65

    It is in the same line as the previous one.
    Any idea what it means? I will add the log file in the same file with the rest for you to see.

    Best
    Asterios

    #1368510

    Hi Asterios,

    You’re welcome :)
    In line 65, please find this code:

    .$icon_beside

    and remove it.
    Hope this helps.

    Best regards,
    Nikko

    #1368696

    Good morning Nikko,

    yes, thank you! It worked.

    I am sorry to bother you again, but the more I look into the file, the more errors I find.
    Next ones:

    
    PHP Notice:
    Trying to get property 'ID' of non-object in /home/wp/disk/wordpress/wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/events_upcoming/events_upcoming.php on line 376
    
    
    PHP Warning:  Creating default object from empty value in /home/wp/disk/wordpress/wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/events_upcoming/events_upcoming.php on line 393
    

    In case you want to look at the file, it is in Google drive.

    Really sorry for keeping this thread open so long.
    Asterios

    #1368705

    Hi Asterios,

    No worries, what version of PHP are you using?

    Best regards,
    Nikko

    #1368706

    Hello Nikko,

    I am using 7.4.

    Regards
    Asterios

    #1368791

    Hi Asterios,

    Can you try to test it using PHP 8? and see if it helps.

    Best regards,
    Nikko

    #1368915

    Good morning Nikko,

    I just tested with PFP 8.0, and I got a 502 error, so I had to go back to 7.4.

    Best
    Asterios

    #1368936

    Hi Asterios,

    I see, I’m not really sure what’s the cause of the issue so we may need to check on the backend.
    Can you give us temporary admin access? so we can check further.
    Just post the credentials in private content.
    Also, here’s a similar thread which you may want to check: https://kriesi.at/support/topic/wordpress-eroror-messages/

    Best regards,
    Nikko

    #1368950

    Hello Nikko,

    yes of course.
    And thank you for the link.

    Best
    Asterios

    #1369294

    Hi Asterios,

    I apologize for the delayed response.
    Can we request for the login link as well?

    Best regards,
    Nikko

    #1369354

    Hello Nikko,

    no problem.
    I have also uploaded the newest debug.log file in Drive.
    Many errors have now disappeared and new showed up. But definitely much less, than a week ago.

    Best
    Asterios

    #1369392

    Hi Asterios,

    Thanks for giving us admin access.
    I can’t seem to figure out what’s causing the issue but it seems more complex than what it seems.
    Can you create a staging site? so we can try to troubleshoot it separately from your live site, also so we can try to deactivate caching/optimization plugins as well as other plugins and try to isolate issues.

    Best regards,
    Nikko

    #1369460

    Hello NIkko,

    I am sorry, but I don’t have so much space available and last time I activated staging, I only had problems.
    I will upload one more log-file for you or Kriesi to check, and otherwise we can just close this ticket.
    Unless you have another option. I am anyway ok with this.

    Many many thanks for your efforts!

    Best
    Asterios

    #1369525

    Hi Asterios,

    I see, to be honest, I don’t see a way to fix it unless we try to deactivate the plugins and isolate the issue and then enable the plugins one by one.
    Anyway, I’m glad that we are able to help you :)
    Thanks as well for using Enfold and have a great day!

    Best regards,
    Nikko

Viewing 28 posts - 1 through 28 (of 28 total)
  • The topic ‘Debug file’ is closed to new replies.