Author Topic: Problem with autocomplete in admin pages  (Read 343 times)

derek webster

  • Jr. Member
  • **
  • Posts: 78
Problem with autocomplete in admin pages
« on: August 13, 2020, 11:58:10 am »
Hi I'm running - VirtueMart 3.8.2 10325

Ive seen this happenign for a while now but as were about to go live its becoming a real problem.
Anytime I go into a customers user details page VM or Joomla seems to be autofilling my superadmin username and email right over the top of the customers details. and if I save its trying to save those superadmin details.

its happening on /administrator/index.php?option=com_virtuemart&view=user&task=edit&virtuemart_user_id[]=170286

but I'm sure its happening elsewhere in VM.

Ive confirmed this in Chrome and Safari

Many thanks

derek

pinochico

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 643
    • MiniJoomla
  • Skype Name: support-easysoftware
  • VirtueMart Version: 3
Re: Problem with autocomplete in admin pages
« Reply #1 on: August 13, 2020, 12:02:23 pm »
browser setup problem
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds from products, orders and database table
Virtuemart Email Manager - customs email templates

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 27842
  • Always on vacation
    • Jenkin Hill Internet
Re: Problem with autocomplete in admin pages
« Reply #2 on: August 13, 2020, 12:25:58 pm »
There was a discussion about something similar in the developer group to do with possibly missing autocomplete="off" for some forms. I thought this was fixed for VirtueMart.3.8.4.10335 - I don't see an issue with auto complete or entry in the current version.

Turning off autocomplete in browsers is a possible option but that would affect all forms, not just Joomla/VM.  ( https://support.boldbrush.com/faso-account-login/disable-clear-autofill-in-browser if interested).
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 VM 3.8.4.10335 on Joomla 3.9.21 PHP 7.4.9

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9777
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: Problem with autocomplete in admin pages
« Reply #3 on: August 13, 2020, 12:36:56 pm »
try adding autocomplete="off"  to the form in   administrator\components\com_virtuemart\views\user\tmpl\edit.php

https://www.w3docs.com/snippets/html/how-to-disable-browser-autocomplete-and-autofill-on-html-form-and-input-fields.html
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

derek webster

  • Jr. Member
  • **
  • Posts: 78
Re: Problem with autocomplete in admin pages
« Reply #4 on: August 13, 2020, 13:58:07 pm »
Thank for the replies but this is not an autocomplete issue - Ive tried on brand new sessions on TOR browser network and using a VPN. 4 tottaly diferent fresh browsers Somehow my super admin OR admin username is getting loaded into the user info fields on page load. Ive tried disabling java script so its not that either. I'm in the process of turnin pluginson/off one by one to see if theres something in there. but I'm 100% sure this is not a browser or autofill  issue - that was my first thought

pinochico

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 643
    • MiniJoomla
  • Skype Name: support-easysoftware
  • VirtueMart Version: 3
Re: Problem with autocomplete in admin pages
« Reply #5 on: August 13, 2020, 14:10:42 pm »
Quote
I'm 100% sure this is not a browser or autofill  issue

As you wish :)
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds from products, orders and database table
Virtuemart Email Manager - customs email templates

derek webster

  • Jr. Member
  • **
  • Posts: 78
Re: Problem with autocomplete in admin pages
« Reply #6 on: August 13, 2020, 14:41:56 pm »
Aha - Ive found it.a rd party payment plugin Stripe Payment plugin was causing the admin details to be loaded into the userfields. All good now.

stAn99

  • Contributing Developer
  • Jr. Member
  • *
  • Posts: 87
    • One Page Checkout for Virtuemart 2
Re: Problem with autocomplete in admin pages
« Reply #7 on: August 18, 2020, 11:39:35 am »
the problem is still available on
3.8.5 10335
3.8.3 10329
3.8.4 10335
+ possibly other previous versions


when any 3rd party system (payment plugin, possibly system plugin or others) load VM cart, the shopper details gets updated with currently logged in user.

to reproduce the problem easily you can modify:
\plugins\vmpayment\standard\standard.php

and update the constructor to:
Code: [Select]
function __construct (& $subject, $config) {

parent::__construct ($subject, $config);
// vmdebug('Plugin stuff',$subject, $config);
$this->_loggable = TRUE;
$this->tableFields = array_keys ($this->getTableSQLFields ());
$this->_tablepkey = 'id';
$this->_tableId = 'id';
$varsToPush = $this->getVarsToPush ();
$this->addVarsToPushCore($varsToPush,1);
$this->setConfigParameterable ($this->_configTableFieldName, $varsToPush);
$this->setConvertable(array('min_amount','max_amount','cost_per_transaction','cost_min_transaction'));
$this->setConvertDecimal(array('min_amount','max_amount','cost_per_transaction','cost_min_transaction','cost_percent_total'));

if (!class_exists('VirtueMartCart'))
    require(JPATH_VM_SITE .DIRECTORY_SEPARATOR. 'helpers' .DIRECTORY_SEPARATOR. 'cart.php');
$cart = VirtueMartCart::getCart();

}

i.e with new lines that initialize the cart at BE.

best regards, stan
----
RuposTel.com
www.rupostel.com
Your customized checkout solution for Virtuemart