VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: gba on January 02, 2018, 16:30:24 PM

Title: Duplicate element IDs in login forms?
Post by: gba on January 02, 2018, 16:30:24 PM
Hi!

Why there are the same IDs for password field in the VM login form as in the Joomla Login module?
I have an error about duplicate IDs:
[DOM] Found 2 elements with non-unique id #modlgn-passwd

Kind regards,
Gerald
Title: Re: Duplicate element IDs in login forms?
Post by: Jörgen on January 02, 2018, 23:03:13 PM
ehrm

The same password field is used for both joomla and vm , why do you display this twice?

regards

Jörgen @ Kreativ Fotografi
Title: Re: Duplicate element IDs in login forms?
Post by: gba on January 03, 2018, 06:54:41 AM
Hi!

I am not displaying the login forms twice.
The page header contains a login link showing the login module as popup.
On pages containing a login form the magic happens:
As VM is using the same ID for password input field as the module, the error mentioned appears.

I am wondering, why the id of a form field has a prefix "modlgn" in its layout at all, while it actually is not within a module, but in a page content layout.

Kind regards,
Gerald
Title: Re: Duplicate element IDs in login forms?
Post by: Jörgen on January 03, 2018, 10:35:23 AM
Hello

This does not sound like a standard VM template. Test with Protostar.

regards

Jörgen @ Kreativ Fotografi
Title: Re: Duplicate element IDs in login forms?
Post by: gba on January 03, 2018, 12:20:30 PM
Hi!

This is independent of any template.

The topic is:
Why is a VM layout using the same ID as in a Joomla module?
From my point of view this is not right.
Don't you agree?

Kind regards,
Gerald
Title: Re: Duplicate element IDs in login forms?
Post by: Jörgen on January 03, 2018, 12:30:44 PM
A link would be nice, I can not find any trace of this id.

regards

Jörgen @ Kreativ Fotografi
Title: Re: Duplicate element IDs in login forms?
Post by: Studio 42 on January 03, 2018, 14:22:21 PM
gba, do an override in your template if the ID is not important and simply remove it.
Title: Re: Duplicate element IDs in login forms?
Post by: gba on July 17, 2019, 15:36:10 PM
Quote from: Studio 42 on January 03, 2018, 14:22:21 PM
gba, do an override in your template if the ID is not important and simply remove it.

VM should not use the same element ID as used by Joomla.
Making an override in this case would be like turning the radio louder, if the car engine was deffective and made inproper noise.
Shouldn't this issue be resolved by VM development, instead?

Kind regards,
Gerald
Title: Re: Duplicate element IDs in login forms?
Post by: Studio 42 on July 17, 2019, 22:28:17 PM
Quote from: gba on July 17, 2019, 15:36:10 PM
Quote from: Studio 42 on January 03, 2018, 14:22:21 PM
gba, do an override in your template if the ID is not important and simply remove it.

VM should not use the same element ID as used by Joomla.
Making an override in this case would be like turning the radio louder, if the car engine was deffective and made inproper noise.
Shouldn't this issue be resolved by VM development, instead?

Kind regards,
Gerald
It should, but here we provided you a (temporary) solution. You can wait or do the override.
Title: Re: Duplicate element IDs in login forms?
Post by: gba on July 18, 2019, 15:44:49 PM
Hi!

I understand.
Thank you very much for the workaround!

I hope this issue will be removed in the next VM version.
Is this thread enough or shall I create a ticket for that?

Kind regards,
Gerald