News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Problem uploading attachments

Started by Dylert, August 16, 2019, 04:40:13 PM

Previous topic - Next topic

Dylert

I am testing a 2.1 install and it looks really great! :) Great work!

I have a problem with uploading attachments. I got a very, very long red error when I try to upload a picture. This is the error:

IMG_7530.jpg <!DOCTYPE html> <html lang="en-US"> <head> <meta charset="UTF-8"> <link rel="stylesheet" href="https://hellasforum.net/Themes/default/css/minified_65cbd858fa05b9395023ffeaffefaf41.css?smf21rc2_1565982636"> <style> img.avatar { max-width: 100px; max-height: 100px; } </style> <script> var smf_theme_url = "https://hellasforum.net/Themes/default"; var smf_default_theme_url = "https://hellasforum.net/Themes/default"; var smf_images_url = "https://hellasforum.net/Themes/default/images"; var smf_smileys_url = "https://hellasforum.net/Smileys"; var smf_smiley_sets = "aaron,akyhne,hellasforum,fugue,alienine"; var smf_smiley_sets_default = "fugue"; var smf_scripturl = "https://hellasforum.net/index.php"; var smf_iso_case_folding = false; var smf_charset = "UTF-8"; var smf_session_id = "2c32e369ded3a17e4c525c7a45955188"; var smf_session_var = "a5305a6"; var smf_member_id = 2; var ajax_notification_text = 'Loading...'; var help_popup_heading_text = 'A little lost? Let me explain:'; var banned_text = 'Sorry Ole, you are banned from using this forum!'; </script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script src="https://hellasforum.net/Themes/default/scripts/minified_e6db324ab18b176a9fba6af098545b41.js?smf21rc2_1565982636"></script> <script> var new_alert_title = "Hellasforum"; var alert_timeout = 10000; var smf_you_sure ='Are you sure you want to do this?'; </script> <title>Database Error</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta property="og:site_name" content="Hellasforum"> <meta property="og:title" content="Database Error"> <meta property="og:description" content="Database Error"> <meta name="description" content="Database Error"> <meta name="theme-color" content="#557EA0"> <meta name="robots" content="noindex"> <link rel="help" href="https://hellasforum.net/index.php?action=help"> <link rel="contents" href="https://hellasforum.net/index.php"> <link rel="search" href="https://hellasforum.net/index.php?action=search"> <link rel="index" href="https://hellasforum.net/index.php?board=110.0"> </head> <body id="chrome" class="action_uploadAttach board_110"> <div id="footerfix"> <div id="top_section"> <div class="inner_wrap"> <ul class="floatleft" id="top_info"> <li> <a href="https://hellasforum.net/index.php?action=profile" id="profile_menu_top" onclick="return false;"><img src="https://hellasforum.net/custom_avatar/avatar_2_1368557851.png" alt="" class="avatar">Ole</a> <div id="profile_menu" class="top_menu"></div> </li> <li> <a href="https://hellasforum.net/index.php?action=pm" id="pm_menu_top">My Messages <span class="amt">599</span></a> <div id="pm_menu" class="top_menu scrollable"></div> </li> <li> <a href="https://hellasforum.net/index.php?action=profile;area=showalerts;u=2" id="alerts_menu_top">Alerts</a> <div id="alerts_menu" class="top_menu scrollable"></div> </li> </ul> <form id="search_form" class="floatright" action="https://hellasforum.net/index.php?action=search2" method="post" accept-charset="UTF-8"> <input type="search" name="search" value="">&nbsp; <select name="search_selection"> <option value="all">Entire forum </option> <option value="board" selected>This board</option> <option value="members">Members </option> </select> <input type="hidden" name="sd_brd" value="110"> <input type="submit" name="search2" value="Search" class="button"> <input type="hidden" name="advanced" value="0"> </form> </div><!-- .inner_wrap --> </div><!-- #top_section --> <div id="header"> <h1 class="forumtitle"> <a id="top" href="https://hellasforum.net/index.php">Hellasforum</a> </h1> <img id="smflogo" src="https://hellasforum.net/Themes/default/images/smflogo.svg" alt="Simple Machines Forum" title="Simple Machines Forum"> </div> <div id="wrapper"> <div id="upper_section"> <div id="inner_section"> <div id="inner_wrap"> <div class="user"> 16. August 2019, 20:27:55 </div> <hr class="clear"> </div> <a class="menu_icon mobile_user_menu"></a> <div id="main_menu"> <div id="mobile_user_menu" class="popup_container"> <div class="popup_window description"> <div class="popup_heading">Mobile Main Menu <a href="javascript:void(0);" class="main_icons hide_popup"></a> </div> <ul class="dropmenu menu_nav"> <li class="button_home"> <a class="active" href="https://hellasforum.net/index.php"> <span class="main_icons home"></span><span class="textmenu">Home</span> </a> </li> <li class="button_search"> <a href="https://hellasforum.net/index.php?action=search"> <span class="main_icons search"></span><span class="textmenu">Search</span> </a> </li> <li class="button_admin subsections"> <a href="https://hellasforum.net/index.php?action=admin"> <span class="main_icons admin"></span><span class="textmenu">Admin <span class="amt">213</span></span> </a> <ul> <li> <a href="https://hellasforum.net/index.php?action=admin;area=featuresettings"> Features and Options </a> </li> <li> <a href="https://hellasforum.net/index.php?action=admin;area=packages"> Package Manager </a> </li> <li> <a href="https://hellasforum.net/index.php?action=admin;area=logs;sa=errorlog;desc"> Error Log <span class="amt">21</span> </a> </li> <li> <a href="https://hellasforum.net/index.php?action=admin;area=permissions"> Permissions </a> </li> <li> <a href="https://hellasforum.net/index.php?action=admin;area=viewmembers;sa=browse;type=approve"> Member Approvals <span class="amt">192</span> </a> </li> </ul> </li> <li class="button_moderate subsections"> <a href="https://hellasforum.net/index.php?action=moderate"> <span class="main_icons moderate"></span><span class="textmenu">Moderate</span> </a> <ul> <li> <a href="https://hellasforum.net/index.php?action=moderate;area=reportedposts"> Reported Posts </a> </li> <li> <a href="https://hellasforum.net/index.php?action=moderate;area=reportedmembers"> Reported Members </a> </li> </ul> </li> <li class="button_calendar subsections"> <a href="https://hellasforum.net/index.php?action=calendar"> <span class="main_icons calendar"></span><span class="textmenu">Calendar</span> </a> <ul> <li> <a href="https://hellasforum.net/index.php?action=calendar"> View Calendar </a> </li> <li> <a href="https://hellasforum.net/index.php?action=calendar;sa=post"> Post Event </a> </li> </ul> </li> <li class="button_mlist subsections"> <a href="https://hellasforum.net/index.php?action=mlist"> <span class="main_icons mlist"></span><span class="textmenu">Members</span> </a> <ul> <li> <a href="https://hellasforum.net/index.php?action=mlist"> View the memberlist </a> </li> <li> <a href="https://hellasforum.net/index.php?action=mlist;sa=search"> Search for Members </a> </li> </ul> </li> <li class="button_logout"> <a href="https://hellasforum.net/index.php?action=logout;a5305a6=2c32e369ded3a17e4c525c7a45955188"> <span class="main_icons logout"></span><span class="textmenu">Logout</span> </a> </li> </ul><!-- .menu_nav --> </div> </div> </div> <div class="navigate_section"> <ul> <li class="unread_links"> <a href="https://hellasforum.net/index.php?action=unread" title="Show unread posts since last visit.">Unread Posts</a> <a href="https://hellasforum.net/index.php?action=unreadreplies" title="Show new replies to your posts.">Updated Topics</a> </li> <li> <a href="https://hellasforum.net/index.php"><span>Hellasforum</span></a> </li> <li> <span class="dividers"> &#9658; </span> <a href="https://hellasforum.net/index.php#c1"><span>Om Hellasforum</span></a> </li> <li class="last"> <span class="dividers"> &#9658; </span> <a href="https://hellasforum.net/index.php?board=110.0"><span>Test</span></a> </li> </ul> </div><!-- .navigate_section --> </div><!-- #inner_section --> </div><!-- #upper_section --> <div id="content_section"> <div id="main_content_section"> <div class="errorbox" id="errors"> <dl> <dt> <strong id="error_serious">Your forum is in Maintenance Mode. Only administrators can currently log in.</strong> </dt> <dd class="error" id="error_list"> You can turn off Maintenance Mode from the <a href="https://hellasforum.net/index.php?action=admin;area=serversettings;a5305a6=2c32e369ded3a17e4c525c7a45955188">Server Settings</a> area. </dd> </dl> </div> <div id="fatal_error"> <div class="cat_bar"> <h3 class="catbg"> Database Error </h3> </div> <div class="windowbg"> <div class="padding"> Field 'au_hash' doesn't have a default value<br>File: /customers/d/7/7/hellasforum.net/httpd.www/Sources/Subs-Attachments.php<br>Line: 721 </div> </div> </div> <div class="centertext"> <a class="button" href="javascript:document.location=document.referrer">Back</a> </div> </div><!-- #main_content_section --> </div><!-- #content_section --> </div><!-- #wrapper --> </div><!-- #footerfix --> <div id="footer"> <div class="inner_wrap"> <ul> <li class="floatright"><a href="https://hellasforum.net/index.php?action=help">Help</a> | <a href="#top_section">Go Up &#9650;</a></li> <li class="copyright"><a href="https://hellasforum.net/index.php?action=credits" title="License" target="_blank" rel="noopener">SMF 2.1 RC2 &copy; 2019</a>, <a href="http://www.simplemachines.org" title="Simple Machines" target="_blank" rel="noopener">Simple Machines</a></li> </ul> </div> </div><!-- #footer --> <script> window.addEventListener("DOMContentLoaded", function() { function triggerCron() { $.get('https://hellasforum.net' + "/cron.php?ts=1565987265"); } window.setTimeout(triggerCron, 1); var user_menus = new smc_PopupMenu(); user_menus.add("profile", "https://hellasforum.net/index.php?action=profile;area=popup"); user_menus.add("alerts", "https://hellasforum.net/index.php?action=profile;area=alerts_popup;u=2"); user_menus.add("pm", "https://hellasforum.net/index.php?action=pm;sa=popup"); }); </script> </body> </html> 5.1 MB

In my error log I can read this:
Database Error: Field 'au_hash' doesn't have a default value
INSERT INTO smf_attachments(`id_folder`, `id_msg`, `filename`, `file_hash`, `fileext`, `size`, `width`, `height`, `mime_type`, `approved`)
         VALUES
            (13, 0, SUBSTRING('IMG_7525.jpg', 1, 255), SUBSTRING('5d0972c39262d7945d48f4debf6e03307fc7c75c', 1, 40), SUBSTRING('jpg', 1, 8), 5093213, 3000, 2000, SUBSTRING('image/jpeg', 1, 20), 1)
https://hellasforum.net/index.php?action=uploadAttach;sa=add;a5305a6=2c32e369ded3a17e4c525c7a45955188;board=110
/customers/d/7/7/hellasforum.net/httpd.www/Sources/Subs-Attachments.php (Line 721)

In smf_attachments in my database there is a line called "au_hash". Maybe it is from a mod I have deleted? I don't know. Please look at the attached file that shows smf_attachments.

Hopefully someone can help me with this! :) Thanks in advance! :) 

Arantor

Click the edit button for that column (Endre?), there will be a tickbox for 'NULL', which will be empty, tick it and then save the column.

Dylert

You made my day! It works! Thanks a lot!   

Advertisement: