Error 406

Status
Not open for further replies.

umbranet

New Member
Messages
10
Reaction score
0
Points
1
I am not sure how to solve this; so I'm seeking help from the community.

Upon creation of my forums, I went to go to the AdminCP located within MyBB 1.8.6 forums so I could edit one of the templates (Home » Template Sets » Modern Templates » Edit Template: showthread) only to notice that I couldn't even edit a single line without it coming up an Error 406.

Not Acceptable
An appropriate representation of the requested resource /admin/index.php could not be found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
This is quite aggravating since for some reason; the Template I was attempting to upload was to fill in what was wiped from it. Whilst attempting to reupload it; I noticed the new Template (Modern v2 - AKA The one that has no edits; a clean install of the theme) could not transfer the specific bit of code either, without it resulting in the aforementioned error. When I attempt to upload said code, the link affected is http://umbranetwork.x10.bz/admin/index.php?module=style-templates&action=edit_template&expand=14 if that is of any help what-so-ever.

Code:
<html>
<head>
<title>{$thread['subject']}</title>
{$headerinclude}
<script type="text/javascript">
<!--
    var quickdelete_confirm = "{$lang->quickdelete_confirm}";
    var quickrestore_confirm = "{$lang->quickrestore_confirm}";
    var allowEditReason = "{$mybb->settings['alloweditreason']}";
    lang.save_changes = "{$lang->save_changes}";
    lang.cancel_edit = "{$lang->cancel_edit}";
    lang.quick_edit_update_error = "{$lang->quick_edit_update_error}";
    lang.quick_reply_post_error = "{$lang->quick_reply_post_error}";
    lang.quick_delete_error = "{$lang->quick_delete_error}";
    lang.quick_delete_success = "{$lang->quick_delete_success}";
    lang.quick_delete_thread_success = "{$lang->quick_delete_thread_success}";
    lang.quick_restore_error = "{$lang->quick_restore_error}";
    lang.quick_restore_success = "{$lang->quick_restore_success}";
    lang.editreason = "{$lang->postbit_editreason}";
// -->
</script>
<!-- jeditable (jquery) -->
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/report.js?ver=1800"></script>
<script src="{$mybb->asset_url}/jscripts/jeditable/jeditable.min.js"></script>
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/thread.js?ver=1800"></script>
</head>
<body>
    {$header}
    {$threadnotesbox}
    {$pollbox}
    <span class="text_center_top">
      {$multipage}
   </span>  
    <span class="text-right" >
    {$ratethread}{$newreply}
      </span> 
    <br class="clear"/>
  <div class="panel" style="margin: 0">
               <div class="thead">  
                 <div class="dropdown float_right hidden-xs">
                   <a href="javascript:;" id="thread_mode"><span class="white">{$lang->thread_modes}</span></a>{$threadnoteslink}                  
                </div>
                  <div class="panel-title">
                     <span class="white">{$thread['threadprefix']}{$thread['subject']}</span></div>
               </div>
               <table class="table table-responsive">  <tbody>            
                <tr><td id="posts_container">
                   <div id="posts">
                        {$first_post}{$posts}
                    </div>
                  </td></tr> 
                 <tr>
               <td class="tfoot input-group" width="100%" style="border-radius: 3px;">
                    <a href="{$next_oldest_link}"><button class="btn btn-styles"><i class="fa fa-arrow-circle-left"></i></span></button></a>
                    <span class="float_right">
                       <a href="{$next_newest_link}"><button class="btn btn-styles"><i class="fa fa-arrow-circle-right"></i></button></a>
                  </span>
            </td>
        </tr>
    </tbody></table>
</div><br />
  <span class="text_center_top">
      {$multipage}
   </span>
    <span class="text-right" style="padding-top: 5px;">
    {$newreply} </span>
    {$quickreply}
    {$threadexbox}
    {$similarthreads}<br class="clear" />
    <div class="thread-left">
        <ul class="thread_tools">
            <li class="printable"><a href="printthread.php?tid={$tid}">{$lang->view_printable}</a></li>
            {$sendthread}
            <li class="subscription_{$add_remove_subscription}"><a href="usercp2.php?action={$add_remove_subscription}subscription&amp;tid={$tid}&amp;my_post_key={$mybb->post_code}">{$add_remove_subscription_text}</a></li>
            {$addpoll}
        </ul>
    </div>
   <!--<div class="search_mod visible-xs" data-toggle="collapse" data-target="#options_mod_thead"><input style="margin: 10px 0px;" class="btn btn-warning" value="Options" type="submit"></div>-->
   <div class="mod_options options-collapse" id="options_mod_thead" style="text-align: right;"><!-- add class="collapse" -->
     {$moderationoptions}
      {$search_thread}
     {$forumjump}
    </div>
    <br class="clear" />
    {$usersbrowsing}
    {$footer}
