User tests: Successful: Unsuccessful:
Pull Request for Issue # ?.
This PR replaces the missing JPATH_COMPONENT_SITE
constant in mod_languages's LanguagesHelper.php by JPATH_SITE . '/components/' . $component->option
.
The ComponentRecord object is fetched a few lines above with $component = $app->bootComponent($app->input->get('option'));
Have a multilingual site with item associations enabled and PHP error reporting set to developer.
Edit an article which is tagged to a particular language.
Check for PHP notices/warnings/errors.
No PHP notice about missing constants in LanguagesHelper.php.
PHP Notice: Use of undefined constant JPATH_COMPONENT_SITE - assumed 'JPATH_COMPONENT_SITE' in /joomla4home/modules/mod_languages/Helper/LanguagesHelper.php on line 81
No.
Status | New | ⇒ | Pending |
Category | ⇒ | Modules Front End |
Strange, I can't reproduce the error anymore with the unmodified file.
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-07-15 10:43:53 |
Closed_By | ⇒ | richard67 | |
Labels |
Added:
?
|
I was going to say that I do not have the error/notice here (last 4.0-dev) and, worst, your patch throws a Notice as $component->option
is always NULL
Notice: Undefined property: Joomla\Component\Content\Administrator\Extension\ContentComponent::$option in /Applications/MAMP/htdocs/installmulti/joomla40/modules/mod_languages/Helper/LanguagesHelper.php on line 72
In the mean while, we do have quite an issue with the home pages. I used multilingual sample data.
As you know, they do not need to be associated formally as they are associated de facto by the languagefilter.
But although whatever.com/en or whatever.com/fr work fine, the switcher gives
/en?view=category&id=8
and
/fr?view=category&id=9
Could you have a look?
I was wondering anyway why a change in the language switcher module should have an impact on editing articles in the backend, but that's what I had observed. Anyway it seems this PR is wrong so it is good that I closed it.
@infograf768 Me? Have a look on routing in 4.0? I only observed that it is broken at several places, but I know too little about the implementation to be able to help. And my 4.0-dev here is not a clean new install, so I think it is broken somehow, I have to fix that first.
@infograf768 Yes, strange, have a new 4.0-dev with multilanguage sample and have switched sef urls on in global config, and remove IDs from URLs on in com_content integration options, and I see such links, too, so I can confirm your finding.
I have tested when homes are a contact and when homes are single articles.
In this case it works fine.
So, the issue appears for content category.
Will create issue.
@infograf768 @wilsonge Please review.