?
avatar Formatio-hippocampi
Formatio-hippocampi
1 Sep 2020

Steps to reproduce the issue

  • Clean install J4
  • Shared Sessions "Yes"
  • Frontend: open Module
  • Select Language is disabled:
    Screen Shot 2020-09-01 at 08 16 16

Same at Article.

Expected result

Select Language enabled

Actual result

Select Language disabled

System information (as much as possible)

php: Linux lamp121.cloudaccess.net 2.6.32-673.8.1.lve1.4.3.1.el6.x86_64 #1 SMP Thu May 5 16:06:47 EDT 2016 x86_64
dbserver: mysql
dbversion: 5.7.29-cll-lve
dbcollation: utf8_general_ci
dbconnectioncollation: utf8mb4_general_ci
dbconnectionencryption:
dbconnencryptsupported: true
phpversion: 7.3.19
server: Apache
sapi_name: cgi-fcgi
version: Joomla! 4.0.0-beta4-dev Development [ MaƱana ] 29-July-2020 18:21 GMT
useragent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:80.0) Gecko/20100101 Firefox/80.0

Additional comments

Clean install J3 Select Language is enabled in Frontend.

avatar Formatio-hippocampi Formatio-hippocampi - open - 1 Sep 2020
avatar joomla-cms-bot joomla-cms-bot - change - 1 Sep 2020
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 1 Sep 2020
avatar infograf768
infograf768 - comment - 1 Sep 2020

Is your J4 site set as multilingual?

avatar Formatio-hippocampi
Formatio-hippocampi - comment - 1 Sep 2020

Yes, done by "Multilingual Sample Data":
Screen Shot 2020-09-01 at 08 43 49

avatar SharkyKZ
SharkyKZ - comment - 1 Sep 2020

This is intentional and same as in J3:

// If multi-language site, make language read-only
if (JLanguageMultilang::isEnabled())
{
$this->form->setFieldAttribute('language', 'readonly', 'true');
}

Although done in a totally wrong way.

avatar infograf768
infograf768 - comment - 1 Sep 2020

Here, in J3, as well as in J4, when the site is multilingual, the language cannot be changed in frontend, shared session or not. This is on purpose to avoid messing with the site.
J3 site
Screen Shot 2020-09-01 at 08 48 24

avatar infograf768
infograf768 - comment - 1 Sep 2020

oops, @SharkyKZ was faster

avatar infograf768
infograf768 - comment - 1 Sep 2020

Although done in a totally wrong way.

Could you elaborate?

avatar Formatio-hippocampi
Formatio-hippocampi - comment - 1 Sep 2020

Thanks @infograf768 @SharkyKZ for Information.

avatar Formatio-hippocampi Formatio-hippocampi - close - 1 Sep 2020
avatar Formatio-hippocampi Formatio-hippocampi - change - 1 Sep 2020
Status New Closed
Closed_Date 0000-00-00 00:00:00 2020-09-01 06:53:33
Closed_By Formatio-hippocampi
avatar jiweigert
jiweigert - comment - 1 Sep 2020

Good time to do it in the right way.


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

avatar SharkyKZ
SharkyKZ - comment - 1 Sep 2020

@infograf768 First, forms shouldn't never be manipulated in the view. This should be done in the controller or the model. Otherwise changes are not reflected when validating. Secondly, setting readonly attribute even in the right place doesn't prevent field modification. Value can still be manipulated through DOM. In general form validation is broken all over ? .

avatar infograf768
infograf768 - comment - 1 Sep 2020

We should do something.
It is an important piece of information to know to which language the module was tagged when editing it. Or the article.

avatar Formatio-hippocampi Formatio-hippocampi - change - 1 Sep 2020
Status Closed New
Closed_Date 2020-09-01 06:53:33
Closed_By Formatio-hippocampi
avatar Formatio-hippocampi
Formatio-hippocampi - comment - 1 Sep 2020

Reopen for "do it in the right way".

avatar Formatio-hippocampi Formatio-hippocampi - reopen - 1 Sep 2020
avatar infograf768
infograf768 - comment - 1 Sep 2020

@Formatio-hippocampi
This issue should not be re-opened as its description is not related to the issue described by @SharkyKZ

avatar Formatio-hippocampi Formatio-hippocampi - change - 1 Sep 2020
Status New Closed
Closed_Date 0000-00-00 00:00:00 2020-09-01 07:28:18
Closed_By Formatio-hippocampi
avatar Formatio-hippocampi Formatio-hippocampi - close - 1 Sep 2020
avatar brianteeman
brianteeman - comment - 1 Sep 2020

. In general form validation is broken all over

I've said that for two years but no one listens

Add a Comment

Login with GitHub to post a comment