I have a view in my database that contains either DS or MF as the value for each user.
Using Query Fields-->Parameters-->Query, I have the following SQL Query: select `team` from `j3_aqi_user_profile_data_v` where `id`='[user_id]'
The result that is returned is DS
When viewing my profile, I see:
My Team /
The / should show DS.
If I look at someone who has MF as their Team, it shows MF.
Why would CB be showing a / instead of DS?
I did some more testing and if I use a drop down box (no query field, just a plain drop down box) and put DS and MF as the two options to select, when I select DS, save it, and then view the profile, I also see /. So it looks not to be a problem with the QueryField, but a problem with the way CB is displaying DS for some reason.
Here is the debug from Joomla:
CB version 2.1.2+build.2017.02.08.01.14.28.ec3d63d1f
PHP Built On Linux <hostname> 2.6.32-431.23.3.el6.x86_64 #1 SMP Wed Jul 16 06:12:23 EDT 2014 x86_64
Database Version 5.6.21
Database Collation utf8mb4_unicode_ci
Database Connection Collation utf8mb4_unicode_ci
PHP Version 5.6.0
Web Server Apache/2.4.10 (Unix) PHP/5.6.0
WebServer to PHP Interface apache2handler
Joomla! Version Joomla! 3.6.5 Stable [ Noether ] 1-December-2016 22:46 GMT
Joomla! Platform Version Joomla Platform 13.1.0 Stable [ Curiosity ] 24-Apr-2013 00:00 GMT
User Agent Mozilla/5.0 (Windows NT 10.0; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0
select `team`
from `j3_aqi_user_profile_data_v`
where `id`='551'
Explain
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE j3_aqi_user_profile_data ALL NULL NO INDEX KEY COULD BE USED NULL NULL 56 100.00 Using where
Profile
Status Duration
starting 0.02 ms
checking permissions 0.00 ms
Opening tables 0.07 ms
init 0.01 ms
checking permissions 0.01 ms
System lock 0.01 ms
optimizing 0.01 ms
statistics 0.01 ms
preparing 0.01 ms
executing 0.00 ms
Sending data 0.09 ms
end 0.00 ms
query end 0.00 ms
closing tables 0.01 ms
freeing items 0.01 ms
cleaning up 0.01 ms
Call Stack
# Caller File and line number
22 JDatabaseDriverMysqli->execute() JROOT/libraries/joomla/database/driver.php:1728
21 JDatabaseDriver->loadResult() JROOT/libraries/CBLib/CBLib/Database/Driver/CmsDatabaseDriver.php:345
20 CBLib\Database\Driver\CmsDatabaseDriver->loadResult() JROOT/components/com_comprofiler/plugin/user/plug_cbqueryfield/cbqueryfield.php:514
19 CBfield_query->getField() JROOT/libraries/CBLib/CB/Legacy/cbFieldHandler.php:100
18 cbFieldHandler->getFieldRow() Same as call in the line below.
17 call_user_func_array() JROOT/libraries/CBLib/CB/Legacy/cbPluginHandler.php:881
16 cbPluginHandler->call() JROOT/libraries/CBLib/CB/Legacy/cbPluginHandler.php:1077
15 cbPluginHandler->callField() JROOT/libraries/CBLib/CB/Legacy/cbTabs.php:1375
14 cbTabs->_getSingleFieldContent() JROOT/libraries/CBLib/CB/Legacy/cbTabs.php:1290
13 cbTabs->_getFieldsContents() JROOT/libraries/CBLib/CB/Legacy/cbTabs.php:1025
12 cbTabs->_getTabContents() JROOT/libraries/CBLib/CB/Legacy/cbTabs.php:314
11 cbTabs->generateViewTabsContent() JROOT/libraries/CBLib/CB/Legacy/cbTabs.php:369
10 cbTabs->getViewTabs() JROOT/libraries/CBLib/CB/Legacy/CBuser.php:410
9 CBuser->getProfileView() JROOT/components/com_comprofiler/comprofiler.html.php:280
8 HTML_comprofiler::userProfile() JROOT/components/com_comprofiler/comprofiler.php:612
7 userProfile() JROOT/components/com_comprofiler/comprofiler.php:107
6 require_once JROOT/components/com_comprofiler/comprofiler.php JROOT/libraries/cms/component/helper.php:405
5 JComponentHelper::executeComponent() JROOT/libraries/cms/component/helper.php:380
4 JComponentHelper::renderComponent() JROOT/libraries/cms/application/site.php:191
3 JApplicationSite->dispatch() JROOT/libraries/cms/application/site.php:230
2 JApplicationSite->doExecute() JROOT/libraries/cms/application/cms.php:261
1 JApplicationCms->execute() JROOT/index.php:49