HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Database Query Error

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#63158 (In Topic #13699)
Avatar

Community saint

I have started receiving this error lately. It is not a consistent so I have no idea what action is causing it to be generated.

This is the error message
Unfortunately a query has failed [INSERT INTO ocp4_f_member_custom_fields (mf_member_id, field_1, field_2, field_3, field_4, field_5, field_6, field_7, field_8, field_9, field_10, field_11, field_12, field_13, field_14, field_15, field_16, field_17, field_18) VALUES (108, '', '', '', '', '', '', '', '', 0, 0, 0, 0, 0, 0, 0, '', '', '')][Field 'field_130363' doesn't have a default value] (version: 5.0.1, PHP version: 5.2.9, URL: /site/index.php?page=members&type=view&id=beau_peep_2)

Expand: stack trace stack trace



If anyone can help, their assistance would be greatly appreciated

Thanks,
Doc

Back to the top
 
Posted
Rating:
#63177
Avatar

Community saint

Hey Doc! I also had this error and it seems to be attached to a custom field. In my case, I had moved the site and something went amiss. I'm sure there is a "correct" fix for this, however, I just cheated and using phpmyadmin did a search for the offending field and just set it to allow a default value of 0 and the problem went away.

"no violence, no hate, no pain, no enemies
just peace, unity, tolerance and love" - The Beloved

OCP V7 | Advocating monetary reform - FreeOurMoney

Need OCP friendly hosting? Look no further:
Web Hosting, Reseller Hosting, and Dedicated Servers w/cPanel - Elief! - Official hosting partner for ocPortal.
Back to the top
 
Posted
Rating:
#63180

Non-joined user

Hey SoccerDad. Thanks for the reply.  :thumbs:

I appreciate the idea, I had not thought of that. I did have to use phpmyadmin to delete a couple of old members cause when I tried from admin, I received that error also.

Back to the top
 
Posted
Rating:
#63191
Avatar

Community saint

That did not fix the problem.  :(

In fact, I am finding that people are receiving a similar error when attempting to join. The site has failed the last 4 attempts of new members to join, always producing a similar error that Field 'field_130363' doesn't have a default value.

Is this a bug, Chris…anyone?
Back to the top
 
Posted
Rating:
#63192
Avatar

Community saint

That sucks! If you are interested, grab a data and structure dump from phpmyadmin and PM it to me. I'll insert it here on my test machine and see what I can come up with.

What version of OCP are you using?

"no violence, no hate, no pain, no enemies
just peace, unity, tolerance and love" - The Beloved

OCP V7 | Advocating monetary reform - FreeOurMoney

Need OCP friendly hosting? Look no further:
Web Hosting, Reseller Hosting, and Dedicated Servers w/cPanel - Elief! - Official hosting partner for ocPortal.
Back to the top
 
Posted
Rating:
#63194
Avatar

Community saint

I am using 5.0.1

I'll get the dump and be back…thanks, very much.  :)
Back to the top
 
Posted
Rating:
#63195
Avatar

Community saint

SoccerDad, I'll get back to you later. It seems I may have more problems than I thought. I can't do an export right now. Me thinks, I need to take a look at my server.  :(
Back to the top
 
Posted
Rating:
#63198
Avatar

Community saint

Hey SoccerDad! I think I fixed the problem. Well the one with the custom field table anyway. I changed it from not null to null, and now people can join and the error went away when viewing member profiles.

Now I have to figure out why I can't do a db dump.

Thanks for your help,
Doc
Back to the top
 
Posted
Rating:
#63201
Avatar

Community saint

Great news Doc, glad you got things fixed up….and thanks for mentioning what you did: the more I thought about it, the more I remembered having to do the same thing. I think what happened when I first tried to fix (by using a "0") was the field type did not take an integer. I didn't muck with it too much and now that I've checked deeper, I ended up having to do the same thing. Sorry for the red herring…

"no violence, no hate, no pain, no enemies
just peace, unity, tolerance and love" - The Beloved

OCP V7 | Advocating monetary reform - FreeOurMoney

Need OCP friendly hosting? Look no further:
Web Hosting, Reseller Hosting, and Dedicated Servers w/cPanel - Elief! - Official hosting partner for ocPortal.
Back to the top
 
Posted
Rating:
#63203
Avatar

Community saint

Don't worry about that. It got me looking in the right place, and when I could not do the db dump, I had to actually think about it…go figure.  :o  :lol:  :lol:
Back to the top
 
Posted
Rating:
#63279
Avatar

Hi,

In past ocPortal versions, we didn't do a great job of making sure this table had the correct field types for what data was inserted, and we relied on MySQL's ability to squeeze stuff in anyway.
Newer versions fixed that and also turned on MySQL's strictness feature, which is relatively new.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#63281
Avatar

Community saint

Hi Chris,

Thanks for the comment. So, is what SoccerDad and I changed the correct fix?

I hope you are doing well. It has been a while since I chatted with you.

Regards,
Doc
Back to the top
 
Posted
Rating:
#63287
Avatar

Hi,

Yeah, that should do it. Possibly also deleting the field (as it may simply be an orphan), but I really wouldn't worry - if it works, best not to rock the boat.

Doing fine thanks, lots to catch up on though.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#63340
Avatar

Community saint

Hey Chris,

Yeah, it works now so I don't think I will try to fix it further.  :lol:

Glad to hear you are doing well…that catching up thing seems to afflict a lot of us.  :)
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: