Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 12-13-2010, 01:25 AM
jpietrowiak jpietrowiak is offline
 
Join Date: Dec 2008
Posts: 46
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Error when clicking access mask in admincp

Hi All,
Hope someone can help with this. This error comes up when I click the access masks under USER in admincp and we get a vbulletin database error. The forum seems to be running ok but noticed this when I was trying to find something else.

Update: I tried deleting all access masks since I could still get to that link on top and still came up with same error. I also tried my old forum before I moved to new domain and that works ok. So I think it has something to do with moving it and updating links some how in the database. The forum has been running fine for a few weeks now so i don't want to restore backups when I moved it. I was playing with the MYSQL database and manually editing some links to where the forum is now. What can I do to fix it.


Database error in vBulletin 3.8.6:

Invalid SQL:
SELECT COUNT(*) AS count,forumid,accessmask FROM access GROUP BY forumid,accessmask;

MySQL Error : Unknown column 'forumid' in 'field list'
Error Number : 1054

Thanks

--------------- Added [DATE]1292219501[/DATE] at [TIME]1292219501[/TIME] ---------------

Ok tried going through some of the other stuff for repairing this problem. I also have the same thing occur when I click under maintenance to "Fix Unique Indexes" same error occurs.

Invalid SQL:
SELECT userid, forumid, COUNT(*) AS occurences
FROM access
GROUP BY userid, forumid
HAVING occurences > 1;

MySQL Error : Unknown column 'userid' in 'field list'
Error Number : 1054
Reply With Quote
  #2  
Old 12-13-2010, 05:48 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't know why that would happen or what the repair functions actually do, but - Here's part of install/mysql-schema.php:

Code:
CREATE TABLE " . TABLE_PREFIX . "access (
	userid INT UNSIGNED NOT NULL DEFAULT '0',
	forumid SMALLINT UNSIGNED NOT NULL DEFAULT '0',
	accessmask SMALLINT UNSIGNED NOT NULL DEFAULT '0',
	PRIMARY KEY userid (userid, forumid)
)
So there definitely should be a forumid and userid column. Seeing as that table doesn't have any rows in it (because you said you deleted them all) I think if it were me I might just try to recreate it using the SQL above (replacing the " . TABLE_PREFIX. " with the actual table prefix, of course).
Reply With Quote
  #3  
Old 12-13-2010, 06:52 PM
jpietrowiak jpietrowiak is offline
 
Join Date: Dec 2008
Posts: 46
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Now that I am thinking of it. What do you think about me somehow exporting the one table out of my old forum and importing to the moved forum. Think this would mess to much up? I don't know what the access table or mask is even for.

I checked tables and in the current table I have this below

aid int(11) No None AUTO_INCREMENT Browse distinct values Change Drop Primary Unique Index Fulltext
mask varchar(255) utf8_general_ci No Browse distinct values Change Drop Primary Unique Index Fulltext
type varchar(255) utf8_general_ci No Browse distinct values Change Drop Primary Unique Index Fulltext
status tinyint(4) No 0

In the ok table I have the below

userid int(10) UNSIGNED No 0 Browse distinct values Change Drop Primary Unique Index Fulltext
forumid smallint(5) UNSIGNED No 0 Browse distinct values Change Drop Primary Unique Index Fulltext
accessmask smallint(5) UNSIGNED No 0 Browse distinct values Change Drop Primary Unique Index Fulltext

Any idea what could have added the extra columns and eliminated the good ones? Have not tried to restore or do as you said yet.
Reply With Quote
  #4  
Old 12-13-2010, 07:38 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by jpietrowiak View Post
Any idea what could have added the extra columns and eliminated the good ones? Have not tried to restore or do as you said yet.
Not really - I mean, I could guess, like maybe an older version of vB was different, or the database you imported to already had a table named access (since the table you have doesn't seem to match any vB table)...or something else you installed after changed it (do you have a table prefix?).

I guess you could import the old table as long as the forumids and userids are the same as the old database (as they would be if you imported the old data into your current db). I'm not absolutely sure but I think that table stores special access "exceptions" for specific users, so unless you had something like that set up then the table was probably empty anyway.
Reply With Quote
  #5  
Old 12-13-2010, 09:49 PM
jpietrowiak jpietrowiak is offline
 
Join Date: Dec 2008
Posts: 46
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for the reply. I tried importing the old access table with no luck. So I ran the sql statement you provided and every thing seems to function correctly the two pages no longer error out when I run them. Hope it does not affect anything like it is. I don't think i had any custom settings in there so it should be ok. But I have to wonder why the values were there and why the other ones were gone as I just moved from one domain & host to another one.

Thanks for your help. Couldn't of done it without ya.

Jamey
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:30 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04179 seconds
  • Memory Usage 2,198KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete