Jump to content

Featured Replies

Posted

Hi, I'm seeing thousands of uncaught_exception errors in my system logs.

Any idea what's causing this?

The log entry was triggered by a guest (Guests)

Just now

The URL of page the error occurred on was https://yamahaclub.com/profile/2275-blackthou/content/?change_section=1&type=garage_comment

SELECT COUNT(*) as cnt FROM ibf_garage_vehicle_comments AS garage_vehicle_comments STRAIGHT_JOIN ibf_garage_vehicles AS garage_vehicles ON garage_vehicle_comments.vehicle_id=garage_vehicles.id AND garage_vehicles.approved=1 AND garage_vehicles.approved!=-2 AND garage_vehicles.approved !=-3 STRAIGHT_JOIN ibf_core_permission_index AS core_permission_index ON core_permission_index.app='garage' AND core_permission_index.perm_type='category' AND core_permission_index.perm_type_id=garage_vehicles.cid AND (( FIND_IN_SET(2,perm_2) ) OR perm_2='*' ) WHERE garage_vehicle_comments.member_id=2275 AND approved=1 AND garage_vehicle_comments.approved!=-2 AND garage_vehicle_comments.approved !=-3

IPS\Db\Exception: Column 'approved' in where clause is ambiguous (1052)

#0 /home/yamahaclub/htdocs/yamahaclub.com/system/Db/Select.php(402): IPS\Db->preparedQuery()

#1 /home/yamahaclub/htdocs/yamahaclub.com/system/Db/Select.php(460): IPS\Db\Select->runQuery()

#2 /home/yamahaclub/htdocs/yamahaclub.com/system/Db/Select.php(384): IPS\Db\Select->rewind()

#3 /home/yamahaclub/htdocs/yamahaclub.com/system/Content/Comment.php(1563): IPS\Db\Select->first()

#4 /home/yamahaclub/htdocs/yamahaclub.com/system/Helpers/Table/Content.php(418): IPS\Content\Comment::getItemsWithPermission()

#5 /home/yamahaclub/htdocs/yamahaclub.com/system/Helpers/Table/Table.php(531): IPS\Helpers\Table\Content->getRows()

#6 /home/yamahaclub/htdocs/yamahaclub.com/applications/core/modules/front/members/profile.php(617): IPS\Helpers\Table\Table->__toString()

#7 /home/yamahaclub/htdocs/yamahaclub.com/system/Dispatcher/Controller.php(128): IPS\core\modules\front\members\profile->content()

#8 /home/yamahaclub/htdocs/yamahaclub.com/applications/core/modules/front/members/profile.php(130): IPS\Dispatcher\Controller->execute()

#9 /home/yamahaclub/htdocs/yamahaclub.com/system/Dispatcher/Dispatcher.php(169): IPS\core\modules\front\members\profile->execute()

#10 /home/yamahaclub/htdocs/yamahaclub.com/index.php(16): IPS\Dispatcher->run()

#11 {main}

BACKTRACE

#0 /home/yamahaclub/htdocs/yamahaclub.com/init.php(827): IPS\Log::log()

#1 /home/yamahaclub/htdocs/yamahaclub.com/system/Helpers/Table/Table.php(611): IPS\IPS::exceptionHandler()

#2 /home/yamahaclub/htdocs/yamahaclub.com/applications/core/modules/front/members/profile.php(617): IPS\Helpers\Table\Table->__toString()

#3 /home/yamahaclub/htdocs/yamahaclub.com/system/Dispatcher/Controller.php(128): IPS\core\modules\front\members\profile->content()

#4 /home/yamahaclub/htdocs/yamahaclub.com/applications/core/modules/front/members/profile.php(130): IPS\Dispatcher\Controller->execute()

#5 /home/yamahaclub/htdocs/yamahaclub.com/system/Dispatcher/Dispatcher.php(169): IPS\core\modules\front\members\profile->execute()

#6 /home/yamahaclub/htdocs/yamahaclub.com/index.php(16): IPS\Dispatcher->run()

#7 {main}

This is an issue in the core software. On lines 1401-1428 of /System/Content/Comment.php, they don't specify the database table and due to there are joins on this, it is causing this ambiguous column error in the query.

The below:

