Author Topic: [SOLVED]Strange Bug with ps_userfield.php  (Read 1376 times)

derek webster

  • Jr. Member
  • **
  • Posts: 71
[SOLVED]Strange Bug with ps_userfield.php
« on: August 10, 2011, 11:57:11 am »
Hi There I wonder if anyone can shed any light on this... I've made seom extensive changes to ps_userfield.php - by adding in some new cases to replace form fields. All works perfect!!

Now heres the strange part - Anytime I change the VM configiration file in the backend the ps_userfield.php file gets over written and completely obliterates my changes. Strangest thing Ive ever seen.

Can anyone shed any light on this?

Many thanks

derek


derek webster

  • Jr. Member
  • **
  • Posts: 71
[SOLVED]Re: Strange Bug with ps_userfield.php
« Reply #1 on: August 10, 2011, 14:21:06 pm »
Hi THere just to let you know I solved this myself. I eventually tracked it down to a "Feature" of a "email as username" plugin that was installed. It uses the Extended Class functionality within Virtuemart. So basicallu there was another version of ps_userfield.php within the system/lunarplugin/templateoverrides directory. Everytime I updated the vm cfg file the file ps_config.php has a check at the end to see if there are any Extended Classes being used.
Everytime this happened it copied the ps_userfield.php file into and OVER the top of my code - obliterating it.

I've heard of alot of people on the forum complaining about files being overwriten or unsaved. this seems to be the answer. Took me ages to track it down.

Good Luck - Hope this helps.

derek

dylanjh

  • Jr. Member
  • **
  • Posts: 85
    • Lunarhotel.co.uk
Re: Strange Bug with ps_userfield.php
« Reply #2 on: August 10, 2011, 15:36:25 pm »
Yes, its how the username field is removed from the registration page. Sadly Virtuemart doesnt support template overrides, otherwise template overrides would have been used. Can you tell me which version of EmailAsUsername you are using? The latest version should only copy in the modified ps_userfield.php when enabled.
If you want to change ps_userfield.php then change EmailAsUsername's copy in /plugins/system/lunarplugin/template_overrides/com_virtuemart/<vm_version_number>/classes/ps_userfield.php
Then disable the plugin, and enable it again.

You can get support at www.lunarhotel.co.uk/help/forum if you need further assistance

Dylan
Register in Joomla / Virtuemart without a Username (uses email address instead). http://www.lunarhotel.co.uk

derek webster

  • Jr. Member
  • **
  • Posts: 71
Re: Strange Bug with ps_userfield.php
« Reply #3 on: August 10, 2011, 15:42:48 pm »
Ah Thanks Dylan, its a prettyy recent version - 2 months ago anyway. I've disabled it and it seems to be working a treat

thanks for the update