Skip to Content Skip to Menu

[SOLVED] Field validation error

  • activha
  • activha
  • ONLINE
  • Posts: 2327
  • Thanks: 117
  • Karma: 13
5 years 2 weeks ago - 5 years 4 days ago #314589 by activha
[SOLVED] Field validation error was created by activha
Hi

We have a required text area field with a validation rule asking for at least 10 characters.
We have no regex rules for this field.
It seems that when people try to edit their profile with 10 spaces, this is ok for the validation rule but we get a fatal error like:
File: /var/www/html/components/com_comprofiler/plugin/user/plug_cbsubsfieldstabsprotect/cbsubs.fieldstabsprotect.php
Line: 516
Message: Call to a member function get() on null

There is no special protection from CBSubs about this field though.

Can you reproduce this ?
Any idea to avoid it ?
Thanks
Jean
Last edit: 5 years 4 days ago by krileon. Reason: Added [SOLVED] tag to subject

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48435
  • Thanks: 8275
  • Karma: 1443
5 years 2 weeks ago #314591 by krileon
Replied by krileon on topic Field validation error
That line is accessing tab parameters. Are you using CBSubs Fields Tabs Protection on any tabs? Seams like it's having issues parsing a tabs parameters. You may want to try re-saving your tabs in CB > Tab Management to see if that clears it up.


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.

  • activha
  • activha
  • ONLINE
  • Posts: 2327
  • Thanks: 117
  • Karma: 13
5 years 2 weeks ago #314592 by activha
Replied by activha on topic Field validation error
Yes tried to re-save the tabs but that did not solve it.

It has to do with the validation process. Without validation every thing is ok, with a few characters validation, empty spaces bring an error

