MyBB Community Forums

Full Version: Forum broken after attempted upgrade to 1.8.21
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I extracted the contents of the upgrade folder to my forum home directory and now the forum is broken, displaying just a blank page: https://lookism.net

I checked the error.log:

<error>
        <dateline>1562744957</dateline>
        <script></script>
        <line>0</line>
        <type>20</type>
        <friendly_type>MyBB SQL Error</friendly_type>
        <message>SQL Error: 1052 - Column 'uid' in where clause is ambiguous
Query:
                SELECT pm.*, fu.username AS fromusername, tu.username AS touser$
                FROM mybb_privatemessages pm
                LEFT JOIN mybb_users fu ON (fu.uid=pm.fromid)
                LEFT JOIN mybb_users tu ON (tu.uid=pm.toid)
                WHERE pmid='232354299618' AND uid='17851' AND pm.uid='17851'
                ORDER BY pm.folder ASC, pm.dateline DESC
        </message>
</error>

I disabled all plugins and removed IPGhost plugin as I read online this can be caused by it. 
Admin CP still works fine but the forum simply displays a blank page now.
I upgraded  to 1.8.21 but issue persists.
Are you sure all plugins are disabled? I can only see this query once in the core code, but it would only run when exporting PMs, not on the index.
(2019-07-14, 11:37 AM)Matt Wrote: [ -> ]Are you sure all plugins are disabled? I can only see this query once in the core code, but it would only run when exporting PMs, not on the index.

I've disabled them through configuration > disable all plugins and also manually deactivated every plugin.

Also note that I attempted to transfer files through SSH for the first time instead of using an FTP client, it happened after I tried extracting the zipped upload files a few times.
Oh, it’s not actually that query that’s breaking it, the timestamp is 4 days old.

You have an index.html file in your root folder - you can access the site fine at https://lookism.net/index.php. Delete the index.html and the site will appear again.
(2019-07-14, 11:52 AM)Matt Wrote: [ -> ]Oh, it’s not actually that query that’s breaking it, the timestamp is 4 days old.

You have an index.html file in your root folder - you can access the site fine at https://lookism.net/index.php. Delete the index.html and the site will appear again.

Yeah it appears I accidentally extracted the index.html from the uploads folder into root somehow. Thanks. 

I deleted it now but lookism.net is still broken :/
Seems it’s still there: https://lookism.net/index.html
NVM, Fixed now.

Thanks.

Now there's the issue of getting Error 504's when posting threads and all posts are showing <p> tags.

Any idea? @Matt

Fixed the editor bug with the post in this forum.

Now the forum is loading slowly and threads are getting posted, but with 504 error.

MyBB Debug Information
Page Generation
Page Generation Statistics
Page Generation Time:	964 ms	No. DB Queries:	18
PHP Processing Time:	37 ms (3.86%)	DB Processing Time:	927 ms (96.14%)
Extensions Used:	mysqli, xml	Global.php Processing Time:	27 ms
PHP Version:	7.0.33-6+0~20190412071436.12+stretch~1.gbp26747c	Server Load:	1.18
GZip Encoding Status:	Enabled	No. Templates Used:	161 (161 Cached / 0 Manually Loaded)
Memory Usage:	6 MB (6291456 bytes)	Memory Limit:	4096M
Database Connections (1 Total)
[READ] lookism_mybb@localhost (Connected in 324 μs)

Database Queries (18 Total)
#1 - Select Query
SELECT * FROM mybb_sessions WHERE sid='2edb4a935bdd5ec10ab5a98114e84895' AND ip=X'c263694b'
Table	Type	Possible Keys	Key	Key Length	Ref	Rows	Extra
mybb_sessions	const	PRIMARY,ip	PRIMARY	98	const	1	
Query Time: 206 μs

#2 - Select Query
SELECT u.*, f.* FROM mybb_users u LEFT JOIN mybb_userfields f ON (f.ufid=u.uid) WHERE u.uid='1' LIMIT 1
Table	Type	Possible Keys	Key	Key Length	Ref	Rows	Extra
u	const	PRIMARY	PRIMARY	4	const	1	
f	const	PRIMARY	PRIMARY	4	const	1	
Query Time: 484 μs

#3 - Write Query
UPDATE mybb_sessions SET `uid`='1', `time`=1563113987, `location`='/forumdisplay.php?fid=3&amp;debug=1', `useragent`='Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36', `location1`=3, `location2`=0, `nopermission`=0 WHERE sid='2edb4a935bdd5ec10ab5a98114e84895'
Query Time: 6 ms

