Daily Lucky Numbers:
6
10
21
29
41
42

Totally blank screen?

Started by Kokoro, January 01, 2021, 09:27:18 AM

Previous topic - Next topic

Kokoro

Hi!

I have two questions.

First, after I installed the Battle mod on forum, using the default curve theme (2.0.17) I get a blank page.  When I check my logs I see:
"Apply Filter: Only show the error messages of this member Guest
Apply Filter: Only show the error messages of this IP address   
     Reverse chronological order of list Today at 09:21:42
Apply Filter: Only show the errors of this type Type of error: Undefined
Apply Filter: Only show the error messages of this URL
http://www.kokororpg.com/index.php?action=admin;area=logs;ba28613a=e7fce64b60f7e445babf6cb2278a2135
Apply Filter: Only show the errors with the same message
8: Undefined index: battle_mem_kill_limit
Apply Filter: Only show the errors from this file
File: /home/szyotqg8fbnb/public_html/Themes/default/languages/BattleAdmin.english.php (eval?)
Line: 51 "

"Apply Filter: Only show the error messages of this member Guest
Apply Filter: Only show the error messages of this IP address   
     Reverse chronological order of list Today at 09:23:38
Apply Filter: Only show the errors of this type Type of error: Undefined
Apply Filter: Only show the error messages of this URL
http://www.kokororpg.com/index.php?action=admin;area=logs;ba28613a=e7fce64b60f7e445babf6cb2278a2135
Apply Filter: Only show the errors with the same message
8: Undefined index: battle_mem_battle_limit
Apply Filter: Only show the errors from this file
File: /home/szyotqg8fbnb/public_html/Themes/default/languages/BattleAdmin.english.php (eval?)
Line: 50 "

Second, is this mod still being actively worked on?

Thank you!


Chen Zhen


I have not worked on this mod is quite some time but still provide support for it.

The errors you reported show a line from the admin language file but that file has no issues.
Did the game install without flagging any errors?
Have you edited any files including any of its language files?

Kokoro

I've taken a look at the language file, the template file and the sources file.  The strings are present.  I looked through the language file, thinking there may be a missing apostrophe,  but I couldn't find one.

It installs fine, with no errors.  One thing I noticed is that in the profile, battle stats are listed twice.

Thank you!

Chen Zhen

Open your ../Sources/Profile-View.php file and look to see if this code was added twice:

if ($modSettings['enable_sts_profile'] && $modSettings['enable_battle'] && allowedTo('view_battle'))
{
$check = 9 * ((!empty($user_info['hp']) ? $user_info['hp'] : 9) + (!empty($user_info['energy']) ? $user_info['energy'] : 9) + (!empty($user_info['stamina']) ? $user_info['stamina'] : 9) + (!empty($user_info['exp']) ? $user_info['exp'] : 9));
$context['custom_fields'][] = array(
'name' => 'Battle Stats',
'placement' => 0,
'output_html' => '
<p>
    <span>
<img border="0" src="' . $settings['images_url'] . '/battle/bomb.png" alt="" style="vertical-align:top;" /> ' . $txt['battle_statsA'] . ': ' . $context['member']['atk'] .'
<br />
<img border="0" src="' . $settings['images_url'] . '/battle/shield.png" alt="" style="vertical-align:top;" /> ' . $txt['battle_statsD'] . ': ' . $context['member']['def'] . '
<span style="' . ($modSettings['battle_enable_membattle'] == 1 ? 'display:inline;' : 'display:none;') . '">
<br />
<img border="0" src="' . $settings['images_url'] . '/battle/battle_sword.gif" alt="" style="vertical-align:top;" />
<a href="' . $scripturl . '?action=battle;sa=fight;attack=' . $memID . ';session=' . $context['session_id'] . $check . ';#battle_main">' . $txt['battle_statsATK'] . '</a>
</span>
    </span>
</p>'
);
}

If it has that code twice then it sounds as though you uninstalled the mod at some point but it didn't remove some of its edits (it should have shown errors) and then installed it again where it added duplicate edits.



Prior to editing any files, read this post: https://web-develop.ca/index.php?topic=650.msg4905#msg4905

Kokoro

I found that code and deleted it.   I'll try reinstalling it.

Kokoro

Nope.  The duplicate profile issue is resolved,  but I still get a blank screen with new install.  Same errors as above.

Chen Zhen

There might be more duplicate code somewhere since it seems something went wrong at some point.

Remember that you have to uninstall this mod (without errors) and delete it from your packages manager prior to installing it again (for an update or otherwise). All of my mods work in that respect.