I have a table that has a field call Team. In this field, there are two values: 'DS' and 'MF'.
When I set the Parameters-->Query in the field definition to:
select `team` from `j3_aqi_user_profile_data_v` where `id`='[user_id]'
Either DS or MF should be returned, depending on the value for the user.
If the user has MF set as their team, I see MF when I look at it the user's profile.
If the user has DS set as their team, I see / when I look at the user's profile
What in Joomla is returning a / when the value is DS?
Database Queries in Joomla Debug shows:
Code:
Query Time: 0.41 ms After last query: 0.64 ms Query memory: 0.010 MB Memory before query: 25.960 MB Rows returned: 1
select `team`
from `j3_aqi_user_profile_data_v`
where `id`='582'
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 61 100.00 Using where
Profile
No SHOW PROFILE (maybe because there are more than 100 queries)
Call Stack
# Caller File and line number
21 JDatabaseDriverMysqli->execute() JROOT/libraries/joomla/database/driver.php:1720
20 JDatabaseDriver->loadResult() JROOT/libraries/CBLib/CBLib/Database/Driver/CmsDatabaseDriver.php:345
19 CBLib\Database\Driver\CmsDatabaseDriver->loadResult() JROOT/components/com_comprofiler/plugin/user/plug_cbqueryfield/cbqueryfield.php:514
18 CBfield_query->getField() JROOT/libraries/CBLib/CB/Legacy/cbFieldHandler.php:100
17 cbFieldHandler->getFieldRow() 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:613
7 userProfile() JROOT/components/com_comprofiler/comprofiler.php:107
6 require_once JROOT/components/com_comprofiler/comprofiler.php JROOT/libraries/cms/component/helper.php:394
5 JComponentHelper::executeComponent() JROOT/libraries/cms/component/helper.php:369
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:265
1 JApplicationCms->execute() JROOT/index.php:49
[Add xdebug.file_link_format directive to your php.ini file to have links for files.]
Last edit: 8 years 7 months ago by krileon. Reason: Added [SOLVED] tag to subject
The value returned by the query is passed through language translations, which falls back to defines if it's missing. Joomla has a define for DS to convert to slash. Set Output to Template and see if that helps as that output doesn't pass through translations.
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.
The following user(s) said Thank You: pgay@patrickgay.com