News:

Support the VirtueMart project and become a member

Main Menu

[FIXED MYSELF YET VERY BUGGY BEHAVIOUR]Userfields are not being stored

Started by marcodelpercio, March 19, 2012, 20:45:39 PM

Previous topic - Next topic

marcodelpercio

What's wrong with this??? I thought it was a very basic feature! I just created a new custom userfield of type text.
It's published
It's not mandatory
It has to show in registration form
It has to show in account maintainance form
It's not required in shipping address form.

I gave it a name "partita_iva" and a label/title "Partita IVA"

Well the user field is actually showing both in backend and frontend as cofigured and if I enter a value during account registration, I can clearly see that value in the review emails sent to the shop administrator/customer so everything seems fine but then... the value I have entered is NOT stored, it really has not been stored, if I check the #__virtuemart_userfield_values table in the database it is completely empty, it doesn't matter if registration seems ok and also if I try to save a value from backend it says saved but then nothing it really stored!!

What's wrong? I am on Joomla 2.5.3 and Virtuemart 2.0.2 stable

marcodelpercio

I believe this thing has a seriously buggy behaviour somewhere. I found the problem by myself installing a parallel new empty Virtuemart 2.0.2 stable. When I created the userfield "partita_iva" then the database table #__virtuemart_userinfos got automatically added a new extra column named "partita_iva", on the other hand in my live Virtuemart installation (which is always 2.0.2 stable) such extra column was NOT created automatically!
And what's worst is that Virtuemart wasn't triggering any error message even with a missing column. So at the beginning I thought everything was ok. I had to manually add the required column on the #__virtuemart_userinfos table to make it work as expected...but I was forced to restore missing data directly from customers since actually those data were not stored.... that's so bad for a "stable" version :-(

How can the custom "partita_iva" field figure out correctly in the Shopper/User fields view with all its activation flags and then not be added as column in the userinfos table?
And why the hell is Virtuemart not triggering any error for the missing column when it should be storing an extra value in that column??

I'm afraid something is not coded properly somewhere.

jack19

Best regards

Joomla! 2.5.9
Virtuemart 2.0.18a

ivus

Quote from: marcodelpercio on March 20, 2012, 11:15:57 AM
I had to manually add the required column on the #__virtuemart_userinfos table to make it work as expected...

Hi marcodelpercio,

perhaps you could tell me what you did to the table as I'm having the exact same issues.

ivus

for the life of me I can't find where these fields get stored to the DB???

I even took the step of deleting the DB table and waiting for something to break in the saving process.... but guess what? nothing happened? VM still plodded along as if nothing was wrong.

I think this is a massive bug. VM team could you look into this please.