Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.0] New installer #17964

Merged
merged 57 commits into from
Nov 2, 2017
Merged

[4.0] New installer #17964

merged 57 commits into from
Nov 2, 2017

Conversation

dgrammatiko
Copy link
Contributor

@dgrammatiko dgrammatiko commented Sep 15, 2017

CREDITS

Design: @coolcat-creations and @svom
Accessibility testing: @armenos
HTML + CSS: @ciar4n
PHP + JS: @dgt41
PHP namespacing: @laoneo

Summary of Changes

New installer for Joomla 4 with less steps, less questions. Should be a nice step forward from the current (J3.x).

Preview

Error page if your PHP version doesn't meet the minimum requirements of Joomla:
screen shot 2017-09-03 at 22 17 46

Error page if any of the required PHP packages isn't installed in your server:
screen shot 2017-09-03 at 22 23 14

First page (if your server meets Joomla's requirements, that should be the entry point for most users):
screen shot 2017-09-03 at 22 18 48

Second page:
screen shot 2017-09-03 at 22 19 37

Third screen (clicking on the button will install your Joomla copy):
screen shot 2017-09-03 at 22 20 09

Forth page (option to install sample data and more languages or finalise installation) :
screen shot 2017-09-03 at 22 20 56

Extra languages:
screen shot 2017-09-03 at 22 21 12

Sample data:
screen shot 2017-09-03 at 22 21 34

Finallise installation:
screen shot 2017-09-03 at 22 21 46

THIS IS ALPHA [WIP]

  • The remove installation folder is not implemented yet (on purpose)

dgrammatiko and others added 11 commits September 3, 2017 16:32
commit f866778a5326b4e1c3db10f578ac48c43c66c653
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Sat Sep 2 22:51:17 2017 +0300

    more changes

commit 4207db197419c8a098feb1d68ef07d2247301986
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Sat Sep 2 19:03:35 2017 +0300

    fix the routing

commit ddb59ac
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Fri Sep 1 16:12:38 2017 +0300

    fixes, remove webcomponets

commit 727401a
Merge: 1b1726d 6981a18
Author: Dimitri Grammatikogianni <mit505@upshift.gr>
Date:   Fri Sep 1 15:35:45 2017 +0300

    Merge pull request #64 from ciar4n/style-postinstall

    Post install markup and style

commit 6981a18
Author: ciar4n <ciaran@joomla51.com>
Date:   Fri Sep 1 13:32:31 2017 +0100

    Post install markup and style

commit 1b1726d
Merge: 0a43128 42e5517
Author: Dimitri Grammatikogianni <mit505@upshift.gr>
Date:   Tue Aug 29 14:28:33 2017 +0300

    Merge pull request #63 from ciar4n/style-preinstall

    New style to preinstall

commit 42e5517
Author: ciar4n <ciaran@joomla51.com>
Date:   Tue Aug 29 12:24:20 2017 +0100

    New style to preinstall check

commit 0a43128
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Wed Aug 23 16:37:18 2017 +0300

    js fixes

commit 9974ee5
Merge: 8fb5939 48857fc
Author: Dimitri Grammatikogianni <mit505@upshift.gr>
Date:   Tue Aug 22 19:53:31 2017 +0300

    Merge pull request #62 from ciar4n/install-style

    Install re design

commit 48857fc
Author: ciar4n <ciaran@joomla51.com>
Date:   Tue Aug 22 17:50:20 2017 +0100

    Redesign

commit 8fb5939
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Sat Aug 19 18:24:35 2017 +0300

    remove duplicate line

commit 520b8d9
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Sat Aug 19 18:06:42 2017 +0300

    unmute sessions

commit 8f18075
Merge: 7b04a78 020ad0e
Author: Dimitri Grammatikogianni <mit505@upshift.gr>
Date:   Fri Jul 21 14:04:08 2017 +0300

    Merge pull request #60 from ciar4n/install-style1

    Various bits

commit 7b04a78
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Fri Jul 21 13:42:13 2017 +0300

    clean up

commit 020ad0e
Author: ciar4n <ciaran@joomla51.com>
Date:   Fri Jul 21 11:24:58 2017 +0100

    Refactor alerts

commit 214db09
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Fri Jul 21 13:19:13 2017 +0300

    core needs patching

commit 2b5e924
Author: ciar4n <ciaran@joomla51.com>
Date:   Fri Jul 21 10:58:35 2017 +0100

    Compile SCSS

commit 3ffa406
Author: ciar4n <ciaran@joomla51.com>
Date:   Fri Jul 21 10:58:05 2017 +0100

    Add view/default.php

commit b0a580d
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Fri Jul 21 10:54:53 2017 +0300

    Use webcomponents for the alerts

commit 91272d2
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Thu Jul 20 20:53:07 2017 +0300

    easter egg, wow

commit a890a0b
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Thu Jul 20 19:45:12 2017 +0300

    do not fail

commit 00badb5
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Thu Jul 20 19:15:48 2017 +0300

    IIFE was a bad idea

commit 117426b
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Thu Jul 20 18:56:14 2017 +0300

    set focus to the rigth input between steps

commit 0df4e1b
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Thu Jul 20 18:44:59 2017 +0300

    smooth transitions in setup

commit 269d005
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Thu Jul 20 18:21:37 2017 +0300

    routing

commit 66b1cd7
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Thu Jul 20 15:28:20 2017 +0300

    better handling of the form

commit 8582cb6
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Thu Jul 20 14:39:05 2017 +0300

    recompile

commit e7135cf
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Thu Jul 20 14:24:36 2017 +0300

    session

commit 65bd548
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Thu Jul 20 14:08:10 2017 +0300

    styles

commit 2a41250
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Wed Jul 19 21:34:38 2017 +0300

    cleanup

commit 45a8af0
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Fri Jun 23 19:47:16 2017 +0300

    more

commit 405f799
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Tue Jun 6 11:36:50 2017 +0300

    morrere

commit 4eb2ef5
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Mon Jun 5 15:27:32 2017 +0300

    morerrererer

commit 6c3a285
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Sun Jun 4 13:55:25 2017 +0300

    morrrerer

commit faaca17
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Thu Jun 1 19:53:18 2017 +0300

    NOOOOOOOOOOOOOOOOOOOOOOOOO

commit 3eec79d
Merge: 4a91d2a d81f374
Author: Dimitri Grammatikogianni <mit505@upshift.gr>
Date:   Sun Jun 4 12:56:23 2017 +0200

    Merge pull request #58 from ciar4n/animate-form

    Animate that form - fix header

commit d81f374
Author: ciar4n <ciaran@joomla51.com>
Date:   Thu Jun 1 17:56:25 2017 +0100

    Animate that form

commit 4a91d2a
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Thu Jun 1 17:26:00 2017 +0300

    more

commit 09d0ce8
Merge: 98eadea b058ea6
Author: Dimitri Grammatikogianni <mit505@upshift.gr>
Date:   Thu Jun 1 14:57:39 2017 +0200

    Merge pull request #57 from ciar4n/form-split

    Form split

commit b058ea6
Merge: 97c32b4 98eadea
Author: Dimitri Grammatikogianni <mit505@upshift.gr>
Date:   Thu Jun 1 14:57:28 2017 +0200

    Merge branch '################4.0-dev-installation' into form-split

commit 97c32b4
Author: ciar4n <ciaran@joomla51.com>
Date:   Thu Jun 1 13:53:20 2017 +0100

    Split form

commit 98eadea
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Thu Jun 1 12:28:16 2017 +0300

    more

commit 14aa21c
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Thu Jun 1 12:28:16 2017 +0300

    more

commit e70bd5e
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Wed May 31 15:18:42 2017 +0300

    morrrrre

commit d38061a
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Wed May 31 11:34:24 2017 +0300

    more

commit b3730b7
Merge: e95fb4a 8d41267
Author: Dimitri Grammatikogianni <mit505@upshift.gr>
Date:   Wed May 31 10:34:59 2017 +0200

    Merge pull request #56 from ciar4n/post-install-ftp

    Post install ftp & lang select to header

commit 8d41267
Author: ciar4n <ciaran@joomla51.com>
Date:   Wed May 31 09:32:29 2017 +0100

    Move lang select to header

commit 6803dd0
Author: ciar4n <ciaran@joomla51.com>
Date:   Tue May 30 18:22:59 2017 +0100

    Post install FTP options

commit e95fb4a
Merge: e143c1a 7519981
Author: Dimitri Grammatikogianni <mit505@upshift.gr>
Date:   Tue May 30 17:00:42 2017 +0200

    Merge pull request #55 from ciar4n/password-icon

    Remove header margin - add password icon

commit 7519981
Author: ciar4n <ciaran@joomla51.com>
Date:   Tue May 30 15:57:15 2017 +0100

    Remove header margin - add password icon

commit e143c1a
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Tue May 30 17:24:48 2017 +0300

    preinstall

commit b8a55a7
Merge: a5213d6 1107db2
Author: Dimitri Grammatikogianni <mit505@upshift.gr>
Date:   Tue May 30 16:03:17 2017 +0200

    Merge pull request #54 from ciar4n/install-style

    Installation layout and style

commit 1107db2
Author: ciar4n <ciaran@joomla51.com>
Date:   Tue May 30 14:58:16 2017 +0100

    install-style

commit a5213d6
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Tue May 30 15:54:33 2017 +0300

    1 col

commit 9e85f1c
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Tue May 30 13:11:34 2017 +0300

    markup

commit 55eebdc
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Mon May 29 12:18:39 2017 +0300

    init
@joomla-cms-bot joomla-cms-bot added Language Change This is for Translators PR-4.0-dev labels Sep 15, 2017
// Redirect to the page.
$r = new stdClass;
$r->view = 'install';
$r->crap = 'setup';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This word does not belong in our codebase - please remove it

if ((new InstallationModelSetup)->checkForm('setup') === false || (new InstallationModelSetup)->initialise('setup') === false)
{
$r->messages = 'Check your DB credentials, db type, db name or hostname';
$r->crap = 'setup';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This word does not belong in our codebase - please remove it

@@ -103,6 +106,7 @@ INSTL_SAMPLE_DATA_SET_DESC="Install Joomla with one page (a menu with one link)
INSTL_SAMPLE_LEARN_SET_DESC="Install Joomla with example articles that describe how Joomla works."
INSTL_SAMPLE_TESTING_SET_DESC="Install Joomla with all possible menu items to help with testing Joomla."
INSTL_SUPER_USER_TITLE="Super User Account Details"
INSTL_CONNECT_DB="Connect the Database"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cant see where this string is being used from your screenshots but it should probably be "Connect to the Database"

INSTL_OUTPUT_BUFFERING="Output Buffering"
INSTL_PARSE_INI_FILE_AVAILABLE="INI Parser Support"
INSTL_PHP_VERSION="PHP Version"
INSTL_PHP_VERSION_NEWER="PHP Version >= %s"
INSTL_REGISTER_GLOBALS="Register Globals Off"
INSTL_SAFE_MODE="Safe Mode"
INSTL_SESSION_AUTO_START="Session Auto Start"
INSTL_WRITABLE="%s Writeable"
INSTL_WRITABLE="No sufficient permissions to create %s"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This string seems more confusing to me than before

@mbabker
Copy link
Contributor

mbabker commented Sep 15, 2017

  1. You can leave the non-English translations alone for now.
  2. There are two things I see missing from the screenshots that probably should be there: the "backup/restore database" option and the database table prefix field (I do a lot of installs against the git repo and would find it somewhat irritating if I had to manually clear the database each time I reset or end up with a database with 1000 tables because I didn't reset after 15 times)

commit f866778a5326b4e1c3db10f578ac48c43c66c653
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Sat Sep 2 22:51:17 2017 +0300

    more changes

commit 4207db197419c8a098feb1d68ef07d2247301986
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Sat Sep 2 19:03:35 2017 +0300

    fix the routing

commit ddb59ac
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Fri Sep 1 16:12:38 2017 +0300

    fixes, remove webcomponets

commit 727401a
Merge: 1b1726d 6981a18
Author: Dimitri Grammatikogianni <mit505@upshift.gr>
Date:   Fri Sep 1 15:35:45 2017 +0300

    Merge pull request #64 from ciar4n/style-postinstall

    Post install markup and style

commit 6981a18
Author: ciar4n <ciaran@joomla51.com>
Date:   Fri Sep 1 13:32:31 2017 +0100

    Post install markup and style

commit 1b1726d
Merge: 0a43128 42e5517
Author: Dimitri Grammatikogianni <mit505@upshift.gr>
Date:   Tue Aug 29 14:28:33 2017 +0300

    Merge pull request #63 from ciar4n/style-preinstall

    New style to preinstall

commit 42e5517
Author: ciar4n <ciaran@joomla51.com>
Date:   Tue Aug 29 12:24:20 2017 +0100

    New style to preinstall check

commit 0a43128
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Wed Aug 23 16:37:18 2017 +0300

    js fixes

commit 9974ee5
Merge: 8fb5939 48857fc
Author: Dimitri Grammatikogianni <mit505@upshift.gr>
Date:   Tue Aug 22 19:53:31 2017 +0300

    Merge pull request #62 from ciar4n/install-style

    Install re design

commit 48857fc
Author: ciar4n <ciaran@joomla51.com>
Date:   Tue Aug 22 17:50:20 2017 +0100

    Redesign

commit 8fb5939
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Sat Aug 19 18:24:35 2017 +0300

    remove duplicate line

commit 520b8d9
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Sat Aug 19 18:06:42 2017 +0300

    unmute sessions

commit 8f18075
Merge: 7b04a78 020ad0e
Author: Dimitri Grammatikogianni <mit505@upshift.gr>
Date:   Fri Jul 21 14:04:08 2017 +0300

    Merge pull request #60 from ciar4n/install-style1

    Various bits

commit 7b04a78
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Fri Jul 21 13:42:13 2017 +0300

    clean up

commit 020ad0e
Author: ciar4n <ciaran@joomla51.com>
Date:   Fri Jul 21 11:24:58 2017 +0100

    Refactor alerts

commit 214db09
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Fri Jul 21 13:19:13 2017 +0300

    core needs patching

commit 2b5e924
Author: ciar4n <ciaran@joomla51.com>
Date:   Fri Jul 21 10:58:35 2017 +0100

    Compile SCSS

commit 3ffa406
Author: ciar4n <ciaran@joomla51.com>
Date:   Fri Jul 21 10:58:05 2017 +0100

    Add view/default.php

commit b0a580d
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Fri Jul 21 10:54:53 2017 +0300

    Use webcomponents for the alerts

commit 91272d2
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Thu Jul 20 20:53:07 2017 +0300

    easter egg, wow

commit a890a0b
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Thu Jul 20 19:45:12 2017 +0300

    do not fail

commit 00badb5
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Thu Jul 20 19:15:48 2017 +0300

    IIFE was a bad idea

commit 117426b
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Thu Jul 20 18:56:14 2017 +0300

    set focus to the rigth input between steps

commit 0df4e1b
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Thu Jul 20 18:44:59 2017 +0300

    smooth transitions in setup

commit 269d005
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Thu Jul 20 18:21:37 2017 +0300

    routing

commit 66b1cd7
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Thu Jul 20 15:28:20 2017 +0300

    better handling of the form

commit 8582cb6
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Thu Jul 20 14:39:05 2017 +0300

    recompile

commit e7135cf
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Thu Jul 20 14:24:36 2017 +0300

    session

commit 65bd548
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Thu Jul 20 14:08:10 2017 +0300

    styles

commit 2a41250
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Wed Jul 19 21:34:38 2017 +0300

    cleanup

commit 45a8af0
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Fri Jun 23 19:47:16 2017 +0300

    more

commit 405f799
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Tue Jun 6 11:36:50 2017 +0300

    morrere

commit 4eb2ef5
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Mon Jun 5 15:27:32 2017 +0300

    morerrererer

commit 6c3a285
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Sun Jun 4 13:55:25 2017 +0300

    morrrerer

commit faaca17
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Thu Jun 1 19:53:18 2017 +0300

    NOOOOOOOOOOOOOOOOOOOOOOOOO

commit 3eec79d
Merge: 4a91d2a d81f374
Author: Dimitri Grammatikogianni <mit505@upshift.gr>
Date:   Sun Jun 4 12:56:23 2017 +0200

    Merge pull request #58 from ciar4n/animate-form

    Animate that form - fix header

commit d81f374
Author: ciar4n <ciaran@joomla51.com>
Date:   Thu Jun 1 17:56:25 2017 +0100

    Animate that form

commit 4a91d2a
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Thu Jun 1 17:26:00 2017 +0300

    more

commit 09d0ce8
Merge: 98eadea b058ea6
Author: Dimitri Grammatikogianni <mit505@upshift.gr>
Date:   Thu Jun 1 14:57:39 2017 +0200

    Merge pull request #57 from ciar4n/form-split

    Form split

commit b058ea6
Merge: 97c32b4 98eadea
Author: Dimitri Grammatikogianni <mit505@upshift.gr>
Date:   Thu Jun 1 14:57:28 2017 +0200

    Merge branch '################4.0-dev-installation' into form-split

commit 97c32b4
Author: ciar4n <ciaran@joomla51.com>
Date:   Thu Jun 1 13:53:20 2017 +0100

    Split form

commit 98eadea
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Thu Jun 1 12:28:16 2017 +0300

    more

commit 14aa21c
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Thu Jun 1 12:28:16 2017 +0300

    more

commit e70bd5e
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Wed May 31 15:18:42 2017 +0300

    morrrrre

commit d38061a
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Wed May 31 11:34:24 2017 +0300

    more

commit b3730b7
Merge: e95fb4a 8d41267
Author: Dimitri Grammatikogianni <mit505@upshift.gr>
Date:   Wed May 31 10:34:59 2017 +0200

    Merge pull request #56 from ciar4n/post-install-ftp

    Post install ftp & lang select to header

commit 8d41267
Author: ciar4n <ciaran@joomla51.com>
Date:   Wed May 31 09:32:29 2017 +0100

    Move lang select to header

commit 6803dd0
Author: ciar4n <ciaran@joomla51.com>
Date:   Tue May 30 18:22:59 2017 +0100

    Post install FTP options

commit e95fb4a
Merge: e143c1a 7519981
Author: Dimitri Grammatikogianni <mit505@upshift.gr>
Date:   Tue May 30 17:00:42 2017 +0200

    Merge pull request #55 from ciar4n/password-icon

    Remove header margin - add password icon

commit 7519981
Author: ciar4n <ciaran@joomla51.com>
Date:   Tue May 30 15:57:15 2017 +0100

    Remove header margin - add password icon

commit e143c1a
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Tue May 30 17:24:48 2017 +0300

    preinstall

commit b8a55a7
Merge: a5213d6 1107db2
Author: Dimitri Grammatikogianni <mit505@upshift.gr>
Date:   Tue May 30 16:03:17 2017 +0200

    Merge pull request #54 from ciar4n/install-style

    Installation layout and style

commit 1107db2
Author: ciar4n <ciaran@joomla51.com>
Date:   Tue May 30 14:58:16 2017 +0100

    install-style

commit a5213d6
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Tue May 30 15:54:33 2017 +0300

    1 col

commit 9e85f1c
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Tue May 30 13:11:34 2017 +0300

    markup

commit 55eebdc
Author: dgt41 <d.grammatiko@gmail.com>
Date:   Mon May 29 12:18:39 2017 +0300

    init
@brianteeman
Copy link
Contributor

@brianteeman
Copy link
Contributor

The language strings need updating to reflect the changes made in 3.8 for the word installation

@@ -32,22 +32,26 @@ public function execute()
// Check for request forgeries.
JSession::checkToken() or $app->sendJsonResponse(new Exception(JText::_('JINVALID_TOKEN'), 403));

// Check the form
$vars = (new InstallationModelSetup)->checkForm('database');
(new InstallationModelSetup)->checkForm('setup');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the models are being used multiple times just create it once and assign it to a variable. Don't create a new instance for every method call.

@@ -48,7 +48,7 @@ public function execute()
$app = $this->getApplication();

// Check for request forgeries.
JSession::checkToken() or $app->sendJsonResponse(new Exception(JText::_('JINVALID_TOKEN'), 403));
// JSession::checkToken() or $app->sendJsonResponse(new Exception(JText::_('JINVALID_TOKEN'), 403));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No idea why you've needed to comment out the CSRF checks but this should probably be fixed at some point...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be uncommented now, at some point there was a problem with the session and we had to mute all the checks to work with the installer....

@dgrammatiko
Copy link
Contributor Author

@mbabker

  1. all the languages need a total rewrite, there's no point to try to clean them out, we're using a small fraction of all the strings that 3.x is got there.
  2. The backup/restore is now always Backup!
  3. The table prefix is randomly generated in the client side, I don't see a reason to have that as an option, as it's something that most less experienced will be always confused with it, also the advanced users can do whatever they want, they don't need a GUI for that.

@brianteeman the language file needs a very good clean up, most strings should be deleted

;Minimum PHP error page
MIN_PHP_ERROR_LANGUAGE="English GB"
MIN_PHP_ERROR_HEADER="Sorry, your PHP version is not supported"
MIN_PHP_ERROR_TEXT="Your host needs to use PHP version {{phpversion}} or newer to run this version of Joomla!"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason for not using sprintf style placeholders here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these strings are for the first error page, which is plain html and js, so in this case the {{phpversion}} will be handled from the js client side

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds a bit overly complex to me to use JS to inject a server variable. 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, it's our only option, as this string refers to a page that is not delivered through blown app ( in fact this page is totally HTML+js, check installation/index.php )

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the installation/template/js/error-locales.js file there for? To me it seems like these strings would go in there, but that would be somewhat problematic asking all translation teams to update that specific file.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We won't, this is automated through grunt 😉

@@ -74,8 +108,8 @@ public function createConfiguration($options)
$registry->set('access', 1);

// Debug settings.
$registry->set('debug', false);
$registry->set('debug_lang', false);
$registry->set('debug', 0);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a lot of changes being incorrectly reverted here...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably it has to do with my inability to merge correctly the changes of the latest 4.0 repo to my local branch. I will have to go through all these then...

@brianteeman
Copy link
Contributor

I dont understand the reasoning in the final screenshot for the words "Complete and ..."
We already know it is complete as the page title says so

@dgrammatiko
Copy link
Contributor Author

@wilsone the languages part is working again thanks to @laoneo

@wilsonge
Copy link
Contributor

Can you fix conflicts please and I'll give another quick test :)

@infograf768
Copy link
Member

I still have the same issue here. I can, via eclipse, update the local 4.0 branch, but if I do that, I just can't install J anymore. I get a blank page.
Also, Eclipse tells me some of the "deleted" installation language files have errors in the patch.

In any case please, DO keep the 3 languages that can be used in multilanguage, i.e. de-DE, fa-IR and fr-FR, languages packs that, if it works, can be can installed during J installation.

@dgrammatiko
Copy link
Contributor Author

@infograf768 well one solution is to not use Eclipse, just git fetch, pull should do the trick. I have no clue why Eclipse is messing up here...

The en-UK needs clean up, which obviously is not a task that I can do. Once this is done (probably in another PR) then we can figure out what's the best course of action for the rest languages (I need to state that the way this is handled currently in J3 is really bad, from maintenance point of view).
Anyways you can still check the multilingual part by copying some languages for the 3.x repo

@brianteeman
Copy link
Contributor

@dgt41 en-GB - we are not in the Ukraine ;)

@dgrammatiko
Copy link
Contributor Author

@brianteeman oops, sorry en-GB is the right one. But you never know with this Brexit where you will end up at the end 😂

@brianteeman
Copy link
Contributor

UK is an EU thing ;)

@infograf768
Copy link
Member

@dgt41
I tested again by downloading your branch.
Before even getting to install languages I get

[28-Oct-2017 08:01:15 Europe/Berlin] PHP Warning:  mysqli::real_escape_string(): invalid object or resource mysqli
 in /Applications/MAMP/htdocs/joomla-cms-4.0-dev-installation-PR/libraries/vendor/joomla/database/src/Mysqli/MysqliDriver.php on line 330
[28-Oct-2017 08:01:15 Europe/Berlin] PHP Warning:  mysqli::real_escape_string(): invalid object or resource mysqli
 in /Applications/MAMP/htdocs/joomla-cms-4.0-dev-installation-PR/libraries/vendor/joomla/database/src/Mysqli/MysqliDriver.php on line 330
[28-Oct-2017 08:01:15 Europe/Berlin] PHP Warning:  mysqli::prepare(): invalid object or resource mysqli
 in /Applications/MAMP/htdocs/joomla-cms-4.0-dev-installation-PR/libraries/vendor/joomla/database/src/Mysqli/MysqliDriver.php on line 841
[28-Oct-2017 08:01:15 Europe/Berlin] PHP Warning:  mysqli::ping(): invalid object or resource mysqli
 in /Applications/MAMP/htdocs/joomla-cms-4.0-dev-installation-PR/libraries/vendor/joomla/database/src/Mysqli/MysqliDriver.php on line 364

The configuration.php file is created OK.

Then after choosing a language to download/install I get in a loop (Remember: de-DE, fr-FR and fa-IR CAN be installed in j4 and do install fine when J4 is installed and we use Install Languages from Installation)
dgtinstallation

Then if I delete configuration.php AND the db created and start again installing, I get this.
dgtinstallation_3
hard to read, but the text is

An error has occurred while processing your request.

    1045 Access denied for user 'root'@'localhost' (using password: NO) 

Hmm, session issue maybe?
Now trying to install with Safari.
Can't switch language.
dgtinstallation_4_safari

Going on and using a different database name and prefix, I get again
1045 Access denied for user 'root'@'localhost' (using password: NO)

and this error

[28-Oct-2017 08:27:30 Europe/Berlin] PHP Notice:  Undefined variable: return in /Applications/MAMP/htdocs/joomla-cms-4.0-dev-installation-PR/installation/src/Controller/LanguageController.php on line 54
[28-Oct-2017 08:27:30 Europe/Berlin] PHP Notice:  Undefined variable: return in /Applications/MAMP/htdocs/joomla-cms-4.0-dev-installation-PR/installation/src/Controller/LanguageController.php on line 65
[28-Oct-2017 08:27:30 Europe/Berlin] PHP Notice:  Undefined variable: return in /Applications/MAMP/htdocs/joomla-cms-4.0-dev-installation-PR/installation/src/Controller/LanguageController.php on line 68

@infograf768
Copy link
Member

Concerning the Undefined variable: return Notice, it looks like is missing the validate.
i.e. we should have

		// Must load after serving service-requests
		$form = $model->getForm();

		// Get the posted values from the request and validate them.
		$data   = $this->input->post->get('jform', [], 'array');
		
		// Validate the posted data.
		$return = $model->validate($form, $data);

But it will not change the results I got.

@dgrammatiko
Copy link
Contributor Author

Then if I delete configuration.php AND the db created and start again installing, I get this.

That's not enough, you need to clean also the session in installation/cache (or session I don't remember this on top of my head)

