News:

Looking for documentation? Take a look on our wiki

Main Menu

Duplicate element IDs in login forms?

Started by gba, January 02, 2018, 16:30:24 PM

Previous topic - Next topic

gba

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

Jörgen

ehrm

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

regards

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

gba

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

Jörgen

Hello

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

regards

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

gba

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

Jörgen

A link would be nice, I can not find any trace of this id.

regards

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

Studio 42

gba, do an override in your template if the ID is not important and simply remove it.

gba

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

Studio 42

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.

gba

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