?
avatar Webdongle
Webdongle
22 Nov 2017

Steps to reproduce the issue

Install 4.0.0 dev
Click in the email field (when you have saved logins)

Expected result

List of email addresses display (or none)

Actual result

List of users/pass are shown.

System information (as much as possible)

Additional comments

avatar Webdongle Webdongle - open - 22 Nov 2017
avatar joomla-cms-bot joomla-cms-bot - labeled - 22 Nov 2017
avatar infograf768 infograf768 - change - 22 Nov 2017
Title
Install email field seen as password field
[4.0] Install email field seen as password field
avatar infograf768 infograf768 - edited - 22 Nov 2017
avatar infograf768
infograf768 - comment - 22 Nov 2017

Confirmed

avatar dgt41
dgt41 - comment - 22 Nov 2017

List of email addresses display

This comes from your browser and has nothing to do with Joomla!

Please close this, it's not an issue, it's the default browser behaviour

avatar joomla-cms-bot joomla-cms-bot - change - 22 Nov 2017
Status New Closed
Closed_Date 0000-00-00 00:00:00 2017-11-22 17:30:05
Closed_By joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - close - 22 Nov 2017
avatar franz-wohlkoenig franz-wohlkoenig - change - 22 Nov 2017
Status New Closed
Closed_Date 0000-00-00 00:00:00 2017-11-22 17:30:05
Closed_By franz-wohlkoenig
avatar joomla-cms-bot
joomla-cms-bot - comment - 22 Nov 2017
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 22 Nov 2017

closed as stated above.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18793.

avatar Webdongle
Webdongle - comment - 22 Nov 2017

@franz-wohlkoenig and @dgt41
The browser picks it up from the 'field type'. The form should have a input type="password" tag


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18793.

avatar franz-wohlkoenig franz-wohlkoenig - change - 22 Nov 2017
Status Closed Discussion
Closed_Date 2017-11-22 17:30:05
Closed_By joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - change - 22 Nov 2017
Status Discussion New
Closed_Date 0000-00-00 00:00:00
avatar joomla-cms-bot joomla-cms-bot - reopen - 22 Nov 2017
avatar joomla-cms-bot
joomla-cms-bot - comment - 22 Nov 2017
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 22 Nov 2017

reopened for above Reason.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18793.

avatar franz-wohlkoenig franz-wohlkoenig - change - 22 Nov 2017
Category Authentication
avatar franz-wohlkoenig franz-wohlkoenig - change - 22 Nov 2017
Status New Discussion
avatar C-Lodder
C-Lodder - comment - 22 Nov 2017

@Webdongle which field are you referring to? Can you provide a screenshot please?

avatar dgt41
dgt41 - comment - 22 Nov 2017

@Webdongle if you're talking about the installation (which I assumed) then the code is correct:
screen shot 2017-11-22 at 20 14 55

avatar Webdongle
Webdongle - comment - 22 Nov 2017

Yes it is but for some reason the browser (even though the type email is rendered correctly) is not picking it up correctly. This problem did not manifest before because the order of the fields was email, user, password. For some reason the browser is not recognising the type with form->getInput('admin_email'); ?> Placing autocomplete="off" in the form tag of the default.php (it is not being recognised in the xml file) prevents it or perhaps put the order the same as installs of 3.4 email, user, password.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18793.

avatar Webdongle
Webdongle - comment - 22 Nov 2017

It happens in Firefox, Chrome and Edge. With Edge the autocomplete="off" in the password field of the xml file appears to be recognised. But in Firefox and Chrome that value is ignored.
install 01
install 02

avatar dgt41
dgt41 - comment - 22 Nov 2017

Ok, something is wrong here. If we cannot render proper HTML5 forms we're failing miserably. Anyways this is valid and needs to be properly fixed, eg not only for this form but for all forms rendered through JForm

avatar Webdongle
Webdongle - comment - 22 Nov 2017

@dgt41
The source output looks correct and type="email" shows but the browser just doesn't appear to honour it. Methinks a few tests need to be done with plain text forms and see if if it a browser fault that somehow overrides the type of a field if it immediately follows a text field ?

avatar infograf768
infograf768 - comment - 23 Nov 2017

This concerns all occurences of the type="email" field in J!, not only during installation.
It is working fine in 3.8.x

avatar brianteeman
brianteeman - comment - 23 Nov 2017

I cannot confirm that. I just checked in the user manager and the email is displayed
Tested in firefox and chrome for windows

avatar infograf768
infograf768 - comment - 23 Nov 2017

My tests here are on Macintosh Firefox and it works perfectly on 3.8.x

avatar brianteeman
brianteeman - comment - 23 Nov 2017

Sorry I misunderstood the report.

I can confirm the behaviour but this looks to me like a firefox browser behaviour (although it doesnt happen in j3

avatar Webdongle
Webdongle - comment - 23 Nov 2017

I suspect the problem existed in J3 but didn't show up because the email field was presented before the user field.
If in J4 \installation\tmpl\setup\default.php is changed from
<?php echo $this->form->getLabel('admin_user'); ?> <?php echo $this->form->getInput('admin_user'); ?> </div> <div class="form-group"> <?php echo $this->form->getLabel('admin_email'); ?> <?php echo $this->form->getInput('admin_email'); ?>
to
<div class="form-group"> <?php echo $this->form->getLabel('admin_email'); ?> <?php echo $this->form->getInput('admin_email'); ?> </div> <div class="form-group"> <?php echo $this->form->getLabel('admin_user'); ?> <?php echo $this->form->getInput('admin_user'); ?> </div>
then the problem disappears

avatar Webdongle
Webdongle - comment - 23 Nov 2017

This is messy but solves it
<div class="form-group"> <?php echo $this->form->getLabel('admin_email'); ?> <?php echo $this->form->getInput('admin_email'); ?> </div> <div style="display: none;"> <input type="text" id="FakeInput" /> </div>
Add the field into the xml file then use echo in the default.php

As for autocomplete="off" ... browsers now only recognise it when in the <form> tag not a <input> tag !!!

Edited for clarity thanks @dgt41

avatar dgt41
dgt41 - comment - 23 Nov 2017

As for autocomplete="off" ... browsers now only recognise it when in the form tag not a tag !!!

what do you mean?

PS never mind, GitHub didn't display the <for> part

avatar infograf768
infograf768 - comment - 24 Nov 2017

@Webdongle Can you make a PR?

avatar Webdongle
Webdongle - comment - 24 Nov 2017

What for ...
The altering the order fix
or
The adding of a hidden input to catch the error ?

avatar brianteeman
brianteeman - comment - 24 Nov 2017

Not at my PC right now. But isn't this a Firefox feature offering to autofill the saved email address for this saved username

avatar Webdongle
Webdongle - comment - 24 Nov 2017

@brianteeman
No it's Firefox offering to fill the email field with a password
install 01
I suggested two fixes

  1. Put the email field above the user field #18793 (comment)
  2. Add a dummy field after the email field #18793 (comment) (define in the xml and call in the default.php
    Both allow the browser to present mail addresses (instead of password) suggestions for the email field.
    @infograf768 asked if I could provide a PR and I asked for which solution.

Also browsers are ignoring autofill=off unless it's in the <form> tag. At the moment the password field has autofill=off (defined in the xml file) but it's being ignored ... so it is redundant there.

avatar brianteeman
brianteeman - comment - 24 Nov 2017

I just checked and firefox is offering to fill the email field with the email address associated with that saved username - see movie below. This is NOT a bug - this is the expected behaviour with firefox. We should not be doing stuff to break the expected behaviour of a web browser.

password

autofill=off is something that browsers constantly change between overriding and not

avatar Webdongle
Webdongle - comment - 24 Nov 2017

Not in the user screen. During install
gif

Both the fixes I suggested allow FF to show email addresses in the email field

avatar infograf768
infograf768 - comment - 25 Nov 2017

@Webdongle I prefer not changing the order, therefore using the dummy field.
I added it in setup/default.php

[...]
				<div class="form-group">
					<?php echo $this->form->getLabel('admin_email'); ?>
					<?php echo $this->form->getInput('admin_email'); ?>
				</div>
				<div style="display: none;">
					<input type="text" id="dummy"/>
				</div>
				<div class="form-group">
					<?php echo $this->form->getLabel('admin_password'); ?>
					<?php echo $this->form->getInput('admin_password'); ?>
				</div>
[...]

and in the forms/setup.xml

[...]
		<field
				name="admin_email"
				type="email"
				id="admin_email"
				class="form-control"
				label="INSTL_ADMIN_EMAIL_DESC"
				validate="email"
				required="true"
		/>

		<field
				type="text"
				id="dummy"
		/>

		<field
				name="admin_user"
[...]

and it works fine. ?
email

avatar Webdongle
Webdongle - comment - 25 Nov 2017

@infograf768
OK I will give it a go creating a PR unless someone else does it first
<div class="form-group"> <?php echo $this->form->getInput('dummy'); ?> </div>
Might be tidier ?

avatar Webdongle
Webdongle - comment - 25 Nov 2017

The order of the fields in the xml file were different to the order in the default.php ... so I also arranged them in the correct order in the xml file for consistency.

avatar joomla-cms-bot joomla-cms-bot - change - 25 Nov 2017
Closed_By franz-wohlkoenig joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - close - 25 Nov 2017
avatar franz-wohlkoenig franz-wohlkoenig - change - 25 Nov 2017
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2017-11-25 14:36:33
Closed_By franz-wohlkoenig
avatar joomla-cms-bot
joomla-cms-bot - comment - 25 Nov 2017
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 25 Nov 2017

closed as having Pull Request #18863

Add a Comment

Login with GitHub to post a comment