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

Reply
 
Thread Tools Display Modes
  #1  
Old 01-23-2015, 10:09 PM
greigeh greigeh is offline
 
Join Date: Jan 2015
Posts: 113
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default paid subscriptions ACP error

When i press 'view users' from a Paid Subscription in the ACP i get the following database error

HTML Code:
Database error in vBulletin 3.8.8. Patch Level 1:

Invalid SQL:

		SELECT COUNT(*) AS users
		FROM live_subscriptionlog AS subscriptionlog
		LEFT JOIN live_user AS user USING (userid)
		WHERE 1=1 AND subscriptionid=85 AND status = 1
			AND user.userid = subscriptionlog.userid;

MySQL Error   : Column 'status' in where clause is ambiguous
Error Number  : 1052
Request Date  : Saturday, January 24th 2015 @ 12:08:15 AM
Error Date    : Saturday, January 24th 2015 @ 12:08:15 AM
Script        : http://----.com/acp/subscriptions.php?do=find&status=1&subscriptionid=85&s=
Referrer      : http://-------.com/acp/subscriptions.php?do=modify
IP Address    : -----
Username      : Greig
Classname     : vB_Database
MySQL Version : 5.5.40-cll
Any ideas on what is wrong? (removed some information as private)

Any help appreciated.
Reply With Quote
  #2  
Old 01-23-2015, 10:51 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It looks to me like a mod has added a column to the user table called 'status', and that broke a query in subscriptions.php. Assuming that you don't want to remove that mod or that column from the user table, you could either figure out how to rename it, or else change acp/subscriptions.php to add the table name to that field so that it isn't ambiguous.
Reply With Quote
  #3  
Old 01-23-2015, 11:04 PM
greigeh greigeh is offline
 
Join Date: Jan 2015
Posts: 113
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kh99 View Post
It looks to me like a mod has added a column to the user table called 'status', and that broke a query in subscriptions.php. Assuming that you don't want to remove that mod or that column from the user table, you could either figure out how to rename it, or else change acp/subscriptions.php to add the table name to that field so that it isn't ambiguous.
Hey, I renamed the column 'status' and it broke the Subscription Manager all together. I've tried disabling all mods etc but it doesn't seem to resolve anything
Reply With Quote
  #4  
Old 01-23-2015, 11:11 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Why did you rename a column? Rename it back.
Reply With Quote
  #5  
Old 01-23-2015, 11:15 PM
greigeh greigeh is offline
 
Join Date: Jan 2015
Posts: 113
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Zachery View Post
Why did you rename a column? Rename it back.
I have changed it back to 'status', I genuinely have no idea how to fix this ha but hey i'm trying.
Reply With Quote
  #6  
Old 01-23-2015, 11:15 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You renamed the column "status" in the user table, not the subscriptionlog table, right? Try disabling your modifications and then View Users and see if you still get the same database error. There is definitely not supposed to be a user.status field, so something added it and it is what is causing the problem.
Reply With Quote
  #7  
Old 01-23-2015, 11:22 PM
greigeh greigeh is offline
 
Join Date: Jan 2015
Posts: 113
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
You renamed the column "status" in the user table, not the subscriptionlog table, right? Try disabling your modifications and then View Users and see if you still get the same database error. There is definitely not supposed to be a user.status field, so something added it and it is what is causing the problem.
How would I go about this first part? I've tried disabling everything and that seems to have failed so i'm a tiny bit baffled...
Reply With Quote
  #8  
Old 01-23-2015, 11:23 PM
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Location: USA
Posts: 10,929
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok lets do this, disable plugins via the includes/config.php file.

To do that open your includes/config.php file and below <?php add the following.

PHP Code:
define('DISABLE_HOOKS'true); 
So it looks like this:
PHP Code:
<?php
define
('DISABLE_HOOKS'true);
/*=================================================  =====================*\
|| ##################################################  ################## ||
|| # vBulletin 3.8.x
Use a editor like notepad++ to edit any files, don't use Notepad or Wordpad.

If that fixes the issue enable plugins again by adding // before the line you added, then navigate to ACP --> Plugins & Products --> Manage Products and disable one mod at a time until you find the one causing the issue.

Once you find the culprit, post in that mods thread what the issue is, and maybe someone in that thread can help.
Reply With Quote
  #9  
Old 01-23-2015, 11:26 PM
greigeh greigeh is offline
 
Join Date: Jan 2015
Posts: 113
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ozzy47 View Post
Ok lets do this, disable plugins via the includes/config.php file.

To do that open your includes/config.php file and below <?php add the following.

PHP Code:
define('DISABLE_HOOKS'true); 
So it looks like this:
PHP Code:
<?php
define
('DISABLE_HOOKS'true);
/*=================================================  =====================*\
|| ##################################################  ################## ||
|| # vBulletin 3.8.x
Use a editor like notepad++ to edit any files, don't use Notepad or Wordpad.

If that fixes the issue enable plugins again by adding // before the line you added, then navigate to ACP --> Plugins & Products --> Manage Products and disable one mod at a time until you find the one causing the issue.

Once you find the culprit, post in that mods thread what the issue is, and maybe someone in that thread can help.
I done the whole 'define('DISABLE_HOOKS', true); ' but even disabling all mods/scripts/whatever seem to not cure the problem. :down:
Reply With Quote
  #10  
Old 01-23-2015, 11:29 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by greigeh View Post
I have changed it back to 'status', I genuinely have no idea how to fix this ha but hey i'm trying.
Yeah, sorry I wasn't clear enough. While one option for fixing the issue would be to figure out how to rename the added column so that it doesn't conflict, that would involve understanding why it was added and making corresponding changes to the code that uses it. I probably shouldn't have mentioned it, but instead just told you to figure out which mod it is and either disable it or ask the developer for help.
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 12:12 PM.


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.05378 seconds
  • Memory Usage 2,269KB
  • 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_html
  • (4)bbcode_php
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete