Jump to content

[Solved] [MyBB] Single Template causing Error 403 upon Saving


ThistleProse
 Share

Recommended Posts

Hello, thanks for stopping by. I've tried asking for assistance on the MyBB forums, but so far no bites.

 

I'm hoping someone from here will know what is up?

 

This is the template [header_welcome_member] - Additionally, the guest is also broken. Admin and Moderator are fine, but they're literally a single line of code each.

Technically, it works fine, but - even without changing anything - if I hit save, it takes me to the 403 error page. There is something in the code it hates, but I don't know what.

 

This is the default code of the layout I'm using (io theme).

 

I'm happy to provide temporary login information if required, and/or you can contact me on Discord; ThistleProse#0459

 

ETA: template [header] is also a 403

 

[header]

 


<div id="click_blocker"></div>
{$as_sidebar}<div id="container">
        <a name="top" id="top"></a>
        <div id="header">
            
                <div class="wrapper">
                    <div id="logo"><a href="{$mybb->settings['bburl']}"><img src="{$theme['logo']}" alt="{$mybb->settings['bbname']}" title="{$mybb->settings['bbname']}" /></a></div>
            </div>
                
        <div id="panel">
        <div class="upper">
            <div id="yapis_yapis">
                    <div class="wrapper">
                        <div id="mobil_menu"></div>
    
                        <ul class="menu top_links float_left" style="margin:0px;">
                        <li><a href="{$mybb->settings['bburl']}" class="portal">Home</a></li>
                        <li><a href="{$mybb->settings['bburl']}/portal.php" class="portal">{$lang->toplinks_portal}</a></li>
                        
                            <li><a href="#" class="dropdown-toggle3">{$lang->toplinks_search}</a><ul class="dropdown3">
                            <div align="center"><form action="{$mybb->settings['bburl']}/search.php" method="post">
                        <fieldset id="search">
                            <input name="keywords" type="text" class="textbox arama-kutusu" placeholder="Search form" autofocus />
                            <input value="{$lang->search_button}" type="submit" class="button" />
                            <input type="hidden" name="action" value="do_search" />
                            <input type="hidden" name="postthread" value="1" />
                            <input type="button" class="button" value="Advanced Search?"  onclick="location.href='search.php';" />
                        </fieldset>
                                </form>
                                
                            </div>
                            </ul>
                                
                            </li>
                            
                        <li><a href="{$mybb->settings['bburl']}/memberlist.php" class="memberlist">{$lang->toplinks_memberlist}</a></li>
                        <li><a href="{$mybb->settings['bburl']}/calendar.php" class="calendar">{$lang->toplinks_calendar}</a></li>
                        <li><a href="{$mybb->settings['bburl']}/misc.php?action=help" class="help">{$lang->toplinks_help}</a></li>
                        </ul>
                        <!-- welcomeblock baslangic-->
                        <div style="float: right;margin-right: 8px;height: 35px;font-family: sans-serif;position:relative;">

                        <div id="mini-panel-sol-blok">
                            <a class="dropdown-toggle2" href="#" title="Private Messages"><div id="yenipm"></div></a>
                            {$pm_notice}{$pm_switch_notice}
                            
                            {$welcomeblock} <!-- mini-panel-sol-blok div'i "header_welcomeblock_member" şablonunun içerisinde kapanıyor -->
                            
                        </div>
                                </div>
                            <!-- welcomeblock bitis-->
                    </div>
        
                        <div class="lower clear">
                            <div class="wrapper">
                                <navigation>
                            </div>
                        </div>
        </div>
        </div>

</div>
            
        <div id="content">
            <div class="wrapper">
                
                {$bannedwarning}
                {$bbclosedwarning}
                {$unreadreports}
                {$pending_joinrequests}
                {$awaitingusers}{$twitterfeed}
                <br />

 

[header_welcome_member]

	<div id="hosgeldin">Welcome {$mybb->user['username']}</div>
<!-- Continuation of div(class="upper") as opened in the header template -->
 <ul id="dropdown2"><div id="cmon"></div></ul>
    <script type="text/javascript">
if ({$mybb->user['pms_unread']} > 0) {
    var page_title = $(document).find("title").text();
    $("#yenipm").html("<div id='yenipmnum1'>{$mybb->user['pms_unread']}</div>");
    
    document.title = "({$mybb->user['pms_unread']}) " + page_title;
}
else {document.getElementById("cmon").innerHTML = "<span style='font-size:11px;white-space: nowrap;'>You have no new messages.</span><hr style='background-color: #DDDDDD;'><a href='private.php?fid=1'><li>Inbox</li></a><a href='private.php?fid=2'><li>Sent Items</li></a><a href='private.php?action=send'><li>Send A New Message</li></a>";
        
}
        $("#yenipm").css({'display' : 'block'});
