News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Save failed with the following error: Please enter your name.

Started by ex3mist, December 12, 2015, 20:43:23 PM

Previous topic - Next topic

ex3mist

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

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

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

ex3mist

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):


<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:


<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:


<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

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
Lowestoft, Suffolk, UK

Retired from forum life November 2023

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

GJC Web Design

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 https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 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
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

ex3mist

Quote from: jenkinhill 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!

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

Quote from: GJC Web Design 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

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

GJC Web Design

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 https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 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
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

ex3mist


ifs-net

Hello,

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

npopi.com

GJC Web Design

GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 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
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

ex3mist

Quote from: ifs-net 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


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

ch1vph