Message Error if the record is Dupplicate

13 years 8 months ago #138876 by famq23
Hello CB,

I have Joomla 1.5.14 and CB 1.2.1, and in the register form, i have a field 'cb_registro', is integer and unique in the database, but i, to Save the register form, show the next message:

"moscomprofiler::store failed: Duplicate entry '332323' for key 3 SQL=UPDATE `jos_comprofiler` SET `user_id`=3935,`firstname`='Martin Skrtel' ....."

This message do not understand for people.

And i need that show the Error Message that understand, example 'Error: the Registro is duplicated, do not duplicate, please see the DataBase.'

I am developer PHP.

Thanks.

Please Log in to join the conversation.

13 years 7 months ago #138954 by krileon
Replied by krileon on topic Re:Message Error if the record is Dupplicate
Don't understand what the issue is. Only the ID and user_id fields in the _comprofiler database table are unique. The error would imply you've two users with the same user_id. Please run CB tools in an attempt to fix your users or manually delete the duplicated user.


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.

13 years 7 months ago #138980 by nant
and update please to latest versions of Joomla and CB.

Please Log in to join the conversation.

13 years 7 months ago #139073 by famq23
Hello CB,

See, i create and put the field "cb_registro" as integer and unique, then, i need that show the consistent message in Javascript if to save the register form show the value of field 'cb_registro' as duplicated, change this Message that not understand for the basic users:

"moscomprofiler: store failed: Duplicate entry '332323' for key 3 SQL=UPDATE `jos_comprofiler` SET `user_id`=3935,`firstname`='Martin Skrtel' ....."

x this in javascript:

"Error: the value 23232 of field 'Registro' is duplicated, do not duplicate, please see the DataBase."

And the message alert is understand for basic users.

Thanks.

Please Log in to join the conversation.

13 years 7 months ago #139076 by nant
famq23 wrote:

Hello CB,

See, i create and put the field "cb_registro" as integer and unique, then, i need that show the consistent message in Javascript if to save the register form show the value of field 'cb_registro' as duplicated, change this Message that not understand for the basic users:


well this is new information that really should have been provided in initial post.

looks like you are trying to create a new fieldtype - unique integer just by hacking the database.

The result is what you see.

Suggestion: become a CB Documentation subscriber and study the various CB field type plugins and create your own. This way you can place your own error messages instead of having the database spit things back to you.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.219 seconds

Facebook Twitter LinkedIn