</script>
<!--Friend List Start-->
<script>
 $(document).ready(function cek() {
     $(".dropdown-toggle4").mouseover(function cek(){
        $("#responsecontainer").load("misc.php?action=buddypopup");
    });
   
});
    if (typeof functionName === 'cek') {
        $("#yukleniyor").css({'display' : 'none'});
}
</script>
<a class="dropdown-toggle4" href="#" title="Arkadaşlarım"><div id="arkadaslarim"></div></a>
<ul class="dropdown4"><div id="responsecontainer"><div id="yukleniyor"><br><br>Loading..</div></div></ul>
<!--Friend List End-->
<!--ayarlar başlangıç-->
<a class="dropdown-toggle" href="#" title="Ayarlar"><div id="ayarlar"></div></a>
<ul class="dropdown">
<a href="{$mybb->settings['bburl']}/usercp.php" class="usercp"><li>{$lang->welcome_usercp}</li></a>
{$admincplink}
{$modcplink}
<a href="{$mybb->settings['bburl']}/usercp.php?action=avatar" class="usercp"><li>Change Avatar</li></a>
    <hr style="background-color: #DDDDDD;">
<a href="usercp.php?action=editlists"><li>{$lang->welcome_open_buddy_list}</li></a>
    <a href="{$mybb->settings['bburl']}/search.php?action=getnew"><li>{$lang->welcome_newposts}</li></a>
    <a href="{$mybb->settings['bburl']}/search.php?action=getdaily"><li>{$lang->welcome_todaysposts}</li></a>
    <hr style="background-color: #DDDDDD;">
    <a href="usercp.php?action=options"><li>Preferences</li></a>
    <a href="{$mybb->settings['bburl']}/member.php?action=logout&amp;logoutkey={$mybb->user['logoutkey']}" onclick="return confirm('Are you sure?')" class="logout"><li>{$lang->welcome_logout}</li></a>
</ul>
<!--ayarlar bitiş-->
	<br />
	</div><!-- header şablonundaki mini-panel-sol-blok div'i burada kapanıyor -->
	
<a href="member.php?action=profile&uid={$mybb->user['uid']}" title="Profilin"><img align="right" src="{$mybb->user['avatar']}" onerror="this.src='{$theme['imgdir']}/standart-avatar.png';" id="kullanici-avatari" width="50" height="50" border="0" /></a>

[header_welcome_guest]

	                        <!-- Continuation of div(class="upper") as opened in the header template -->
                        <span class="welcome"><a href="{$mybb->settings['bburl']}/member.php?action=login" onclick="$('#quick_login').modal({ fadeDuration: 250, keepelement: true, zIndex: (typeof modal_zindex !== 'undefined' ? modal_zindex : 9999) }); return false;">{$lang->welcome_login}</a><a href="{$mybb->settings['bburl']}/member.php?action=register">{$lang->welcome_register}</a></span>
                        
                <div class="modal" id="quick_login" style="background: #E4E4E4;width: 690px;display: none;">
                    <form method="post" action="{$mybb->settings['bburl']}/member.php">
                        <input name="action" type="hidden" value="do_login" />
                        <input name="url" type="hidden" value="" />
                        <input name="quick_login" type="hidden" value="1" />
                        <table width="100%" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" border="0" class="giris-yap-kismi">
                            <tr>
                                <td class="thead2" colspan="2"><strong>{$lang->login}</strong></td>
                            </tr>
                            <tr>
                                <td class="trow4" width="7%"><img src="{$theme['imgdir']}/username-icon.png" alt="username" /></td>
                                <td class="trow4"><input name="quick_username" id="quick_login_username" type="text" placeholder="Username" value="" class="textbox kutucuk initial_focus" /></td>
                            </tr>
                            <tr>
                                <td class="trow4" width="7%"><img src="{$theme['imgdir']}/password-icon.png" alt="username" /></td>
                                <td class="trow4">
                                    <input name="quick_password" id="quick_login_password" type="password" placeholder="Password" value="" class="textbox kutucuk" />
                                </td>
                            </tr>
                    <tr><td class="trow4" width="7%"></td><td><a href="{$mybb->settings['bburl']}/member.php?action=lostpw"><font size="1">{$lang->lost_password}</font></a></td></tr>
                            <tr>
                                <td class="trow4">&nbsp;</td>
                                <td class="trow4 remember_me">
                                    <input name="quick_remember" id="quick_login_remember" type="checkbox" value="yes" class="checkbox" checked="checked" />
                                    <label for="quick_login_remember">{$lang->remember_me}</label>
                                </td>
                            </tr>
                            <tr>
                                <td class="trow4" colspan="2">
                                    <div align="center"><input name="submit" type="submit" class="button" value="{$lang->login}" /></div>
                                </td>
                            </tr>
                        </table>
                        <!--SIGN UP BOX-->
