No Code Attached Yet Information Required
avatar infograf768
infograf768
2 Jul 2020

Steps to reproduce the issue

Install a clean 4.0-dev.
When you get to the first screen which lets you Install Additional Languages, click to install a new language.
Select or French fr-FR or German de-DE and click Next button.

Test 1
In the next screen choose a default admin and site language (default to en-GB is OK) and click on Set default language (no need for a chevron there).
Then click again on Install Additional Languages button (the chevron should be left and placed before the text in LTR, the opposite in RTL).
Select a language you did not install formerly (French or German) and click Next button


Test 2 (with a new clean install)

Do not click on Set default language but click again on Install Additional Languages
Do NOT select any language and click on Next button.
IMPORTANT NOTE FOR test2:
Test can also be done when we first access to Install Additional Languages and do not choose any language to install although we do have some message for that in the controller (and that message is not displayed...)

	public function languages()
	{
		$this->checkValidToken();

		// Get array of selected languages
		$lids = $this->input->get('cid', [], 'array');
		$lids = ArrayHelper::toInteger($lids, []);

		if (!$lids)
		{
			// No languages have been selected
			$this->app->enqueueMessage(Text::_('INSTL_LANGUAGES_NO_LANGUAGE_SELECTED'), 'warning');
		}
		else
		{
			// Get the languages model.
			/** @var \Joomla\CMS\Installation\Model\LanguagesModel $model */
			$model = $this->getModel('Languages');

			// Install selected languages
			$model->install($lids);
		}

		// Redirect to the page.
		$r = new \stdClass;
		$r->view = 'remove';

		$this->sendJsonResponse($r);

Apparently, one of the problem here, which makes it behave differently in J4 vs J3 is that we are in the same remove view (J3 uses the defaultlanguage view. for the redirect). The other is that the method used is languages() and not the specific execute.

Expected result

Test1
The language is installed and we are redirected again to the screen when one can choose default site and admin languages. OR the Install Additional Languages button should not be displayed anymore.

Test2
We are redirected to the former screen where you can select default languages, etc.

Actual result

Test 1
We get a token error.

installationtokenerror

Test 2
We get a warning

Screen Shot 2020-07-02 at 10 44 44

For both tests, only way to get out of this screen is then to click on Skip button.

avatar infograf768 infograf768 - open - 2 Jul 2020
avatar joomla-cms-bot joomla-cms-bot - change - 2 Jul 2020
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 2 Jul 2020
avatar infograf768
infograf768 - comment - 2 Jul 2020
avatar astridx
astridx - comment - 2 Jul 2020
  1. Install a clean 4.0-dev and made sure, that no language is left from a previous installation.
  2. I clicked to install a new language and selected de-DE and installed it via next.

Test 1
3. I choosed German for admin and site default language and clicked on set default language
4. I clicked again on install additional language and installed fa-IR

Everything was fine, no token error.

Test 2
5. I deleted the configuration.php and the languages (de-DE, fa-IR) in the site and admin language folders.
6. i deleted the cache
7. I made a new installation
8. I installed fr-FR as additional language
9. I did NOT change the default language
10. I clicked again on install additional language
11. I clicked on next
12. I see the warning Warning No languages have been selected to be installed.

That is fine for me.

If I select after step 12 a language and click on next again, everything is fine. If I click on skip, the form is messed up.

The only thing I notice: The form looked messed up, if you click on on the Skip-Button, because the the first section is missing (congrads).

I tested in firefox and google chrome on ubuntu.

avatar infograf768
infograf768 - comment - 2 Jul 2020

Houston, we have a problem...
I am testing on macintosh Firefox with Mamp

avatar infograf768
infograf768 - comment - 3 Jul 2020

Tested again. I still have the token issue. I have to click a second time on Next after selecting a language when I go back to Install Additional Languages for it to work fine.

@astridx
Could that help you find out what's going on?

Note: I can't reproduce anymore the test2 findings above. I do rightfully get No languages have been selected to be installed., the only difference with J3 being that the same page is displayed instead of automatically going to next page, therefore forcing to use Skip.

avatar chmst
chmst - comment - 3 Jul 2020

My experinece on win10, xampp, php version 7.4

install additional language (chervron always is right on the button)
choose german and cklick button next
install german
set german as default.

install additional language
choose french and click next

The token error comes as described.


install additional language (chervron right on the button)
choose german and cklick button next
install german

install additional language
no language selected

Warning
No languages have been selected to be installed (as expected)

choose french
click next
french is installed (as expected)

avatar infograf768
infograf768 - comment - 3 Jul 2020

Tks for testing @chmst
Good to know that I am not totally Covided. ?

avatar astridx
astridx - comment - 3 Jul 2020

@chmst Thank you

Am I missing something? Does anyone see this token error message on Linux?

avatar richard67
richard67 - comment - 4 Jul 2020

Does anyone see this token error message on Linux?

Test 1: I can reproduce the token error when exactly proceeding as described in the description and in @chmst 's test here #29896 (comment) . Server is Apache 2.4 on Kubuntu 19.10, which is a kind of Linux, PHP 7.3, MySQL 8.0.20, Browser = Firefox 78.0.1 (64-Bit) on Windows 10.

avatar richard67
richard67 - comment - 4 Jul 2020

@astridx Did you mean server on Linux, or did you mean also Browser on Linux?

avatar jwaisner jwaisner - change - 5 Jul 2020
Status New Confirmed
avatar Quy Quy - change - 28 May 2022
Labels Added: No Code Attached Yet Information Required
Removed: ?
avatar Quy Quy - labeled - 28 May 2022
avatar infograf768 infograf768 - change - 28 Jun 2022
Status Confirmed Closed
Closed_Date 0000-00-00 00:00:00 2022-06-28 07:41:14
Closed_By infograf768
avatar infograf768 infograf768 - close - 28 Jun 2022

Add a Comment

Login with GitHub to post a comment