<div id="thread_mode_popup" class="dropdown-menu" style="display: none;"><li><a href="showthread.php?mode=linear&amp;tid={$tid}&amp;pid={$pid}#pid{$pid}">{$lang->linear}</li><li><a href="showthread.php?mode=threaded&amp;tid={$tid}&amp;pid={$pid}#pid{$pid}" >{$lang->threaded}</a></li></div>
    <script type="text/javascript">
    // <!--
        if(use_xmlhttprequest == "1")
        {
            $("#thread_mode").popupMenu();
        }
    // -->
    </script>
<div id="thread_modes_popup" class="dropdown-menu" style="display: none;"><li><a href="showthread.php?mode=linear&amp;tid={$tid}&amp;pid={$pid}#pid{$pid}">{$lang->linear}</li><li><a href="showthread.php?mode=threaded&amp;tid={$tid}&amp;pid={$pid}#pid{$pid}" >{$lang->threaded}</a></li></div>
    <script type="text/javascript">
    // <!--
        if(use_xmlhttprequest == "1")
        {
            $("#thread_modes").popupMenu();
        }
    // -->
    </script>      
    <script type="text/javascript">
        $(".author_avatar img").error(function () {
            $(this).unbind("error").closest('.author_avatar').remove();
        });
    </script>
</body>
</html>
 
Last edited:

umbranet

New Member
Messages
10
Reaction score
0
Points
1
I've updated the thread with more details.
Will a Support Staff Member please help me solve this issue fast?
 

umbranet

New Member
Messages
10
Reaction score
0
Points
1
Yet another bump....
Seriously, please help me with this.

I'm trying to just edit a template and I can't even do that.
 

Sharky

Community Paragon
Community Support
Messages
4,399
Reaction score
94
Points
48
It looks like maybe nobody knows the answer to this...perhaps it would be useful to consult the MyBB community who may be able to assist. I've looked up what the '406' error code actually means and frankly it's out of my depth.

10.4.7 406 Not Acceptable
The resource identified by the request is only capable of generating response entities which have content characteristics not acceptable according to the accept headers sent in the request.

Unless it was a HEAD request, the response SHOULD include an entity containing a list of available entity characteristics and location(s) from which the user or user agent can choose the one most appropriate. The entity format is specified by the media type given in the Content-Type header field. Depending upon the format and the capabilities of the user agent, selection of the most appropriate choice MAY be performed automatically. However, this specification does not define any standard for such automatic selection.

Note: HTTP/1.1 servers are allowed to return responses which are
not acceptable according to the accept headers sent in the
request. In some cases, this may even be preferable to sending a
406 response. User agents are encouraged to inspect the headers of
an incoming response to determine if it is acceptable.

If the response could be unacceptable, a user agent SHOULD temporarily stop receipt of more data and query the user for a decision on further actions.
 

umbranet

New Member
Messages
10
Reaction score
0
Points
1
It looks like maybe nobody knows the answer to this...perhaps it would be useful to consult the MyBB community who may be able to assist. I've looked up what the '406' error code actually means and frankly it's out of my depth.

Thank you for actually answering. .-.
I did consult the MyBB Community and they said to consult you. That it's potentially something with mod_security; yet I disabled that for my site.
 

bdistler

Well-Known Member
Prime Account
Messages
3,534
Reaction score
196
Points
63
That it's potentially something with mod_security; yet I disabled that for my site.
while x10hosting discourage it - Premium users have the ability to completely disable mod_security on their account via cPanel

For free-hosting x10hosting has a customized web server setup that does not allow for the same cPanel functionality to disable mod_security - x10hosting also decided it would not be a good idea to allow free-hosting users to disable it - as it is used to not only protect against inbound malicious attacks but to prevent outbound abuse also - Unfortunately free-hosting still gets abusive signups - and allowing them to disable something that helps to prevent their malicious actions would not be in x10hosting's best interest
 

Dead-i

x10Hosting Support Ninja
Community Support
Messages
6,084
Reaction score
368
Points
83
Hi umbranet,

I'm sorry I missed this thread. This error message is indeed being caused by mod_security, which is something we use on our free hosting servers to protect our customers' websites from common attacks. It will scan any requests made your website, and any suspicious requests will be denied. The code you are trying to submit contains JavaScript, and mod_security will block this, to prevent JavaScript injection. Normal users won't need to submit any JavaScript, so these mod_security rules are usually effective in stopping attacks to vulnerable applications.

I would recommend editing your templates another way. I'm not aware of how MyBB's template system works, but if your templates are stored as files, you can edit them using cPanel's File Manager or through FTP. If they are stored in the database, you can edit them manually with phpMyAdmin.

Just to clarify, mod_security usually gives a 403 Forbidden or 406 Not Implemented error when a request has been blocked.

Thank you,
 
Status
Not open for further replies.
Top