<table width="100%" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" border="0" class="istersen-kaydol">
                            <tr>
                                <td class="thead2" colspan="2"><strong>Sign Up For Free</strong></td>
                            </tr>
    
                        <tr><td class="trow4" colspan="2">If you sign up:</td></tr>
                        <tr><td class="trow4" colspan="2" style="height: 125px;">
                            <div id="avantajlarin">
                            <li>You can post new threads.</li>
                            <li>You can reply to threads.</li>
                            <li>You can contact with other members.</li>
                            </div>
                        </td></tr>
                        <tr><td class="trow4" colspan="2">
                            <div align="center"><input type="button" class="button" value="Register"  onclick="location.href='member.php?action=register';" /></div></td></tr>
                        </table>
	                    </form>
                </div>
                <script type="text/javascript">
                    $("#quick_login input[name='url']").val($(location).attr('href'));
                </script>
</div> <!-- The div of mini-panel-sol-blok is closing in here -->
Edited by ThistleProse

HaLp2lk.png
October-2017.png 

Link to comment
Share on other sites

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

It's a couple of days before I will (hopefully) get internet access to my computer so I can't give you a thorough check yet.

 

To be clear, the issue is that you can't save the templates? It's fine on the user end?

 

Is your php plugin up to date? What about the php version on your server? Can you see if it's isolated to that template set? (Check with a fresh mybb default theme and template set.)

 

Hopefully that'll get you started! Or set you on the right path!

 

sig.png.30b42565d04d922988370bf14e1447bc.png

PSI: an Occult Investigations RP

Roleplay Architects: Grab a friend (or many friends!) and just write.

You can also find me at:

static-historicalrp.jpg  B8CB4x.png rpabutton.png

Link to comment
Share on other sites

Hi Kit!

No rush; its not on a live site just a WiP so as annoying as it is, it's not destroying lives 😛

 

Its just this one theme (https://community.mybb.com/mods.php?action=view&pid=1060) - if I delete everything in the aforementioned templates, I can save it. Which, you know, I did as a test and now I have 'one two three' as my member template because I can't insert and save the original stuff LOL /headdesk

 

On the front end of the site, the forums, the code all works (or worked, in the case of the member template lol) perfectly fine. I wanted to add a quick link to the edit profile page and, well. Yeah. That's when I discovered the issue.

 

I'm not sure what you mean by php plugin?

 

MyBB version is 1.8.21

SQL Engine is MySQLi 5.6.45

My PHP is 7.2.22

 

I tried re-installing that same theme, thinking it might have installed weird, but got the same issue.

There is a chance it could be another Plugin, so I've included the ones I've installed below; there are more than I thought there was lol:

 

I F*ing hate WYSIWYG and I can't figure out how to turn the dumb shit off so that I can get rid of the spoiler box so. Yeah. Half my post is in the spoiler  box. Sorry.

 

 

- Enhanced Account Switcher

- Apply Thread Prefix

- Discord Webhooks for MyBB

- Favourite Threads

- Hide Groups from Memberlist

- Inline Success Messages

- It's Complicated

- Latest Posts in Sidebar

- MentionMe

- My Discord

- MyCode: [*Spoiler*]

- NewPoints

- Online Today

- OUCG Block by Thread Prefix

- PHP and Template Conditionals

- Plugin Uploader

- Rate Me A Funny

- Recent Threads

- Style Usernames

- Tags

- Thank You / Like System

- Thread Descriptions

- Threadlog

- Mark Threads as Done/Solved

- Thread Prefixes

- Trash Bin

- Twitter Feed Widget

- Upcoming Events

- Users Browsed Topic

- YourCode

[/code]

 

All Plugins are currently up to date.

 

Thanks again for your help with this! I really appreciate it!

 

PS. The Theme was originally written in... Turkish? and translated into English to be released on the MyBB forums. A lot of the code didn't seem to get translated, like the CSS code title thingies. 

Edited by ThistleProse

HaLp2lk.png
October-2017.png 

Link to comment
Share on other sites

  • Admin

This issue is with your server, not with the templates. 403 errors are "forbidden" errors which often means that the file it's trying to save to is not writable. This most likely has something to do with how the server is setup like a mod_security misconfiguration which you would have to talk to your host about. As a precautionary measure to be sure I installed the theme here:

https://mybb.rpginitiative.com/

 

No mods, fresh install I can save all of the above templates with no issues.

 

Edit: As a note, this theme is broken and I recommend finding a new one. If you try loading it on the site linked above it seems to load forever. I checked out the Network tab and it seems to just keep reloading the same asset repeatedly.

 

image.png

0_mainsignature.jpg

image.png

Profile set made by myself and original Artwork by Fae Merriman, my daughter.

 

 

Link to comment
Share on other sites

Hi!

 

Thanks for looking into this, but this; my host was able to assist and the issue has been fixed 😄

HaLp2lk.png
October-2017.png 

Link to comment
Share on other sites

  • Admin

Glad I was able to assist in getting your issue resolved.

  • Fuck Yeah! 1

0_mainsignature.jpg

image.png

Profile set made by myself and original Artwork by Fae Merriman, my daughter.

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use, Guidelines and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.