Skip to Content Skip to Menu

🕒 Save Time and Effort with CB Editor Assistant: Effortlessly create and refine content in Joomla 3, 4, & 5.
🎁 Limited Offer: Enjoy a 5-day FREE trial and save up to 30% afterward!

Query Fields returns / when output of select is DS

7 years 11 months ago - 7 years 11 months ago #291290 by pgay@patrickgay.com
Query Fields returns / when output of select is DS was created by pgay@patrickgay.com
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
Last edit: 7 years 11 months ago by pgay@patrickgay.com.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48709
  • Thanks: 8319
  • Karma: 1447
7 years 11 months ago #291319 by krileon
The query return value is passed through language translations. My guess is you've a language key translating DS to /.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

7 years 11 months ago #291321 by pgay@patrickgay.com
Replied by pgay@patrickgay.com on topic Query Fields returns / when output of select is DS
I did the base install and haven't changed anything. Where can I find the language keys to check it?

Please Log in or Create an account to join the conversation.

7 years 11 months ago #291330 by pgay@patrickgay.com
Replied by pgay@patrickgay.com on topic Query Fields returns / when output of select is DS
OK. I don't think it's a language translation problem. I checked the ../components/com_profile/plugin/language/default_languages/language.php file and there are no translations for DS --> /.

Any other places to look at why this is happening?

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48709
  • Thanks: 8319
  • Karma: 1447
7 years 11 months ago #291336 by krileon
It's a Joomla define. We pass language strings through CBs language strings and through defines as a last resort due to legacy usages. Joomla sets the define. There's no working around this unless you output something other than DS as DS is always going to translate to /.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum