? ? Pending

User tests: Successful: Unsuccessful:

avatar roland-d
roland-d
4 Jun 2019

Summary of Changes

Trying to install a language during the installation routine, it requires the JNamespacePsr4Map class. However this class is never loaded in the installation routine.

Testing Instructions

  1. Start the Joomla installation routine
  2. When Joomla is installed you get to the following page:

image

3. Click on the `Customize Installation` 4. Select the `French` language and scroll all the way down 5. Open the Developer Console (F12) 6. Open the Network tab in the Developer console 7. Click Next 8. You are now back on the page saying `Congratulations! Your Joomla site is ready.` 9. In the Network tab, click on the URL and you see this:

image

10. Notice the text `"message":"Class 'JNamespacePsr4Map' not found"}` and the `"error":true` 11. Apply the patch 12. Click on the `Customize Installation` 13. Select the `French` language and scroll all the way down 14. Click on Next 15. You are now back on the page saying `Congratulations! Your Joomla site is ready.` 16. Click on the `Customize Installation` 17. Notice that French is no longer in the list of available languages to install. The languages has now been installed. 18. You can also check the Developer console as it now looks like this:

image

19. Notice the `"error":false` 20. The issue has now been fixed :)

Expected result

The language installs without error

Actual result

The language does not install due to an error

Documentation Changes Required

None

avatar roland-d roland-d - open - 4 Jun 2019
avatar roland-d roland-d - change - 4 Jun 2019
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 4 Jun 2019
Category Installation
avatar infograf768
infograf768 - comment - 5 Jun 2019

This breaks install of a clean 4.0 here:
Screen Shot 2019-06-05 at 10 09 13

avatar infograf768
infograf768 - comment - 5 Jun 2019

@roland-d
I solved the issue by moving

		// Ensure we load the namespace loader
		$this->createExtensionNamespaceMap();

to the doExecute() method.
i.e.

	/**
	 * Method to run the Web application routines.
	 *
	 * @return  void
	 *
	 * @since   3.1
	 */
	protected function doExecute()
	{
		// Ensure we load the namespace loader
		$this->createExtensionNamespaceMap();

		// Initialise the application.
		$this->initialiseApp();

		// Dispatch the application.
		$this->dispatch();
	}

as done in
/build/stubGenerator.php

avatar infograf768 infograf768 - change - 5 Jun 2019
Title
Make sure the namespace autoloader exists
[4.0] J Installation: Install Languages. Make sure the namespace autoloader exists
avatar infograf768 infograf768 - edited - 5 Jun 2019
avatar roland-d roland-d - change - 5 Jun 2019
Labels Added: ?
avatar roland-d
roland-d - comment - 5 Jun 2019

@infograf768 When do you get this? When I open the Joomla site I get this:
image

This is the URL /installation/index.php

avatar Quy
Quy - comment - 5 Jun 2019

I got the same error.
Download your branch.
Run composer install and npm ci.
Proceed to install in browser:
http://localhost/joomla-cms-feature-language-installation-error/installation/index.php

avatar roland-d
roland-d - comment - 6 Jun 2019

@Quy, I followed your steps and still get the normal installation screen.

The reason I put it in the InstallationApplication is because in the main CMS this code is also located in the CMSApplication and ConsoleApplication. So the InstallationApplication looks like the logical place to put it.

I would like to know what the actual error is. The message shown now is just a user message and not the actual error itself.

Later I will test it on another machine and see what happens there.

avatar infograf768
infograf768 - comment - 6 Jun 2019

It is OK to place it in InstallationApplication imho.
It is the placement of $this->createExtensionNamespaceMap(); which has solved the issue here.
Can you test with my proposal?

avatar roland-d
roland-d - comment - 7 Jun 2019

@infograf768 Putting the code in doExecute() also works for me. I just really wonder why it in the __construct() works for me.

Let's keep it in doExecute if it works for the majority :)

avatar infograf768
infograf768 - comment - 7 Jun 2019

I have tested this item successfully on 58fff76


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

avatar infograf768
infograf768 - comment - 7 Jun 2019

I have tested this item successfully on 58fff76


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

avatar infograf768 infograf768 - test_item - 7 Jun 2019 - Tested successfully
avatar infograf768
infograf768 - comment - 8 Jun 2019

@Quy
Can you please test again so that we get at last rid of this issue?

avatar Quy
Quy - comment - 8 Jun 2019

I have tested this item successfully on 22482d2


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

avatar Quy Quy - test_item - 8 Jun 2019 - Tested successfully
avatar Quy Quy - change - 8 Jun 2019
Status Pending Ready to Commit
avatar Quy
Quy - comment - 8 Jun 2019

RTC


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

avatar Quy
Quy - comment - 8 Jun 2019

RTC


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

avatar SniperSister SniperSister - change - 8 Jun 2019
Labels Added: ?
avatar infograf768 infograf768 - change - 9 Jun 2019
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2019-06-09 05:32:15
Closed_By infograf768
avatar infograf768 infograf768 - close - 9 Jun 2019
avatar infograf768 infograf768 - merge - 9 Jun 2019
avatar infograf768
infograf768 - comment - 9 Jun 2019

Thanks!

Add a Comment

Login with GitHub to post a comment