Author Topic: Save failed with the following error: Please enter your name.  (Read 5220 times)

ex3mist

  • Jr. Member
  • **
  • Posts: 78
Save failed with the following error: Please enter your name.
« on: December 12, 2015, 20:43:23 pm »
Hello,
Some issue occured with the register form of VM. After I fill all the fields and hit Register, the following message appears: "Save failed with the following error: Please enter your name.". All the required fields are filled, but...
I can't find out if I did anything. I suspect it occured after the last update I made before a week ago, but I'm not sure. Can anyone give an idea what might caused it? Anything to check, some settings?

Joomla! 3.4.5
VirtueMart 3.0.11.4

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 27954
  • Always on vacation
    • Jenkin Hill Internet
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Currently using VirtueMart 3.8.7 10374 on Joomla 3.9.23 PHP 7.4.12

ex3mist

  • Jr. Member
  • **
  • Posts: 78
Re: Save failed with the following error: Please enter your name.
« Reply #2 on: December 13, 2015, 12:49:03 pm »
Hello jenkinhill,

Yes, you are right that I didn't search enough here in the forum. I've found some old issues regarding this message after searching in Google but as they were old I desided to post a new topic. Anyway.

Before I see your answer I understood that this issue is coming from the "Displayed Name" field being unpublished. I saw in the links you provided that others are also trying not to use it and there were several modifications to the edit_address_userfields.php file offered but unfortunately for older versions of VM. I also downloaded the latest VM package and compared those files from my site and the package - the code in both is absolutely identical.

So, I desided not to update VM for now cause I'm using preinstalled template package and this might affect other functions of the site. But rather wait untill the developer releases an update. And what I did is to look at the other solutions offered for the previous versions and apply it to mine. I edited the edit_address_userfields.php by replasing this code (line 71):

Code: [Select]
<tr title="<?php echo strip_tags($descr?>">
<td class="key"  >
<label class="<?php echo $field['name'?>" for="<?php echo $field['name'?>_field">
<?php echo $field['title'] . ($field['required'] ? ' *' ''?>
</label>
</td>
<td>
<?php echo $field['formcode'?>
</td>
</tr>

with this one:

Code: [Select]
<tr title="<?php echo strip_tags($descr?>" <?php if ($field['name']=="name") {echo 'style=display:none;';};?> >
<td class="key"  >
<label class="<?php echo $field['name'?>" for="<?php echo $field['name'?>_field">
<?php echo $field['title'] . ($field['required'] ? ' *' ''?>
</label>
</td>
<td>
<?php echo $field['formcode'?>
</td>
</tr>

And at the end of the file added the following JS:

Code: [Select]
<script type="text/javascript">
var $j = jQuery.noConflict(); //avoid conflict with other libraries

$j('#username_field').change(function () {             
var reg_user = $j('#username_field').val(); //set username value inside variable
    $j('#name_field').val(reg_user); //assign variable value to name
});
</script>

I don't know PHP and JS, but as far as I understood from the other posts, this sollution fills the "Displayed Name" field with what is written in the "Username" field, and hides it. Of course the "Displayed Name" field must be published in the admin settings.

I continue testing it, but for now it seems to work for me. If you can suggest more appropriate sollution, please, you're welcome. :)

And another thing, obviously using this field makes sense, but in some cases as mine, admins would like to unpublish it and not use it. Why there is not an option to do this - to Publish/Unpublish it without errors being displayed? So that to be able to deside if you want to use it or not.

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 27954
  • Always on vacation
    • Jenkin Hill Internet
Re: Save failed with the following error: Please enter your name.
« Reply #3 on: December 13, 2015, 14:01:50 pm »
Quote
I'm using preinstalled template package and this might affect other functions of the site

But VM3.0.11.4 was not released as a stable version, it was test/development version. Stable versions are even numbered, eg 3.0.12 - which was a security release so is an important update. VM3.0.12.2 will be available soon with more codefixes and updates.

It's your site, so you fix it how you like, as long as it works!
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Currently using VirtueMart 3.8.7 10374 on Joomla 3.9.23 PHP 7.4.12

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9901
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: Save failed with the following error: Please enter your name.
« Reply #4 on: December 13, 2015, 14:06:51 pm »
and 3.0.12 should me a very minor (but safe making) update for you .. obviously check on a clone first
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

ex3mist

  • Jr. Member
  • **
  • Posts: 78
Re: Save failed with the following error: Please enter your name.
« Reply #5 on: December 13, 2015, 16:29:30 pm »
Quote
I'm using preinstalled template package and this might affect other functions of the site

But VM3.0.11.4 was not released as a stable version, it was test/development version. Stable versions are even numbered, eg 3.0.12 - which was a security release so is an important update. VM3.0.12.2 will be available soon with more codefixes and updates.

It's your site, so you fix it how you like, as long as it works!

Maybe I'll try to see what happens if I do it after you say it is important update.

But about this field, couldn't it be made not required? Of course you can make it not required and unpublish it, but as you get such messages after that, it's kind of obligatory to use it.

ex3mist

  • Jr. Member
  • **
  • Posts: 78
Re: Save failed with the following error: Please enter your name.
« Reply #6 on: December 13, 2015, 16:30:28 pm »
and 3.0.12 should me a very minor (but safe making) update for you .. obviously check on a clone first

Hi GJC Web Design,
Couldn't understand what do you mean?

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9901
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: Save failed with the following error: Please enter your name.
« Reply #7 on: December 13, 2015, 19:38:14 pm »
there is very little difference between 3.0.11.4 and 3.0.12 so the upgrade should be painless.. but test on a copy of the site first

re field.. it is required by Joomla so it has to be there.. auto filled and hidden or otherwise..
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

ex3mist

  • Jr. Member
  • **
  • Posts: 78
Re: Save failed with the following error: Please enter your name.
« Reply #8 on: December 14, 2015, 21:24:10 pm »
It works OK as hidden for now.  ;)

ifs-net

  • Jr. Member
  • **
  • Posts: 76
Re: Save failed with the following error: Please enter your name.
« Reply #9 on: July 24, 2016, 06:03:08 am »
Hello,

I have the same problem with VM 3.0.16...
How can I fix that pls ?

npopi.com

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9901
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: Save failed with the following error: Please enter your name.
« Reply #10 on: July 24, 2016, 10:38:50 am »
example? fuller explanation?
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

ex3mist

  • Jr. Member
  • **
  • Posts: 78
Re: Save failed with the following error: Please enter your name.
« Reply #11 on: July 24, 2016, 16:24:34 pm »
Hello,

I have the same problem with VM 3.0.16...
How can I fix that pls ?

npopi.com


Hello,
I've explained how I fixed it in the previous posts, isn't that working for you?

ch1vph

  • Jr. Member
  • **
  • Posts: 52
  • A beginner
Re: Save failed with the following error: Please enter your name.
« Reply #12 on: July 04, 2017, 20:52:27 pm »
Change it to your first name instead! endof