Auto Action Query stripping HTML from sql INSERT query

5 years 11 months ago #304197 by Gnc
Hi guys, Joomla 3.8.5, Com builder 2.1.3 (i know not latest, havn't time for the update as yet)

I have an autoactions query that triggers ONAFTERREGISTRATION. It checks for potentially banned members that are re-applying again, inserts the results into a field (Text, read only) so it can be checked when mods do approvals and match to any similar profiles. The idea is i am inserting into the text field a full HTML string that can link straight to the potential banned profile with details.

The query is below, it works fine, returns whats needed, and CB "builds" it correctly with all the HTML concats in it BUT when the data inserts into then DB, it has stripped all the HTML. If i run the "built" query directly from MYSQL, it works fine, inserts HTML and looks good at the front end, exactly what wanted.

I cannot figure where the PHP( Im guessing) is stripping the HTML of the INSERT into DB! The field is set to accept all inputs, no banned words etc. it is also a DB record as we would like the info to stay from day of registration >

My question..how can i stop the HTML being stripped and have this full result inserted??

QUERY:
UPDATE `#__comprofiler`
SET `cb_cd_query_field` =
(Select * FROM(SELECT Group_concat('
','<br>NickName: &nbsp;<a
href="SITENAME.co.za/index.php/component/comprofiler/userprofile/',`username`,'"
target="_blank">',`username`,'</a>', '<br>Name:',IFNULL(`firstName`, 'N/A'), ' ', IFNULL(`LastName`,'N/A'),
'<br>Phone:', IFNULL(`cb_phone`,'0'), '<br>PartnerName:', IFNULL(`cb_partnersrealname`,'N/A'), ' ',
IFNULL(`cb_partner_surname`,'N/A'), '<br>Address:', IFNULL(`cb_address`, 'N/A') separator '<p>')
From `#__comprofiler`
Inner Join `#__users` ON `#__users`.`id` = `#__comprofiler`.`id`
Where `#__users`.`username` != '[username]'
AND
(`lastname` = '[lastname]'
AND `banned` = 1)
OR
('[lastname]' = `cb_partner_surname`
AND `#__users`.`username` != '[username]'
AND `banned` = 1)
OR
( `evyhc_users`.`username` != '[username]'
AND `banned` = 1
AND (`cb_phone` ='[cb_phone]'
OR `cb_phone` = '[cb_partnerscontact]')))tblTemp)
WHERE `id` = '[user_id]'

Please Log in to join the conversation.

5 years 11 months ago #304199 by krileon
Don't understand why you need to insert into the database at all. You should be able to just pull that information dynamically using CB Query Field or using a userlist with Advanced filter to find similar users. The Query action doesn't strip anything. Ensure you're using a textarea editor fieldtype as a regular textarea field doesn't display HTML.


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 to join the conversation.

5 years 11 months ago #304238 by Gnc
Hi, the information is kept for future use. If people change there phone number etc it might change the dynamic info in the future, hence the desire to keep it "as is" from registration day. Will test out the textarea.. maybe thats what was looking for.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.161 seconds

Facebook Twitter LinkedIn