joomla / joomla-cms

Home of the Joomla! Content Management System
https://www.joomla.org
GNU General Public License v2.0
4.77k stars 3.65k forks source link

[4.0] No way to change the site name during installation #24556

Closed chmst closed 2 years ago

chmst commented 5 years ago

Steps to reproduce the issue

Start an installation. Enter the site name, go to "setup login data" (and mybe to the database setup) Did you enter the site name right? Do you want to update the site name?

Expected result

You can see the site name you have entered in the first step. You can change the site name

Actual result

The sie name is not visible and there is no way back to change the site name (except restarting the installation)

brianteeman commented 5 years ago

no way back to change the site name (except restarting the installation)

You can of course change it in global configuration.

This isn't any different to J3 is it?

chmst commented 5 years ago

In J3.x you can change tabs during the installation steps. EDIT: yes of course - I can restart the installation and I can change the site name after installation. But for a new user this is not evident.

brianteeman commented 5 years ago

Pretty sure that you cant go back the steps in other cms installers

Puneet-Jain-18 commented 5 years ago

Does Displaying Site name (entered by user) in the Head Solves the issue in any way??

Screenshot (59)

brianteeman commented 5 years ago

No as you still cant go back to change it.

It should be noted that you cant go back and change any entries in the installer

I still don't see it as a problem

Bakual commented 5 years ago

It certainly isn't a big issue, but it would be a nice feature if you could go back. Also, in J3 we can do that. So it's not like it's a completely new idea :)

chmst commented 5 years ago

In J3.9 you can change the tab and go back for changes so this is kind of a regression in Joomla. install-39

@Puneet-Jain-18 in your solution the user at least can see what he /she has entered in the first step.

But why not make a simple one-pager? Or start with the db-stuff where most problems occur, if people don't kow their server name or their database password?

brianteeman commented 5 years ago

It is a one pager :)

Bakual commented 5 years ago

It is a one pager :)

Technically, it may be (like the J3 one). But in practice it's multiple steps. It's just not a page reload.

chmst commented 5 years ago

I know that technically it is a one-pager. But for users it is not, as they do not see the whole page. I do not want to discuss about that. But I think we must think how novice users, not how developers.

Puneet-Jain-18 commented 5 years ago

Please let me know If some changes are finalized. I would be Happy to work on this. :)

infograf768 commented 5 years ago

It is clear that the installer needs some love and care. Session issue, language install issue, no more choice for admin and site language, impossible to delete database content with former db prefix, and this one here too...

brianteeman commented 5 years ago

@infograf768 All of those are completely unrelated to this. If they are not on the project board https://github.com/joomla/joomla-cms/projects/15 then please create separate issues for each of those.

Please refrain from bringing up unrelated issues it really doesnt help and if anything detracts from the work on the current issue and results in your other issue being ignored

infograf768 commented 5 years ago

If you do not like my posts, refrain from commenting on them. To tell it shortly: GL

brianteeman commented 5 years ago

Thank you so much for your kind words

chmst commented 5 years ago

So maybe we could come back to the idea of making Joomla v4 installation userfriendly and comfortable by enabling the user to correct misspelled sitenames during installation?

ghost commented 5 years ago

@chmst thanks for coming back to topic.

infograf768 commented 5 years ago

@chmst Sorry. It looked like I was getting OT, but not really imo. I think that the installation needs some refactoring which would also include your issue. I do not see any solution for this issue without this important refactoring.

Puneet-Jain-18 commented 5 years ago

I think we can consider closing #18834 as both point to same issue.

ghost commented 5 years ago

thanks for finding double Report @Puneet-Jain-18

brianteeman commented 5 years ago

no way back to change the site name (except restarting the installation)

You can use the browser back button

dgrammatiko commented 5 years ago

@chmst according to my design whenever you fill some inputs and move to the next step the previous part of the form should still remain visible, so the user can scroll up and do any changes if that is needed. The code is also there: https://github.com/joomla/joomla-cms/blob/a50c70ce68a8074d558daa6e95ba51d02eb666d3/installation/template/js/setup.js#L61-L64