#4 - Select Query
SELECT name, tid, properties, stylesheets, allowedgroups FROM mybb_themes WHERE tid = '11' LIMIT 1
Table	Type	Possible Keys	Key	Key Length	Ref	Rows	Extra
mybb_themes	const	PRIMARY	PRIMARY	2	const	1	
Query Time: 274 μs

#5 - Select Query
SELECT title,template FROM mybb_templates WHERE title IN ('' ,'forumdisplay' ,'forumdisplay_thread' ,'forumbit_depth1_cat' ,'forumbit_depth2_cat' ,'forumbit_depth2_forum' ,'forumdisplay_subforums' ,'forumdisplay_threadlist' ,'forumdisplay_moderatedby' ,'forumdisplay_searchforum' ,'forumdisplay_thread_rating' ,'forumdisplay_threadlist_rating' ,'forumbit_depth1_forum_lastpost' ,'forumdisplay_thread_multipage_page' ,'forumdisplay_thread_multipage' ,'forumdisplay_thread_multipage_more' ,'forumdisplay_thread_gotounread' ,'forumbit_depth2_forum_lastpost' ,'forumdisplay_rules_link' ,'forumdisplay_orderarrow' ,'forumdisplay_newthread' ,'multipage' ,'multipage_breadcrumb' ,'multipage_end' ,'multipage_jump_page' ,'multipage_nextpage' ,'multipage_page' ,'multipage_page_current' ,'multipage_page_link_current' ,'multipage_prevpage' ,'multipage_start' ,'forumdisplay_thread_unapproved_posts' ,'forumdisplay_nothreads' ,'forumjump_advanced' ,'forumjump_special' ,'forumjump_bit' ,'forumdisplay_password_wrongpass' ,'forumdisplay_password' ,'forumdisplay_inlinemoderation_custom_tool' ,'forumbit_subforums' ,'forumbit_moderators' ,'forumbit_depth2_forum_lastpost_never' ,'forumbit_depth2_forum_lastpost_hidden' ,'forumdisplay_usersbrowsing_user' ,'forumdisplay_usersbrowsing' ,'forumdisplay_inlinemoderation' ,'forumdisplay_thread_modbit' ,'forumdisplay_inlinemoderation_col' ,'forumdisplay_inlinemoderation_selectall' ,'forumdisplay_threadlist_clearpass' ,'forumdisplay_thread_rating_moved' ,'forumdisplay_announcements_announcement' ,'forumdisplay_announcements' ,'forumdisplay_threads_sep' ,'forumbit_depth3_statusicon' ,'forumbit_depth3' ,'forumdisplay_sticky_sep' ,'forumdisplay_thread_attachment_count' ,'forumdisplay_rssdiscovery' ,'forumbit_moderators_group' ,'forumdisplay_inlinemoderation_openclose' ,'forumdisplay_inlinemoderation_stickunstick' ,'forumdisplay_inlinemoderation_softdelete' ,'forumdisplay_inlinemoderation_restore' ,'forumdisplay_inlinemoderation_delete' ,'forumdisplay_inlinemoderation_manage' ,'forumdisplay_nopermission' ,'forumbit_depth2_forum_unapproved_posts' ,'forumbit_depth2_forum_unapproved_threads' ,'forumbit_moderators_user' ,'forumdisplay_inlinemoderation_standard' ,'forumdisplay_threadlist_prefixes_prefix' ,'forumdisplay_threadlist_prefixes' ,'forumdisplay_thread_icon' ,'forumdisplay_rules' ,'forumdisplay_thread_deleted' ,'forumdisplay_announcements_announcement_modbit' ,'forumbit_depth2_forum_viewers' ,'forumdisplay_threadlist_sortrating' ,'forumdisplay_inlinemoderation_custom' ,'forumdisplay_announcement_rating' ,'forumdisplay_inlinemoderation_approveunapprove' ,'forumdisplay_threadlist_subscription' ,'headerinclude' ,'header' ,'footer' ,'gobutton' ,'htmldoctype' ,'header_welcomeblock_member' ,'header_welcomeblock_member_user' ,'header_welcomeblock_member_moderator' ,'header_welcomeblock_member_admin' ,'error' ,'global_pending_joinrequests' ,'global_awaiting_activation' ,'nav' ,'nav_sep' ,'nav_bit' ,'nav_sep_active' ,'nav_bit_active' ,'footer_languageselect' ,'footer_themeselect' ,'global_unreadreports' ,'footer_contactus' ,'global_boardclosed_warning' ,'global_bannedwarning' ,'error_inline' ,'error_inline_item' ,'error_nopermission_loggedin' ,'error_nopermission' ,'global_pm_alert' ,'header_menu_search' ,'header_menu_portal' ,'redirect' ,'footer_languageselect_option' ,'video_dailymotion_embed' ,'video_facebook_embed' ,'video_liveleak_embed' ,'video_metacafe_embed' ,'video_myspacetv_embed' ,'video_mixer_embed' ,'video_vimeo_embed' ,'video_yahoo_embed' ,'video_youtube_embed' ,'debug_summary' ,'smilieinsert_row' ,'smilieinsert_row_empty' ,'smilieinsert' ,'smilieinsert_getmore' ,'smilieinsert_smilie' ,'global_board_offline_modal' ,'footer_showteamlink' ,'footer_themeselector' ,'task_image' ,'usercp_themeselector_option' ,'php_warnings' ,'mycode_code' ,'mycode_email' ,'mycode_img' ,'mycode_php' ,'mycode_quote_post' ,'mycode_size_int' ,'mycode_url' ,'global_no_permission_modal' ,'global_boardclosed_reason' ,'nav_dropdown' ,'global_remote_avatar_notice' ,'global_modqueue' ,'global_modqueue_notice' ,'header_welcomeblock_member_buddy' ,'header_welcomeblock_member_pms' ,'header_welcomeblock_member_search' ,'header_welcomeblock_guest' ,'header_welcomeblock_guest_login_modal' ,'header_welcomeblock_guest_login_modal_lockout' ,'header_menu_calendar' ,'header_menu_memberlist' ,'global_dst_detection' ,'header_quicksearch' ,'smilie' ,'modal' ,'modal_button') AND sid IN ('-2','-1','1') ORDER BY sid ASC
Table	Type	Possible Keys	Key	Key Length	Ref	Rows	Extra
mybb_templates	ALL	sid				3256	Using where; Using filesort
Query Time: 5 ms

#6 - Select Query
SELECT replyto FROM mybb_posts WHERE visible = 0
Table	Type	Possible Keys	Key	Key Length	Ref	Rows	Extra
mybb_posts	ref	visible	visible	1	const	1	
Query Time: 123 μs

#7 - Select Query
SELECT COUNT(aid) AS unapprovedattachments FROM mybb_attachments WHERE visible=0
Table	Type	Possible Keys	Key	Key Length	Ref	Rows	Extra
mybb_attachments	index		pid	5		1465	Using where; Using index
Query Time: 407 μs

#8 - Select Query
SELECT pm.subject, pm.pmid, fu.username AS fromusername, fu.uid AS fromuid FROM mybb_privatemessages pm LEFT JOIN mybb_users fu on (fu.uid=pm.fromid) WHERE pm.folder = '1' AND pm.uid = '1' AND pm.status = '0' ORDER BY pm.dateline DESC LIMIT 1
Table	Type	Possible Keys	Key	Key Length	Ref	Rows	Extra
pm	ref	uid	uid	6	const,const	676	Using where; Using filesort
fu	eq_ref	PRIMARY	PRIMARY	4	lookism_mybb.pm.fromid	1	
Query Time: 2 ms

#9 - Select Query
SELECT f.*, fr.dateline AS lastread FROM mybb_forums f LEFT JOIN mybb_forumsread fr ON (fr.fid=f.fid AND fr.uid='1') WHERE f.active != 0 ORDER BY pid, disporder
Table	Type	Possible Keys	Key	Key Length	Ref	Rows	Extra
f	ALL					11	Using where; Using filesort
fr	eq_ref	fid	fid	8	lookism_mybb.f.fid,const	1	Using where
Query Time: 369 μs

#10 - Select Query
SELECT s.ip, s.uid, u.username, s.time, u.invisible, u.usergroup, u.usergroup, u.displaygroup FROM mybb_sessions s LEFT JOIN mybb_users u ON (s.uid=u.uid) WHERE s.time > '1563113087' AND location1='3' AND nopermission != 1 ORDER BY u.username ASC, s.time DESC
Table	Type	Possible Keys	Key	Key Length	Ref	Rows	Extra
s	range	location,time	time	4		358	Using index condition; Using where; Using temporary; Using filesort
u	eq_ref	PRIMARY	PRIMARY	4	lookism_mybb.s.uid	1	
Query Time: 2 ms

#11 - Select Query
SELECT COUNT(tid) AS threads FROM mybb_threads WHERE fid = '3' AND visible IN (-1,0,1)
Table	Type	Possible Keys	Key	Key Length	Ref	Rows	Extra
mybb_threads	range	fid	fid	3		223354	Using where; Using index
Query Time: 193 ms

#12 - Select Query
SELECT a.*, u.username FROM mybb_announcements a LEFT JOIN mybb_users u ON (u.uid=a.uid) WHERE a.startdate<='1563113987' AND (a.enddate>='1563113987' OR a.enddate='0') AND ((fid='1' OR fid='3') OR fid='-1') ORDER BY a.startdate DESC LIMIT 0, 2
Table	Type	Possible Keys	Key	Key Length	Ref	Rows	Extra
a	ALL	fid				3	Using where; Using filesort
u	eq_ref	PRIMARY	PRIMARY	4	lookism_mybb.a.uid	1	
Query Time: 388 μs

#13 - Select Query
SELECT t.*, t.username AS threadusername, u.username FROM mybb_threads t LEFT JOIN mybb_users u ON (u.uid = t.uid) WHERE t.fid='3' AND t.visible IN (-1,0,1) ORDER BY t.sticky DESC, t.lastpost desc LIMIT 0, 50
Table	Type	Possible Keys	Key	Key Length	Ref	Rows	Extra
t	ref	fid	fid	2	const	223354	Using index condition; Using where; Using filesort
u	eq_ref	PRIMARY	PRIMARY	4	lookism_mybb.t.uid	1	
Query Time: 699 ms

#14 - Select Query
SELECT DISTINCT tid,uid FROM mybb_posts WHERE uid='1' AND tid IN (472045,471393,193644,472150,471587,472149,472148,472147,460338,472139,472142,472113,472138,472137,472136,472134,471444,472133,472132,359925,472131,472130,472129,472127,472118,472093,472128,472125,472126,472124,472123,472122,472121,472120,472119,472114,472117,472116,472115,472112,472111,472108,472110,472109,472107,472106,472105,472104,472103,463666) AND visible IN (-1,0,1)
Table	Type	Possible Keys	Key	Key Length	Ref	Rows	Extra
mybb_posts	range	tid,uid,visible,tiddate	tid	8		51	Using index condition; Using where; Using temporary
Query Time: 1 ms

#15 - Select Query
SELECT * FROM mybb_threadsread WHERE uid='1' AND tid IN (472045,471393,193644,472150,471587,472149,472148,472147,460338,472139,472142,472113,472138,472137,472136,472134,471444,472133,472132,359925,472131,472130,472129,472127,472118,472093,472128,472125,472126,472124,472123,472122,472121,472120,472119,472114,472117,472116,472115,472112,472111,472108,472110,472109,472107,472106,472105,472104,472103,463666)
Table	Type	Possible Keys	Key	Key Length	Ref	Rows	Extra
mybb_threadsread	range	tid	tid	8		50	Using where
Query Time: 482 μs

#16 - Select Query
SELECT dateline FROM mybb_forumsread WHERE fid='3' AND uid='1'
Table	Type	Possible Keys	Key	Key Length	Ref	Rows	Extra
Impossible WHERE noticed after reading const tables
Query Time: 188 μs

#17 - Select Query
SELECT COUNT(t.tid) AS unread_count FROM mybb_threads t LEFT JOIN mybb_threadsread tr ON (tr.tid=t.tid AND tr.uid='1') LEFT JOIN mybb_forumsread fr ON (fr.fid=t.fid AND fr.uid='1') WHERE t.visible=1 AND t.closed NOT LIKE 'moved|%' AND t.fid IN (3) AND t.lastpost > IFNULL(tr.dateline,1562509187) AND t.lastpost > IFNULL(fr.dateline,1562509187) AND t.lastpost>1562509187
Table	Type	Possible Keys	Key	Key Length	Ref	Rows	Extra
t	range	fid,lastpost	lastpost	4		3250	Using index condition; Using where
tr	eq_ref	tid	tid	8	lookism_mybb.t.tid,const	1	Using where
fr	const	fid	fid	8	const,const	1	Using where
Query Time: 16 ms

#18 - Select Query
SELECT fid FROM mybb_forumsubscriptions WHERE fid='3' AND uid='1' LIMIT 1
Table	Type	Possible Keys	Key	Key Length	Ref	Rows	Extra
mybb_forumsubscriptions	ref	uid	uid	4	const	1	Using where
Query Time: 128 μs

Cache Calls (16 Total, 8 ms)
#16 - Read Call
(memcached) [HIT] threadprefixes
Call Time: 280 μs