A full stack trace of the error is attached here under
Code:
A PHP Exception occurred on your site. Here you can find the stack trace: Exception Type: Error File: /var/www/html/components/com_comprofiler/plugin/user/plug_cbsubsfieldstabsprotect/cbsubs.fieldstabsprotect.php Line: 516 Message: Call to a member function get() on null #0 /var/www/html/components/com_comprofiler/plugin/user/plug_cbsubsfieldstabsprotect/cbsubs.fieldstabsprotect.php(544): getcbfieldsprotectbysubTab->chngTabDisplay('call(551, 'onAfterEditATab', 'getcbfieldsprot...', Array) #3 /var/www/html/libraries/CBLib/CB/Legacy/cbTabs.php(769): cbPluginHandler->trigger('onAfterEditATab', Array) #4 /var/www/html/components/com_comprofiler/comprofiler.html.php(170): cbTabs->getEditTabs(Object(CB\Database\Table\UserTable), NULL, 'htmledit', 'divs', 'edit', true) #5 /var/www/html/components/com_comprofiler/comprofiler.php(495): HTML_comprofiler::userEdit(Object(CB\Database\Table\UserTable), 'com_comprofiler', 'Mettre \xC3\xA0 jour', 'Description du ...') #6 /var/www/html/components/com_comprofiler/comprofiler.php(102): userSave('com_comprofiler', 10751) #7 /var/www/html/libraries/src/Component/ComponentHelper.php(402): require_once('/var/www/html/c...') #8 /var/www/html/libraries/src/Component/ComponentHelper.php(377): Joomla\CMS\Component\ComponentHelper::executeComponent('/var/www/html/c...') #9 /var/www/html/libraries/src/Application/SiteApplication.php(194): Joomla\CMS\Component\ComponentHelper::renderComponent('com_comprofiler') #10 /var/www/html/libraries/src/Application/SiteApplication.php(233): Joomla\CMS\Application\SiteApplication->dispatch() #11 /var/www/html/libraries/src/Application/CMSApplication.php(196): Joomla\CMS\Application\SiteApplication->doExecute() #12 /var/www/html/index.php(49): Joomla\CMS\Application\CMSApplication->execute() #13 {main} Request information GET variables Array ( [Itemid] => 175 [option] => com_comprofiler [view] => saveuseredit [lang] => fr-FR [task] => saveuseredit ) POST variables Array ( [id] => 10751 [cbsecuritym3] => cbm_32c8efa1_4e470e32_314449323028e07f72dad65aeae53608 [cb_civilite] => Mme [firstname] => Rebecca [lastname] => PEAN [email] => r.pean@maisonsvertes.fr [email__verify] => r.pean@xxxxxx.fr [username] => maisonsvertes [password] => [alias] => [cb_activite] => Immobilier [cb_video__choice] => [cb_audio__choice] => [cb_company] => LES MAISONS VERTES DE L'HERAULT [cb_interests] => [cb_website] => [cb_websiteText] => [cb_address] => 743 Avenue de la Pompignane [cb_zipcode] => 34000 [cb_city] => MONTPELLIER [cb_state] => [cb_phone] => 0467220808 [cb_mobile] => 0467220808 [params] => Array ( [timezone] => [language] => ) [acceptedterms] => 1 [cb_walltemplate] => [cb_maily_module] => 1 [cb_jawalldisplay] => [cb_jawallbasegrid] => [cb_logo_comp__choice] => [cb_header] => [cb_shop] => [cb_inclusion3] => [cb_inclusion] => [cb_inclusion2] => [cb_atfacebook] => [cb_attwitter] => [cb_atlinkedinname] => [cb_atlinkedincompany] => [cb_atgoogle] => [cb_atyoutube] => [cb_atflickr] => [cb_atpinterest] => [cb_atinstagram] => [cb_atrss] => [cb_atfoursquare] => [cb_act_teaser] => [avatar__choice] => [canvas__choice] => [acymailingdata] => Array ( [user] => Array ( [html] => 1 ) [listsub] => Array ( [1] => Array ( [status] => 1 ) [78] => Array ( [status] => -1 ) [2] => Array ( [status] => -1 ) [71] => Array ( [status] => -1 ) [70] => Array ( [status] => -1 ) [68] => Array ( [status] => -1 ) ) ) [cb_lignes] => N2 [cb_pays] => France [0101f258d24ad51668b68cb1183632b7] => Array ( [0] => 0 ) [4a702f44aba59ec855c90258d51c231b] => Array ( [0] => 0 ) [31c027da5517ac346dc2a73676187924] => Array ( [0] => 0 ) [4b4a693bc5ad8717d1a1b8891dc03a91] => Array ( [0] => 0 ) [c0951f9c4376b286bf31e87dec83e5b5] => Array ( [0] => 0 ) [8d51e7618d946374816263b2b272eab2] => Array ( [0] => 1 ) [f77dedb38d7fee90705febcbe887ffcf] => Array ( [0] => 0 ) [7f4aaa8341c7fc9264b0bc74fe1e2595] => Array ( [0] => 0 ) [c16e18f5cc95b9eecb695b72718b461e] => Array ( [0] => 99 ) [305373db356ce9aa99b35f33524524b2] => Array ( [0] => 0 ) ) COOKIE variables Array ( [_ga] => GA1.2.1279081504.1568797367 [LaVisitorId] => grtt96rx8bqhu1gce0b0dte8q5g1r [cookie_40d1b2d83998fabacb726e5bc3d22129] => accepted [__utma] => 228146701.1279081504.1568797367.1568797615.1568797615.1 [__utmz] => 228146701.1568797615.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none) [__atuvc] => 2|38,0|39,0|40,1|41 [__atuvs] => 5d9ae9cc8f00ee3e000 [_gid] => GA1.2.1601459996.1570433485 [LaSID] => t7vez7kcqaar227av87fabr434tti [_fbp] => fb.1.1570433485471.1519008582 [PAPVisitorId] => 33134459046e417c958eda4989AZeoow [userID] => 10751 [isLoggedLA] => 1 [1d014b3efc2b8d7c962ad8fc2ecdc284] => 6m6kklpj1noplet1guf8nj6pn6 [joomla_user_state] => logged_in [joomla_remember_me_10ba8c636dbe8ebc82dbd1de77a073bf] => GEs3X4Bjhpjs4ZAM.IoIsGymJUU7K4UCMeXzJ [cbtabsCB] => cbtabnav11 [_gat_gtag_UA_15390375_2] => 1 ) REQUEST variables Array ( [id] => 10751 [cbsecuritym3] => cbm_32c8efa1_4e470e32_314449323028e07f72dad65aeae53608 [cb_civilite] => Mme [firstname] => Rebecca [lastname] => PEAN [email] => r.pean@maisonsvertes.fr [email__verify] => r.pean@maisonsvertes.fr [username] => maisonsvertes [password] => [alias] => [cb_activite] => Immobilier [cb_video__choice] => [cb_audio__choice] => [cb_company] => LES MAISONS VERTES DE L'HERAULT [cb_interests] => [cb_website] => [cb_websiteText] => [cb_address] => 743 Avenue de la Pompignane [cb_zipcode] => 34000 [cb_city] => MONTPELLIER [cb_state] => [cb_phone] => 0467220808 [cb_mobile] => 0467220808 [params] => Array ( [timezone] => [language] => ) [acceptedterms] => 1 [cb_walltemplate] => [cb_maily_module] => 1 [cb_jawalldisplay] => [cb_jawallbasegrid] => [cb_logo_comp__choice] => [cb_header] => [cb_shop] => [cb_inclusion3] => [cb_inclusion] => [cb_inclusion2] => [cb_atfacebook] => [cb_attwitter] => [cb_atlinkedinname] => [cb_atlinkedincompany] => [cb_atgoogle] => [cb_atyoutube] => [cb_atflickr] => [cb_atpinterest] => [cb_atinstagram] => [cb_atrss] => [cb_atfoursquare] => [cb_act_teaser] => [avatar__choice] => [canvas__choice] => [acymailingdata] => Array ( [user] => Array ( [html] => 1 ) [listsub] => Array ( [1] => Array ( [status] => 1 ) [78] => Array ( [status] => -1 ) [2] => Array ( [status] => -1 ) [71] => Array ( [status] => -1 ) [70] => Array ( [status] => -1 ) [68] => Array ( [status] => -1 ) ) ) [cb_lignes] => N2 [cb_pays] => France [0101f258d24ad51668b68cb1183632b7] => Array ( [0] => 0 ) [4a702f44aba59ec855c90258d51c231b] => Array ( [0] => 0 ) [31c027da5517ac346dc2a73676187924] => Array ( [0] => 0 ) [4b4a693bc5ad8717d1a1b8891dc03a91] => Array ( [0] => 0 ) [c0951f9c4376b286bf31e87dec83e5b5] => Array ( [0] => 0 ) [8d51e7618d946374816263b2b272eab2] => Array ( [0] => 1 ) [f77dedb38d7fee90705febcbe887ffcf] => Array ( [0] => 0 ) [7f4aaa8341c7fc9264b0bc74fe1e2595] => Array ( [0] => 0 ) [c16e18f5cc95b9eecb695b72718b461e] => Array ( [0] => 99 ) [305373db356ce9aa99b35f33524524b2] => Array ( [0] => 0 ) [language] => fr-FR [Itemid] => 175 [option] => com_comprofiler [view] => saveuseredit [lang] => fr-FR [ark_inine_enabled] => [task] => saveuseredit ) SERVER variables Array ( [USER] => apache [HOME] => /usr/share/httpd [SCRIPT_NAME] => /index.php [REQUEST_URI] => /profil/saveuseredit [QUERY_STRING] => [REQUEST_METHOD] => POST [SERVER_PROTOCOL] => HTTP/1.0 [GATEWAY_INTERFACE] => CGI/1.1 [REDIRECT_URL] => /profil/saveuseredit [REMOTE_PORT] => 56122 [SCRIPT_FILENAME] => /var/www/html/index.php [SERVER_ADMIN] => admin@activ-ha.com [CONTEXT_DOCUMENT_ROOT] => /var/www/html [CONTEXT_PREFIX] => [REQUEST_SCHEME] => https [DOCUMENT_ROOT] => /var/www/html [REMOTE_ADDR] => 81.250.231.105 [SERVER_PORT] => 443 [SERVER_ADDR] => 127.0.0.1 [SERVER_NAME] => activ-ha.com [SERVER_SOFTWARE] => Apache [SERVER_SIGNATURE] => [PATH] => /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin [HTTP_COOKIE] => _ga=GA1.2.1279081504.1568797367; LaVisitorId=grtt96rx8bqhu1gce0b0dte8q5g1r; cookie_40d1b2d83998fabacb726e5bc3d22129=accepted; __utma=228146701.1279081504.1568797367.1568797615.1568797615.1; __utmz=228146701.1568797615.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __atuvc=2%7C38%2C0%7C39%2C0%7C40%2C1%7C41; __atuvs=5d9ae9cc8f00ee3e000; _gid=GA1.2.1601459996.1570433485; LaSID=t7vez7kcqaar227av87fabr434tti; _fbp=fb.1.1570433485471.1519008582; PAPVisitorId=33134459046e417c958eda4989AZeoow; PAPVisitorId=33134459046e417c958eda4989AZeoow; userID=10751; isLoggedLA=1; 1d014b3efc2b8d7c962ad8fc2ecdc284=6m6kklpj1noplet1guf8nj6pn6; joomla_user_state=logged_in; joomla_remember_me_10ba8c636dbe8ebc82dbd1de77a073bf=GEs3X4Bjhpjs4ZAM.IoIsGymJUU7K4UCMeXzJ; cbtabsCB=cbtabnav11; _gat_gtag_UA_15390375_2=1 [HTTP_ACCEPT_LANGUAGE] => fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7 [HTTP_ACCEPT_ENCODING] => gzip, deflate, br [HTTP_REFERER] => https://activ-ha.com/cb-profile-edit [HTTP_SEC_FETCH_SITE] => same-origin [HTTP_ACCEPT] => text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3 [HTTP_SEC_FETCH_USER] => ?1 [HTTP_SEC_FETCH_MODE] => navigate [HTTP_USER_AGENT] => Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36 [CONTENT_TYPE] => multipart/form-data; boundary=----WebKitFormBoundaryAXtAYhCeqxmAbZHW [HTTP_UPGRADE_INSECURE_REQUESTS] => 1 [HTTP_ORIGIN] => https://activ-ha.com [HTTP_CACHE_CONTROL] => max-age=0 [CONTENT_LENGTH] => 7498 [HTTP_CONNECTION] => close [HTTP_X_ORIGINATING_IP] => 81.250.231.105 [HTTP_X_FORWARDED_FOR] => 81.250.231.105 [HTTP_HOST] => activ-ha.com [proxy-nokeepalive] => 1 [HTTPS] => on [HTTP_AUTHORIZATION] => [UNIQUE_ID] => XZrrVQZB@WClWHyFKll8IQAAAAU [REDIRECT_STATUS] => 200 [REDIRECT_HTTPS] => on [REDIRECT_HTTP_AUTHORIZATION] => [REDIRECT_UNIQUE_ID] => XZrrVQZB@WClWHyFKll8IQAAAAU [FCGI_ROLE] => RESPONDER [PHP_SELF] => /index.php [REQUEST_TIME_FLOAT] => 1570433877.229 [REQUEST_TIME] => 1570433877 )

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48435
  • Thanks: 8275
  • Karma: 1443
5 years 2 weeks ago #314598 by krileon
Replied by krileon on topic Field validation error
That doesn't make any sense. That error has nothing to do with field validation. It's erroring when it's trying to parse the parameters of a tab, but the tab has no parameters somehow. Line 516 is the following code.

Code:
$txtKo = $tab->_cbsfp_params->get( 'plug_fieldsprotectbysub_hideMessage' . $visitorTxt );

It is only used when A the tab has CBSubs Fields Tabs Protection configured and B that protection is blocking access to that tab. The parameter it's trying to access is "Negative access message to Owner" or "Negative access message to Visitor". Are you sure you're not using CBSubs Fields Tabs Protection on any tabs?


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.

  • activha
  • activha
  • ONLINE
  • Posts: 2327
  • Thanks: 117
  • Karma: 13
5 years 2 weeks ago #314607 by activha
Replied by activha on topic Field validation error
Yes we do use it on two tabs id #115 and #56
I tried to save again all tabs but the error is still there.
It only disappear if :
1) I remove minimum length for 10(or any x) characters or any on the text area field when we enter 10(or any x) spaces
2) we leave minimum length to 10 but we enter a non empty string (not 10 spaces)

Sorry I wrote validation rule but the problems come from the minimum length not the validation rule as there is no validation rule for the field in error

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48435
  • Thanks: 8275
  • Karma: 1443
5 years 2 weeks ago #314620 by krileon
Replied by krileon on topic Field validation error
The minimum length would have nothing to do with the error you've reported. It's entirely caused by CBSubs Fields Tabs Protection incorrectly trying to access a tabs parameters. I've implemented a fix in CBSubs Fields Tabs Protection and am also implementing a fix in CB it self to ensure it doesn't build the tab objects without their params being loaded correctly.

forge.joomlapolis.com/issues/7736
forge.joomlapolis.com/issues/7737


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