Now what probably happened is that the new design by Elisa somehow changed this pretty obvious design functionality and called for hiding the previous filled parts of the form. Well, this is totally wrong, it's against my design functionality (which obviously didn't had the limitation you're mentioning in this issue). So either undo the hiding parts of the fulfilled parts of the form (the right thing to do) or add a navigation that will handle the revealing/hiding of the parts of the form. Obviously the second option is wrong as it adds more complexity to the design, requires more javascript, html, css and simply it's against the main principle of any web page: web pages do scroll. Styling should have followed the functional design and not calling for a change for the shake of change.

fwiw by removing https://github.com/joomla/joomla-cms/blob/a50c70ce68a8074d558daa6e95ba51d02eb666d3/installation/template/js/setup.js#L153 and https://github.com/joomla/joomla-cms/blob/a50c70ce68a8074d558daa6e95ba51d02eb666d3/installation/template/js/setup.js#L170 you'll get back to the initial design were the parts of the form revealed and stay visible as the user fulfils them and move on to the next...

infograf768 commented 5 years ago

@dgrammatiko tested your proposed changes to setup.js but this totally breaks the installation. Setup Login Data loads an empty page. I guess it needs more than these changes.

dgrammatiko commented 5 years ago

@infograf768 define breaks please. Is the styling off or it's not functional anymore, these 2 are different things...

infograf768 commented 5 years ago

There was an error in your proposed patch above. It works if I delete document.getElementById('installStep1').classList.remove('active'); not installStepstep2 ;)

diff --git a/installation/template/js/setup.js b/installation/template/js/setup.js
index 8e24703..ce2c76b 100644
--- a/installation/template/js/setup.js
+++ b/installation/template/js/setup.js
@@ -151,5 +151,4 @@
                if (document.getElementById('installStep2')) {
                    document.getElementById('installStep2').classList.add('active');
-                   document.getElementById('installStep1').classList.remove('active');

                    // Focus to the next field
@@ -168,5 +167,4 @@
                if (document.getElementById('installStep3')) {
                    document.getElementById('installStep3').classList.add('active');
-                   document.getElementById('installStep2').classList.remove('active');
                    document.getElementById('setupButton').style.display = 'block';
dgrammatiko commented 5 years ago

For me the following code works fine:

    if (document.getElementById('step1')) {
        document.getElementById('step1').addEventListener('click', function(e) {
            e.preventDefault();
            if (Joomla.checkFormField(['#jform_site_name'])) {
                if (document.getElementById('languageForm')) {
                    // document.getElementById('languageForm').style.display = 'none';
                }
                if (document.getElementById('installStep2')) {
                    document.getElementById('installStep2').classList.add('active');
                    // document.getElementById('installStep1').classList.remove('active');

                    // Focus to the next field
                    if (document.getElementById('jform_admin_user')) {
                        document.getElementById('jform_admin_user').focus();
                    }
                }
            }
        })
    }

    if (document.getElementById('step2')) {
        document.getElementById('step2').addEventListener('click', function(e) {
            e.preventDefault();
            if (Joomla.checkFormField(['#jform_admin_user', '#jform_admin_email', '#jform_admin_password'])) {
                if (document.getElementById('installStep3')) {
                    document.getElementById('installStep3').classList.add('active');
                    // document.getElementById('installStep2').classList.remove('active');
                    document.getElementById('setupButton').style.display = 'block';

                    Joomla.makeRandomDbPrefix();

                    // Focus to the next field
                    if (document.getElementById('jform_db_type')) {
                        document.getElementById('jform_db_type').focus();
                    }
                }
            }
        });
infograf768 commented 5 years ago

yes, that is what I have done. See above. Note: it does not let one switch the installation language if you find you started with the wrong one. Maybe that was on purpose.

The other issues (session, etc., need love and care).

dgrammatiko commented 5 years ago

Maybe that was on purpose.

No, that used to work fine some months ago, so this is a bug. Also the language dropdown in reality is another form unrelated to the rest of the form. So this needs to be properly debuged. Same goes for all the other bugs you've mentioned above.

PS I think that if you manage to solve the sessions problem you'll get the language dropdown working as a bonus

PS2 @infograf768 you can try removing all instances of Joomla.replaceTokens(r.token); from the scripts, this might work (although the problem is not the client side code here but the way the PHP is generating a new session on every request)

brianteeman commented 2 years ago

I guess nothing is going to happen here now and this should be closed. Not my call though