Posts: 37,498
Threads: 399
Joined: Apr 2008
Reputation:
775
2022-11-08, 11:00 PM
Okay, so there is an error message being generated somewhere. Go to ACP > Configuration > Server and Optimization Options > Error Logging Medium > set this to Log errors > Error Type Medium > set this to Warnings and Errors > save, then load the page and it should write to a file called error.log in the web root, see what's in here.
What PHP version are you running? If it's a freshly installed server, it may be 8.1. If it is, can you switch to 8.0?
Posts: 94
Threads: 23
Joined: Aug 2022
Reputation:
2
2022-11-08, 11:24 PM
(2022-11-08, 11:00 PM)Matt Wrote: Okay, so there is an error message being generated somewhere. Go to ACP > Configuration > Server and Optimization Options > Error Logging Medium > set this to Log errors > Error Type Medium > set this to Warnings and Errors > save, then load the page and it should write to a file called error.log in the web root, see what's in here.
What PHP version are you running? If it's a freshly installed server, it may be 8.1. If it is, can you switch to 8.0?
Hi Matt i have problem to locate that file since on my server i have /root but cannot access this folder even when elevating my permission with sudo!
I have look in the forum folder and nothing show in log.
When loading the page i get this debugging window on top :
Posts: 37,498
Threads: 399
Joined: Apr 2008
Reputation:
775
2022-11-08, 11:33 PM
Okay, so seems like it is to do with theme after all, it's outdated. Go to ACP > Templates & Style > Templates > expand template set for theme > Header Templates > header > click Options > Diff Report, this will show you changes between your version and default (green being added, red being removed). Yours will have {$unreadreports} in it which you need to remove, but you may have other changes to apply too.
Posts: 37,498
Threads: 399
Joined: Apr 2008
Reputation:
775
2022-11-09, 12:06 AM
Actually I forgot I had admin access so I just went ahead and did that. Thread views now seem to work
There are a bunch of other errors being thrown by the theme though, I've disabled error displaying for the time being, but they'll need to be fixed at some point.
Posts: 94
Threads: 23
Joined: Aug 2022
Reputation:
2
2022-11-09, 01:06 AM
(This post was last modified: 2022-11-09, 01:08 AM by peter_vps. Edited 1 time in total.)
(2022-11-09, 12:06 AM)Matt Wrote: Actually I forgot I had admin access so I just went ahead and did that. Thread views now seem to work
There are a bunch of other errors being thrown by the theme though, I've disabled error displaying for the time being, but they'll need to be fixed at some point.
Hi Matt, thank mate that was very kind from you, i was about to do it but i was out for an hour. I own you a big one here and if my video game is successful you are on my list of person to remember and i will also donate to mybb. Being an indie game dev force you to do everything by yourself and i cannot afford to hire someone to do it.
Glad to see that online status on the green!
Did you remove the code i add in the showtread.php for thread views counter and if not should i remove it?
Basically if i export the theme as it is it should keep the change you did right? Since i have another board in french with the same theme. I will also use the theme as a base for my third forum for my video game website.
I truly appreciate the time and patience you show to help me and it is going to help others certainly.
Regards Peter
Posts: 37,498
Threads: 399
Joined: Apr 2008
Reputation:
775
2022-11-09, 01:14 AM
(This post was last modified: 2022-11-09, 01:14 AM by Matt.)
No worries
I can't edit those files from the ACP so you'll need to undo that change, you can upload a fresh copy of inc/functions.php too to get rid of that debug data.
If you export it now it'll keep the changes yeah, I noticed there's a few with similar names but I edited the one you have set as default. While there's still errors caused by the theme, you may still encounter issues - what you can potentially do is in inc/functions.php, around line 145, change:
if($done_shutdown == true || !$config || (isset($error_handler) && $error_handler->has_errors))
to:
if($done_shutdown == true || !$config)
It's not an ideal fix but it'll allow it to run the shutdown functions even if there's errors on the page.
Posts: 94
Threads: 23
Joined: Aug 2022
Reputation:
2
2022-11-09, 02:11 AM
(2022-11-09, 01:14 AM)Matt Wrote: No worries
I can't edit those files from the ACP so you'll need to undo that change, you can upload a fresh copy of inc/functions.php too to get rid of that debug data.
If you export it now it'll keep the changes yeah, I noticed there's a few with similar names but I edited the one you have set as default. While there's still errors caused by the theme, you may still encounter issues - what you can potentially do is in inc/functions.php, around line 145, change:
if($done_shutdown == true || !$config || (isset($error_handler) && $error_handler->has_errors))
to:
if($done_shutdown == true || !$config)
It's not an ideal fix but it'll allow it to run the shutdown functions even if there's errors on the page.
Thank again Matt for your outstanding support, OK i will apply your recommendation and is there a good resource or link about how to fix compatibility for mybb theme?
Regards Peter
Posts: 37,498
Threads: 399
Joined: Apr 2008
Reputation:
775
2022-11-09, 10:32 AM
Probably not a specific guide, the issue that as it is outdated it has variables in it that are no longer defined, so they error. You'd need to go to ACP > Templates & Style > Templates > Find Updated Templates, go through these and view diff reports to work out what changes need to be applied. The main thing to do will be to find the specific variables that are erroring and remove them.
Posts: 94
Threads: 23
Joined: Aug 2022
Reputation:
2
2022-11-09, 07:32 PM
(2022-11-09, 10:32 AM)Matt Wrote: Probably not a specific guide, the issue that as it is outdated it has variables in it that are no longer defined, so they error. You'd need to go to ACP > Templates & Style > Templates > Find Updated Templates, go through these and view diff reports to work out what changes need to be applied. The main thing to do will be to find the specific variables that are erroring and remove them.
OK thank Matt but so far what you did seem to have fix all main issues in the worst case i will ask here.
Regards Peter
|