-
AuthorPosts
-
October 6, 2022 at 9:41 pm #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
AsteriosOctober 6, 2022 at 11:34 pm #1367876Hi 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,
NikkoOctober 7, 2022 at 10:55 am #1367930Hello Nikko,
thank you for the fast reply.
Yes, of course. Please see in private content.Best
AsteriosOctober 8, 2022 at 2:54 am #1368031Hi 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,
NikkoOctober 8, 2022 at 10:21 am #1368044Hello 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.
AsteriosOctober 8, 2022 at 3:03 pm #1368059Hi Asterios,
Yes, we will this thread open for you :)
Have a great weekend!Best regards,
NikkoOctober 9, 2022 at 8:01 am #1368092Hello 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
AsteriosOctober 9, 2022 at 3:24 pm #1368115Hi Asterios,
Can you send the debug file as well? so we can check.
Best regards,
NikkoOctober 9, 2022 at 6:48 pm #1368149Hello NIkko,
I have added the document in the same file with the child theme.
Just click on the link (private).Thank you
AsteriosOctober 10, 2022 at 4:06 am #1368187Hi 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,
NikkoOctober 10, 2022 at 3:15 pm #1368289Hello Nikko,
thank you!
I will, but I need more details.
I haven´t really understood how I can do this.Sorry for that.
Best
AsteriosOctober 11, 2022 at 12:06 am #1368352Hi 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,
NikkoOctober 11, 2022 at 9:30 am #1368387Hello 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
AsteriosOctober 11, 2022 at 3:45 pm #1368443Hi Asterios,
You’re welcome :)
Just let us know how it goes, we’ll leave this thread open for you.Best regards,
NikkoOctober 11, 2022 at 7:27 pm #1368473Hello 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
AsteriosOctober 12, 2022 at 4:16 am #1368510Hi Asterios,
You’re welcome :)
In line 65, please find this code:.$icon_beside
and remove it.
Hope this helps.Best regards,
NikkoOctober 13, 2022 at 9:20 am #1368696Good 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.
AsteriosOctober 13, 2022 at 9:46 am #1368705Hi Asterios,
No worries, what version of PHP are you using?
Best regards,
NikkoOctober 13, 2022 at 9:48 am #1368706Hello Nikko,
I am using 7.4.
Regards
AsteriosOctober 14, 2022 at 4:07 am #1368791Hi Asterios,
Can you try to test it using PHP 8? and see if it helps.
Best regards,
NikkoOctober 15, 2022 at 7:56 am #1368915Good 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
AsteriosOctober 15, 2022 at 10:59 am #1368936Hi 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,
NikkoOctober 15, 2022 at 2:15 pm #1368950Hello Nikko,
yes of course.
And thank you for the link.Best
AsteriosOctober 19, 2022 at 1:59 am #1369294Hi Asterios,
I apologize for the delayed response.
Can we request for the login link as well?Best regards,
NikkoOctober 19, 2022 at 9:08 am #1369354Hello 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
AsteriosOctober 19, 2022 at 1:50 pm #1369392Hi 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,
NikkoOctober 19, 2022 at 8:27 pm #1369460Hello 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
AsteriosOctober 20, 2022 at 4:32 am #1369525Hi 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 -
AuthorPosts
- The topic ‘Debug file’ is closed to new replies.