Project

General

Profile

Actions

Bug #5150

closed

CBSubs History log search fails due to join not adding to query

Added by krileon about 9 years ago. Updated about 9 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
Target version:
-
Start date:
27 February 2015
Due date:
% Done:

100%

Estimated time:

Description

When searching the history log it's trying to filter on user_name, but it has no join data associated with it.

Unknown column 'I.user_name' in 'where clause' SQL=SELECT COUNT(*) FROM `jos_cbsubs_history` AS a WHERE ( ( I.`user_name` LIKE '%admin%' ) OR ( I.`user_full_name` LIKE '%admin%' ) OR ( a.`old_value` LIKE '%admin%' ) OR ( a.`new_value` LIKE '%admin%' ) OR ( a.`ip_addresses` LIKE '%admin%' ) )

https://www.joomlapolis.com/forum/277-cbsubs-gpl-support/228546-history-log-error

The table as is working fine, but the join is never added because the filter has no data. It should check for a join by filter name if no data is supplied encase a join does need to be added.

Actions #1

Updated by krileon about 9 years ago

Seams processJoinsNeededForCount usage in quicksearch parsing isn't picking this case up.

Actions #2

Updated by krileon about 9 years ago

Ok, this seams to be an ongoing issue of sub queries in the fieldsArray and being used as the tableAs check.

'user_name' => string 'IF( ( a.`user_id` = 0 ), 'System', b.`username` ) AS `user_name`' (length=64)

That's causing it to use "I" as the tableAs.

Actions #3

Updated by krileon about 9 years ago

This seams to be another case of the XML usage not making sense. It shouldn't be user_name as that's targeting an IF select usage; it has no join. It should just be "username". Next "user_full_name" should just be "name".

Actions #4

Updated by krileon about 9 years ago

  • Status changed from Assigned to Rejected
  • Target version deleted (CB 2.0.8)
  • % Done changed from 0 to 100

This should be fixed in CBSubs.

Actions

Also available in: Atom PDF