if ( IPS::classUsesTrait( get_called_class(), 'IPS\Content\Hideable' ) and $includeHiddenComments === Filter::FILTER_ONLY_HIDDEN )
		{
			/* If we can't view hidden stuff, just return an empty array now */
			if( !static::modPermission( 'view_hidden', $member ) )
			{
				return array();
			}

			if ( isset( static::$databaseColumnMap['approved'] ) )
			{
				$where[] = array( static::$databasePrefix . static::$databaseColumnMap['approved'] . '=?', 0 );
			}
			elseif ( isset( static::$databaseColumnMap['hidden'] ) )
			{
				$where[] = array( static::$databasePrefix . static::$databaseColumnMap['hidden'] . '=?', 1 );
			}
		}
		elseif ( IPS::classUsesTrait( get_called_class(), 'IPS\Content\Hideable' ) and ( $includeHiddenComments === Filter::FILTER_OWN_HIDDEN OR $includeHiddenComments === Filter::FILTER_PUBLIC_ONLY ) )
		{
			if ( isset( static::$databaseColumnMap['approved'] ) )
			{
				$where[] = array( static::$databasePrefix . static::$databaseColumnMap['approved'] . '=?', 1 );
			}
			elseif ( isset( static::$databaseColumnMap['hidden'] ) )
			{
				$where[] = array( static::$databasePrefix . static::$databaseColumnMap['hidden'] . '=?', 0 );
			}
		}

Should be changed to:

if ( IPS::classUsesTrait( get_called_class(), 'IPS\Content\Hideable' ) and $includeHiddenComments === Filter::FILTER_ONLY_HIDDEN )
		{
			/* If we can't view hidden stuff, just return an empty array now */
			if( !static::modPermission( 'view_hidden', $member ) )
			{
				return array();
			}

			if ( isset( static::$databaseColumnMap['approved'] ) )
			{
				$where[] = array( static::$databaseTable . '.' . static::$databasePrefix . static::$databaseColumnMap['approved'] . '=?', 0 );
			}
			elseif ( isset( static::$databaseColumnMap['hidden'] ) )
			{
				$where[] = array( static::$databaseTable . '.' . static::$databasePrefix . static::$databaseColumnMap['hidden'] . '=?', 1 );
			}
		}
		elseif ( IPS::classUsesTrait( get_called_class(), 'IPS\Content\Hideable' ) and ( $includeHiddenComments === Filter::FILTER_OWN_HIDDEN OR $includeHiddenComments === Filter::FILTER_PUBLIC_ONLY ) )
		{
			if ( isset( static::$databaseColumnMap['approved'] ) )
			{
				$where[] = array( static::$databaseTable . '.' . static::$databasePrefix . static::$databaseColumnMap['approved'] . '=?', 1 );
			}
			elseif ( isset( static::$databaseColumnMap['hidden'] ) )
			{
				$where[] = array( static::$databaseTable . '.' . static::$databasePrefix . static::$databaseColumnMap['hidden'] . '=?', 0 );
			}
		}

I'll report this to Invision.

  • Author

I'm afraid I'm still seeing some more issues.

The URL of page the error occurred on was https://yamahaclub.com/garage/vehicle/1266-yamaha-ybr-125/?show=images&sortdirection=desc

OutOfRangeException: (0)

#0 /home/yamahaclub/htdocs/yamahaclub.com/applications/garage/modules/front/garage/vehicle.php(96): IPS\Patterns\ActiveRecord::load()

#1 /home/yamahaclub/htdocs/yamahaclub.com/system/Dispatcher/Controller.php(139): IPS\garage\modules\front\garage\vehicle->manage()

#2 /home/yamahaclub/htdocs/yamahaclub.com/system/Content/Controller.php(124): IPS\Dispatcher\Controller->execute()

#3 /home/yamahaclub/htdocs/yamahaclub.com/applications/garage/modules/front/garage/vehicle.php(72): IPS\Content\Controller->execute()

#4 /home/yamahaclub/htdocs/yamahaclub.com/system/Dispatcher/Dispatcher.php(169): IPS\garage\modules\front\garage\vehicle->execute()

#5 /home/yamahaclub/htdocs/yamahaclub.com/index.php(16): IPS\Dispatcher->run()

#6 {main}

#0 /home/yamahaclub/htdocs/yamahaclub.com/init.php(827): IPS\Log::log()

#1 [internal function]: IPS\IPS::exceptionHandler()

#2 {main}

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.