Template Statistics
Templates Used (Loaded for this Page) - 161 Total
usercp_themeselector_option, error, error_inline, error_nopermission, video_metacafe_embed, error_nopermission_loggedin, video_dailymotion_embed, error_inline_item, footer, video_facebook_embed, footer_showteamlink, footer_contactus, video_liveleak_embed, forumdisplay_threadlist_subscription, footer_languageselect, video_myspacetv_embed, global_modqueue, footer_languageselect_option, video_youtube_embed, global_modqueue_notice, footer_themeselect, header_welcomeblock_guest_login_modal, footer_themeselector, video_vimeo_embed, header_welcomeblock_guest_login_modal_lockout, forumbit_depth1_cat, video_yahoo_embed, header_welcomeblock_member_buddy, forumbit_depth1_forum_lastpost, forumbit_depth2_cat, forumbit_depth2_forum, forumbit_depth2_forum_lastpost, forumbit_depth2_forum_lastpost_hidden, forumbit_depth2_forum_lastpost_never, forumbit_depth2_forum_unapproved_posts, forumbit_depth2_forum_unapproved_threads, forumbit_depth2_forum_viewers, forumbit_depth3, forumbit_depth3_statusicon, forumbit_moderators, forumbit_moderators_group, forumbit_moderators_user, forumbit_subforums, forumdisplay, forumdisplay_announcement_rating, forumdisplay_announcements, forumdisplay_announcements_announcement, forumdisplay_announcements_announcement_modbit, forumdisplay_inlinemoderation, forumdisplay_inlinemoderation_approveunapprove, modal, forumdisplay_inlinemoderation_col, modal_button, forumdisplay_inlinemoderation_custom, forumdisplay_inlinemoderation_custom_tool, debug_summary, forumdisplay_inlinemoderation_delete, gobutton, video_mixer_embed, forumdisplay_inlinemoderation_manage, headerinclude, forumdisplay_inlinemoderation_openclose, htmldoctype, forumdisplay_inlinemoderation_restore, forumdisplay_inlinemoderation_selectall, forumdisplay_inlinemoderation_softdelete, redirect, forumdisplay_inlinemoderation_standard, forumdisplay_inlinemoderation_stickunstick, forumdisplay_moderatedby, task_image, forumdisplay_newthread, smilie, forumdisplay_nothreads, global_board_offline_modal, forumdisplay_orderarrow, forumdisplay_password, forumdisplay_password_wrongpass, forumdisplay_rssdiscovery, forumdisplay_rules, forumdisplay_rules_link, forumdisplay_searchforum, forumdisplay_sticky_sep, forumdisplay_subforums, forumdisplay_thread, forumdisplay_thread_attachment_count, forumdisplay_thread_gotounread, forumdisplay_thread_icon, forumdisplay_thread_modbit, forumdisplay_thread_multipage, forumdisplay_thread_multipage_more, forumdisplay_thread_multipage_page, forumdisplay_thread_rating, forumdisplay_thread_rating_moved, forumdisplay_thread_unapproved_posts, forumdisplay_threadlist, forumdisplay_threadlist_clearpass, forumdisplay_threadlist_prefixes, forumdisplay_threadlist_prefixes_prefix, forumdisplay_threadlist_rating, forumdisplay_threadlist_sortrating, forumdisplay_threads_sep, forumdisplay_usersbrowsing, forumdisplay_usersbrowsing_user, forumjump_advanced, forumjump_bit, forumjump_special, global_bannedwarning, global_boardclosed_warning, global_pending_joinrequests, global_pm_alert, global_unreadreports, global_awaiting_activation, header, header_menu_calendar, header_menu_memberlist, header_menu_portal, header_menu_search, header_quicksearch, header_welcomeblock_guest, header_welcomeblock_member, header_welcomeblock_member_admin, header_welcomeblock_member_moderator, multipage, multipage_breadcrumb, multipage_end, multipage_jump_page, multipage_nextpage, multipage_page, multipage_page_current, multipage_page_link_current, multipage_prevpage, multipage_start, nav, nav_bit, nav_bit_active, nav_dropdown, nav_sep, nav_sep_active, forumdisplay_nopermission, forumdisplay_thread_deleted, global_boardclosed_reason, global_dst_detection, global_no_permission_modal, global_remote_avatar_notice, header_welcomeblock_member_pms, header_welcomeblock_member_search, header_welcomeblock_member_user, php_warnings, smilieinsert, smilieinsert_getmore, smilieinsert_smilie, mycode_code, mycode_email, mycode_img, mycode_php, mycode_quote_post, mycode_size_int, mycode_url, smilieinsert_row, smilieinsert_row_empty

Anyone have an idea why?