2023-02-14, 12:25 AM
When I updated to 1.8.33 from 1.8.27 the update failed. It instructed me to delete the 'install' directory and after doing that the forum was working. CP shows I am on 1.8.33 (PHP 8.1.14, SQL engine MySQLi 5.7.38).
Since then I've been getting e-mailed a lot of "Undefined variable $..." errors.
I'm only running the default/stock templates.
I did a file verification and it returns back "Congratulations! No corrupt files have been found on your installation."
Now, one of the many errors shows "Undefined variable $attach_mod_options". A log entry for that has this:
I searched the database and I was able to find a reference to that variable in it. I also searched the mybb_theme.xml from the 1.8.33 install zip and it has this with a variable "$attach_mod_options" in it.
I've been reading several posts with solutions/suggestions so I tried inserting $attach_mod_options = "" in the newreply.php file at line 227, yet I'm still getting the error. Many more posts say the problem is with your templates. Since I've never installed new templates and have always used the stock templates, did the failure I got when upgrading not update my templates? If that's the case, how do I re-install the default templates? If not, how do I fix these errors from getting e-mailed (beside turning off the e-mail, I'm pretty sure my error.log file will continue to grow)?
Since then I've been getting e-mailed a lot of "Undefined variable $..." errors.
I'm only running the default/stock templates.
I did a file verification and it returns back "Congratulations! No corrupt files have been found on your installation."
Now, one of the many errors shows "Undefined variable $attach_mod_options". A log entry for that has this:
<error>
<dateline>1676071753</dateline>
<script>newreply.php(234) : eval()'d code</script>
<line>5</line>
<type>2</type>
<friendly_type>Warning</friendly_type>
<message>Undefined variable $attach_mod_options</message>
<back_trace>#0 errorHandler->error() called at [/inc/class_error.php:153]
#1 errorHandler->error_callback() called at [/newreply.php(234) : eval()'d code:5]
#2 eval() called at [/newreply.php:234]
</back_trace>
</error>
I searched the database and I was able to find a reference to that variable in it. I also searched the mybb_theme.xml from the 1.8.33 install zip and it has this with a variable "$attach_mod_options" in it.
<tr id="attachment_{$attachment['aid']}">
<td class="trow2" width="1" align="center">{$attachment['icon']}</td>
<td class="trow2" width="60%" style="white-space: nowrap"><span class="attachment_filename">{$attachment['filename']}</span> ({$attachment['size']})</td>
<td class="trow2" style="white-space: nowrap; text-align: center;">{$attach_mod_options} {$attach_rem_options} {$postinsert}</td>
</tr>
I've been reading several posts with solutions/suggestions so I tried inserting $attach_mod_options = "" in the newreply.php file at line 227, yet I'm still getting the error. Many more posts say the problem is with your templates. Since I've never installed new templates and have always used the stock templates, did the failure I got when upgrading not update my templates? If that's the case, how do I re-install the default templates? If not, how do I fix these errors from getting e-mailed (beside turning off the e-mail, I'm pretty sure my error.log file will continue to grow)?