MyBB Community Forums

Full Version: Need help troubleshooting theme compatibility
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi guy's,

I have a hard time wrapping my head around this one, i have receive a lot of good advice's from Matt but i would like to understand it so i can fix it myself in the future.

I have the same issues with my second forum using the same theme aka online status show offline and thread views stay at 0 and here is the diff report screenshot.

If someone can help me understand what do i need to remove or add to fix it.

The other version number that you don't see at the end of the green line is : js?ver=1804

[Image: QGnCdgj.jpg]
I've re-enabled errors on your new forum, this time the error was this:

Warning [2] Undefined array key "logoutkey" - Line: 42 - File: global.php(1070) : eval()'d code PHP 8.0.25 (Linux)

So this is from the footer template.

I'm not sure why this would actually be erroring though or why that key wouldn't exist, $mybb->user['logoutkey'] should always be available...
Oh, it was because I was only logged in to the ACP not the front end. So that's a general theme bug, it's putting a logout link in the footer even if you're not logged in.

When logged in, the error is this:

Warning [2] Undefined property: MyLanguage::$expcol_collapse - Line: 1304 - File: showthread.php PHP 8.0.25 (Linux)

This is a missing language string, which is due to an outdated language pack.

Unfortunately, with PHP 8 throwing warnings for undefined variables, it means that all outdated themes and language packs that used to error silently if things were undefined, will now start breaking things.
Hi Matt, the only difference from the English forum is that i have download the French language pack that is shown to be compatible with 1.8.31.

I am trying my best to fix the theme but i don't have enough knowledge to understand what am i doing. I don't really mind if there is a few errors as long as i can get the offline status and thread views count working.

Which template did you modify to make the online status and thread views count to work?

Regards Peter
It's a different cause than before, it's not the theme so a template change isn't required this time. The error is from a missing language string, so it doesn't seem like the language pack is 100% compatible. You will need to add these to the global.lang.php of the French language pack:

$l['expcol_collapse'] = '[-]';
$l['expcol_expand'] = '[+]';
(2022-11-28, 08:23 PM)Matt Wrote: [ -> ]It's a different cause than before, it's not the theme so a template change isn't required this time. The error is from a missing language string, so it doesn't seem like the language pack is 100% compatible. You will need to add these to the global.lang.php of the French language pack:

$l['expcol_collapse'] = '[-]';
$l['expcol_expand'] = '[+]';

You are the man again Matt, offline status and thread views now working, i have copy the code just under the <?php opening is that the right spot?

Regards Peter
That will be fine, can add to the start or the end or half way down Smile As long as it's on a new line after the <?php it'll work.
(2022-11-28, 08:49 PM)Matt Wrote: [ -> ]That will be fine, can add to the start or the end or half way down Smile As long as it's on a new line after the <?php it'll work.

Hi Matt, i notice one strange occurrence for the thread view count not working in one thread, for the other threads it seem to work but not this one , the thread is named : Hollywood et la matrice.

Regards Peter
There's a whole ton of errors being generated by the YouTube video embeds here:

Warning [2] Undefined array key "fragment" - Line: 1494 - File: inc/class_parser.php
Warning [2] Undefined array key 0 - Line: 1587 - File: inc/class_parser.php

It seems this may be something we need to fix in core.
(2022-11-28, 09:48 PM)Matt Wrote: [ -> ]There's a whole ton of errors being generated by the YouTube video embeds here:

Warning [2] Undefined array key "fragment" - Line: 1494 - File: inc/class_parser.php
Warning [2] Undefined array key 0 - Line: 1587 - File: inc/class_parser.php

It seems this may be something we need to fix in core.

There is still many sub forums that i have not tested yet since there is no threads in them but the English site have a the same sub forum with the same youtube embed and it is working fine regarding the views count.

Let me know if you would like to have a test user account for the English site if you want to compare.

Regards Peter

I am verifying on the French site each post that contain a youtube video embed and the views count for those threads are not working so there is definitely something here.

Hi Matt, i have created another test user account for the English board with same credentials as the one for the French one if you want to compare between the 2 since the English site with youtube embed work perfectly and tread views registered each time i visit the thread.

Regards Peter
Pages: 1 2