MyBB Community Forums

Full Version: Creating user view in ACP - SQL Error 1054
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
New(ish) BB running on 1.8.7

Tried to create a new view of users in ACP to show latest users. Selected Registered, Username and Last Active as fields to show, sorted by Registered date in descending order.

When I try to save the view, I get the following:

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:1054 - Unknown column 'custom_profile_fields' in 'field list'
Query:INSERT INTO mrjb_adminviews (uid,title,type,visibility,fields,conditions,custom_profile_fields,sortby,sortorder,perpage,view_type) VALUES ('4','Join date','user',2,'a:3:{i:0;s:10:\"lastactive\";i:1;s:7:\"regdate\";i:2;s:8:\"username\";}','a:18:{s:8:\"username\";s:0:\"\";s:5:\"email\";s:0:\"\";s:7:\"website\";s:0:\"\";s:3:\"icq\";s:0:\"\";s:3:\"aim\";s:0:\"\";s:5:\"yahoo\";s:0:\"\";s:5:\"skype\";s:0:\"\";s:6:\"google\";s:0:\"\";s:9:\"signature\";s:0:\"\";s:9:\"usertitle\";s:0:\"\";s:11:\"postnum_dir\";s:12:\"greater_than\";s:7:\"postnum\";s:0:\"\";s:13:\"threadnum_dir\";s:12:\"greater_than\";s:9:\"threadnum\";s:0:\"\";s:7:\"regdate\";s:0:\"\";s:5:\"regip\";s:0:\"\";s:6:\"lastip\";s:0:\"\";s:6:\"postip\";s:0:\"\";}','a:3:{s:4:\"fid3\";a:1:{s:4:\"fid3\";s:3:\"N/A\";}s:4:\"fid1\";s:0:\"\";s:4:\"fid2\";s:0:\"\";}','regdate','desc',20,'table')


Doing exactly the same thing on a local instance with the same config, plugins, themes etc works fine.

Plugins are:

Favicon 1.6.1
Forum Icons 4.0
MyBB GoMobile 1.3
Quick Advanced Editor 6.1.2

Kinda reluctant to hand out admin access for obvious reasons...

Any idea where to start?
Your database is missing that field: https://github.com/mybb/mybb/blob/featur...es.php#L57
(2016-04-10, 05:45 PM)Destroy666 Wrote: [ -> ]Your database is missing that field: https://github.com/mybb/mybb/blob/featur...es.php#L57

Except I can create and use new custom fields, so the table must be there, surely?
Hmmm..? Please read again what I wrote. I never said you're missing a table, you seem to not have the specific linked column in that table which can be added through phpMyAdmin.
Sorry, I meant column. I'm trying to get remote access to the database, but on my local instance, the column is there. I can add a custom field on the live instance, which tells me the column must be there, though...
Where can you "add a custom field"? To a view?
I can add custom fields to user profiles. The default three are already there - Sex, Location and Bio and I can add to these.

However, when I did a backup of the mybb_adminviews table and viewed the structure, you are right, the custom_profile_fields column is missing, so it was just me being dumb.

I don't have root access to the server, so I have asked one of the other admins to run the following query:

ALTER TABLE mybb_adminviews ADD COLUMN custom_profile_fields text NOT NULL

I think that should fix it once and for all.