vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   paid subscriptions ACP error (https://vborg.vbsupport.ru/showthread.php?t=316877)

greigeh 01-23-2015 10:09 PM

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.

kh99 01-23-2015 10:51 PM

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.

greigeh 01-23-2015 11:04 PM

Quote:

Originally Posted by kh99 (Post 2534198)
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 :(

Zachery 01-23-2015 11:11 PM

Why did you rename a column? Rename it back.

greigeh 01-23-2015 11:15 PM

Quote:

Originally Posted by Zachery (Post 2534202)
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.

Lynne 01-23-2015 11:15 PM

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.

greigeh 01-23-2015 11:22 PM

Quote:

Originally Posted by Lynne (Post 2534204)
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...

ozzy47 01-23-2015 11:23 PM

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. :)

greigeh 01-23-2015 11:26 PM

Quote:

Originally Posted by ozzy47 (Post 2534210)
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:

kh99 01-23-2015 11:29 PM

Quote:

Originally Posted by greigeh (Post 2534203)
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.


All times are GMT. The time now is 09:04 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01102 seconds
  • Memory Usage 1,749KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_html_printable
  • (4)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete