406 error code...

Status
Not open for further replies.

cstrike3

New Member
Messages
8
Reaction score
1
Points
3
I am using MyBB forum and i tried adding this into my templates theme
Code:
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet">

When i click save it keeps giving me this error..
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.

Please help me fix this error?

Thank You.
 

ShadowedGrinner

New Member
Messages
22
Reaction score
2
Points
3
Hi cstrike3, will you please put the entirety of the code in your reply?
You have only put a minor snippit of it, which we can't really do much with. There may be something in your file that is preventing you from being able to add it.
 

ShadowedGrinner

New Member
Messages
22
Reaction score
2
Points
3
Hello, well regarding this problem, I searched around and found something.

From an earlier post at https://x10hosting.com/community/threads/error-406.197623/.

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,


It appears that due to your website having Javascript Line(s), you cannot upload changes to your website.

HTML:
<link rel="alternate" type="application/rss+xml" title="{$lang->latest_threads} (RSS 2.0)" href="{$mybb->settings['bburl']}/syndication.php" />
<link rel="alternate" type="application/atom+xml" title="{$lang->latest_threads} (Atom 1.0)" href="{$mybb->settings['bburl']}/syndication.php?type=atom1.0" />
<meta http-equiv="Content-Type" content="text/html; charset={$charset}" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/jquery.js?ver=1804"></script>
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/jquery.plugins.min.js?ver=1804"></script>
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/general.js?ver=1804"></script>
{$stylesheets}
<script type="text/javascript">
    lang.unknown_error = "{$lang->unknown_error}";
    lang.select2_match = "{$lang->select2_match}";
    lang.select2_matches = "{$lang->select2_matches}";
    lang.select2_nomatches = "{$lang->select2_nomatches}";
    lang.select2_inputtooshort_single = "{$lang->select2_inputtooshort_single}";
    lang.select2_inputtooshort_plural = "{$lang->select2_inputtooshort_plural}";
    lang.select2_inputtoolong_single = "{$lang->select2_inputtoolong_single}";
    lang.select2_inputtoolong_plural = "{$lang->select2_inputtoolong_plural}";
    lang.select2_selectiontoobig_single = "{$lang->select2_selectiontoobig_single}";
    lang.select2_selectiontoobig_plural = "{$lang->select2_selectiontoobig_plural}";
    lang.select2_loadmore = "{$lang->select2_loadmore}";
    lang.select2_searching = "{$lang->select2_searching}";
    var cookieDomain = "{$mybb->settings['cookiedomain']}";
    var cookiePath = "{$mybb->settings['cookiepath']}";
    var cookiePrefix = "{$mybb->settings['cookieprefix']}";
    var deleteevent_confirm = "{$lang->deleteevent_confirm}";
    var removeattach_confirm = "{$lang->removeattach_confirm}";
    var loading_text = '{$lang->ajax_loading}';
    var saving_changes = '{$lang->saving_changes}';
    var use_xmlhttprequest = "{$mybb->settings['use_xmlhttprequest']}";
    var my_post_key = "{$mybb->post_code}";
    var rootpath = "{$mybb->settings['bburl']}";
    var imagepath = "{$theme['imgdir']}";
      var yes_confirm = "{$lang->yes}";
    var no_confirm = "{$lang->no}";
    var MyBBEditor = null;
    var spinner_image = "{$theme['imgdir']}/spinner.gif";
    var spinner = "<img src='" + spinner_image +"' alt='' />";
    var modal_zindex = 9999;
</script>
<link href='http://fonts.googleapis.com/css?family=Titillium+Web:400,400italic,700,700italic' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
<script>
jQuery(document).ready(function($) {
$('ul.head_menu li')
.mouseenter(function() {
        $(this).children('ul').fadeIn(150);
})
.mouseleave(function() {
        $(this).children('ul').fadeOut(150);
});
});
</script>

HTML:
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/jquery.js?ver=1804"></script>
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/jquery.plugins.min.js?ver=1804"></script>
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/general.js?ver=1804"></script>

HTML:
<script type="text/javascript">
    lang.unknown_error = "{$lang->unknown_error}";
    lang.select2_match = "{$lang->select2_match}";
    lang.select2_matches = "{$lang->select2_matches}";
    lang.select2_nomatches = "{$lang->select2_nomatches}";
    lang.select2_inputtooshort_single = "{$lang->select2_inputtooshort_single}";
    lang.select2_inputtooshort_plural = "{$lang->select2_inputtooshort_plural}";
    lang.select2_inputtoolong_single = "{$lang->select2_inputtoolong_single}";
    lang.select2_inputtoolong_plural = "{$lang->select2_inputtoolong_plural}";
    lang.select2_selectiontoobig_single = "{$lang->select2_selectiontoobig_single}";
    lang.select2_selectiontoobig_plural = "{$lang->select2_selectiontoobig_plural}";
    lang.select2_loadmore = "{$lang->select2_loadmore}";
    lang.select2_searching = "{$lang->select2_searching}";
    var cookieDomain = "{$mybb->settings['cookiedomain']}";
    var cookiePath = "{$mybb->settings['cookiepath']}";
    var cookiePrefix = "{$mybb->settings['cookieprefix']}";
    var deleteevent_confirm = "{$lang->deleteevent_confirm}";
    var removeattach_confirm = "{$lang->removeattach_confirm}";
    var loading_text = '{$lang->ajax_loading}';
    var saving_changes = '{$lang->saving_changes}';
    var use_xmlhttprequest = "{$mybb->settings['use_xmlhttprequest']}";
    var my_post_key = "{$mybb->post_code}";
    var rootpath = "{$mybb->settings['bburl']}";
    var imagepath = "{$theme['imgdir']}";
      var yes_confirm = "{$lang->yes}";
    var no_confirm = "{$lang->no}";
    var MyBBEditor = null;
    var spinner_image = "{$theme['imgdir']}/spinner.gif";
    var spinner = "<img src='" + spinner_image +"' alt='' />";
    var modal_zindex = 9999;
</script>

HTML:
<script>
jQuery(document).ready(function($) {
$('ul.head_menu li')
.mouseenter(function() {
        $(this).children('ul').fadeIn(150);
})
.mouseleave(function() {
        $(this).children('ul').fadeOut(150);
});
});
</script>


Sorry for the Inconvenience, and please be sure to read the Terms of Service so you can see possible reasons you are unable to do something.
 
Last edited:

ShadowedGrinner

New Member
Messages
22
Reaction score
2
Points
3
What are you trying to do with the Thread Prefix?

Like, what code are you attempting to use for it.
 

cstrike3

New Member
Messages
8
Reaction score
1
Points
3
<span style="color: #EC1E1E;">[Server Update]</span>

Thread Prefix name: [Server Update]
Thread Prefix style: <span style="color: #EC1E1E;">[Server Update]</span>

Then when i click save error 403 shows up lol.
 

cstrike3

New Member
Messages
8
Reaction score
1
Points
3
That don't work dude, also i have seen other posts about this someone created long ago but no staff have supported it wow!
 

caftpx10

Well-Known Member
Messages
1,534
Reaction score
114
Points
63
Oh crap.
I mean <font color="#EC1E1E">[Status]</font>
Sorry!

I've been spending too much time on MyBB forums. ._.
Lol.
<font> is depreciated in HTML5, the reason why spans are being used to do the job these days. ;)
 

caftpx10

Well-Known Member
Messages
1,534
Reaction score
114
Points
63
It may be depreciated, but it may work.
That's why I said to just attempt it.
I did a quick search and it seems that you were half right in the first place. You just have to use [ ] and not < > and don't use any quotes around the colour you're wanting to use.
 
Status
Not open for further replies.
Top