Author Topic: Bugs found in VM 3.2.15 built 9910  (Read 734 times)

arcturus

  • Jr. Member
  • **
  • Posts: 111
  • VirtueMart Version: 3.6.10 10211
Bugs found in VM 3.2.15 built 9910
« on: August 30, 2018, 12:19:42 pm »
I found some bugs I want to prompt for fixing in the next releases:

1. default value for City is COM_VIRTUEMART_USER_FORM_ST_LABEL - should be empty
default value for address_type_name is COM_VIRTUEMART_USER_FORM_ST_LABEL - should be empty

2. tabs instead of spaces in <VM template>/cart/default_pricelist.php; if clean HTML (including tabs is used, the cart table breaks)

3. div id="reg_text" appears twice on <VM template>/user/edit_address.php; I suggest replacing it for class="reg_text", since it's not used as id by javascript;
also, this involves css styling change from #reg_text to .reg_text

4. Should be appended the _field suffix in the account edit form (otherwise there is a HTML validation error - label is for the element with _field suffix, but the element does not exist if the _field suffix not appended to its ID) - line 1119 in /administrator/components/com_virtuemart/models/userfields.php
Code: [Select]
$_return['fields'][$_fld->name]['formcode'] = JHTML::_('select.genericlist', $_values, $_prefix.$_fld->name, $_attribs, 'fieldvalue', 'fieldtitle', $_selected);becomes
Code: [Select]
$_return['fields'][$_fld->name]['formcode'] = JHTML::_('select.genericlist', $_values, $_prefix.$_fld->name. '_field', $_attribs, 'fieldvalue', 'fieldtitle', $_selected);The same for line 1132:
Code: [Select]
$_return['fields'][$_fld->name]['formcode'] =  JHtml::_('select.radiolist', $_values, $_prefix.$_fld->name.'_field', $_attribs, 'fieldvalue', 'fieldtitle', $_selected);
5. Duplicate class in the same above file, on line 910:
Code: [Select]
$_return['fields'][$_fld->name]['formcode'] = '<input type="password" id="' . $_prefix.$_fld->name . '_field" name="' . $_prefix.$_fld->name .'" '.($_fld->required ? ' class="required"' : ''). ' size="30" '.$class.' />'."\n"; -
Code: [Select]
class="required" should be removed, or the line could use $req, already defined few lines above this one:

Code: [Select]
$_return['fields'][$_fld->name]['formcode'] = '<input type="password" id="' . $_prefix.$_fld->name . '_field" name="' . $_prefix.$_fld->name .'" '.$req. ' size="30" '.$class.' />'."\n";
6. Typo
Code: [Select]
<hr <hr style=... on line 42 in <VM template>/invoice/mail_html_footer.php


VM 3.2.15 built 9910
Joomla 3.8.12
php 7.1
Tested on beez3 template
Cheers,
George
https://www.proxima-mundi.ro

Now I'm using Joomla! 3.9.15 and VM 3.6.10 10211 on PHP 7.3.9

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10076
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Bugs found in VM 3.2.15 built 9910
« Reply #1 on: September 04, 2018, 10:34:07 am »
I found some bugs I want to prompt for fixing in the next releases:
Great to get some feedback. Thank you.

1. default value for City is COM_VIRTUEMART_USER_FORM_ST_LABEL - should be empty
default value for address_type_name is COM_VIRTUEMART_USER_FORM_ST_LABEL - should be empty
I cant find it twice. The address_type is not empty on purpose.

2. tabs instead of spaces in <VM template>/cart/default_pricelist.php; if clean HTML (including tabs is used, the cart table breaks)
Why does the html break due the tabs instead? I know it is a bit faster to use whitespaces instead of tabs in template files, but I wonder how it should break the html. And why only here?

3. div id="reg_text" appears twice on <VM template>/user/edit_address.php; I suggest replacing it for class="reg_text", since it's not used as id by javascript;
also, this involves css styling change from #reg_text to .reg_text
right, oh nice, you even wrote a solution. Yes I will correct it that way.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10076
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Bugs found in VM 3.2.15 built 9910
« Reply #2 on: September 06, 2018, 09:38:36 am »
5. Duplicate class in the same above file, on line 910:
Code: [Select]
$_return['fields'][$_fld->name]['formcode'] = '<input type="password" id="' . $_prefix.$_fld->name . '_field" name="' . $_prefix.$_fld->name .'" '.($_fld->required ? ' class="required"' : ''). ' size="30" '.$class.' />'."\n"; -
Code: [Select]
class="required" should be removed, or the line could use $req, already defined few lines above this one:

Code: [Select]
$_return['fields'][$_fld->name]['formcode'] = '<input type="password" id="' . $_prefix.$_fld->name . '_field" name="' . $_prefix.$_fld->name .'" '.$req. ' size="30" '.$class.' />'."\n";

I think you missed
Code: [Select]
$req = $_fld->required ? 'required' : '';
$class = 'class="validate-password '.$req.' inputbox"';

So it should be enough to remove
Code: [Select]
'.($_fld->required ? ' class="required"' : ''). '
6. Typo
Code: [Select]
<hr <hr style=... on line 42 in <VM template>/invoice/mail_html_footer.php
Code: [Select]
Thank you

[quote author=arcturus link=topic=140849.msg495578#msg495578 date=1535624382]
Tested on beez3 template
[/quote]

Please use for testing the vmbeez3, which is delivered with the package.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/