Now trying to install with Safari

Well my dev browser is safari...

@infograf768
Copy link
Member

@dgt41
deleted all and started from scratch
On Safari OR Firefox, I can't change installation language.
Included in this screenshot is the session which was empty before starting installation.
testchangelang2

Let's talk on glip please.

@wilsonge
Copy link
Contributor

wilsonge commented Nov 2, 2017

I've done a quick test. I've done a nasty hack for en-US

Occasionally I got this 1045 - but never reproducibly - I could force it with incorrect authentication information to the database - and we need to improve the styling of the error page. But I couldn't reliably do it otherwise.

I'm going to merge this so we have a base to work with. Please feel free to create further issues so we can improve further

@wilsonge wilsonge merged commit 6815990 into joomla:4.0-dev Nov 2, 2017
@wilsonge wilsonge added this to the Joomla 4.0 milestone Nov 2, 2017
@dgrammatiko dgrammatiko deleted the 4.0-dev-installation-PR branch November 2, 2017 21:17
@PhocaCz
Copy link
Contributor

PhocaCz commented Nov 13, 2017

@dgt41

Hi,

The table prefix is randomly generated in the client side, I don't see a reason to have that as an option, as it's something that most less experienced will be always confused with it, also the advanced users can do whatever they want, they don't need a GUI for that.

Maybe I don't understand it correctly, but what will be the way for advanced users to change the prefix while installing Joomla!?

Thank you.

@infograf768
Copy link
Member

Agree with @PhocaCz AND in any case, as I reported to @dgt41 I CAN'T INSTALL anymore locally.

URL:
http://localhost:8888/joomla40/installation/index.php?view=setup

Result
install40

It is not a minor bug...

@dgrammatiko
Copy link
Contributor Author

but what will be the way for advanced users to change the prefix while installing Joomla!?

Ehm, we already change that. Now that field exists in the form (pre filled with a random prefix, but users can change it to whatever they like)

I CAN'T INSTALL anymore locally.

Please make sure that you delete all all the session files in your installation/sessions folder and clear your browser's cookies!

@infograf768
Copy link
Member

I DID, as I already told you privately the other day!!
And this is a totally clean install. So I did clear again all sessions cookies.
This thing is just badly broken here.
You were wondering if it was related to the use of the port. Time to look where is the real problem.

@dgrammatiko
Copy link
Contributor Author

@infograf768 can you provide some info (phpinfo, and your actual installation URL) maybe in glip

@infograf768
Copy link
Member

See #18560

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Language Change This is for Translators
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet