Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 291919

Different contextual view result in a site with multilingual enabled

$
0
0

Problem/Motivation

Hi everyone
Here is to report different number of output of a view built with contextual filters in a multilingual setup. Since my knowledge is limited I do not report this as a bug report but it should be if everything is handled correctly.

To be precise, contextual filters has been used to provide article aside block content and the block contains, information about the user, user full name, and the photo of user. The block is generated with correct information in respect with the language translation, so in the default site with the primary language 1 block is shown. Although in the second language or the translated site 2 block is generated with exact information! This output is despite the fact that the translation content filters for the user, content, and taxonomy is correct and functioning.
The question is why view module generated 2 blocks for the second language?
Please find attached the screen shots from the settings and view generated output. The test was done by simplytest.me ( Drupal core setup 9.3.2 )

Steps to reproduce

Install Drupal Core 9.3.2
Install Localization module + Translation capabilities
Add a second language and make it the default choice
Customize the detection and language settings to recognize path and language interface both from content and site wide.
Enable content type translation for article, user
Customize user field and add Full Name field (Text, Plain), Enter sample name for both languages, add picture to user. done.
Add an article, add content for both language.
Create a view in block format (article aside) and make it contextual aware by selecting contextual filters of Content ID from URL, do not select "Exclude" option to view filter the fields with the current content ID.
Add relationship to view content author.
Add field to the block: content title, user, "Full Name", and User Picture
Add relationship of User and user picture to retrieve the appropriate content.
Apply three content filters to the content "Translation language" of content, user, and taxonomy.
Filter all based on interface index language !important

See the result in the aside block.

Proposed resolution

In my perspective, the contextual filters are functioning, relationship are taken to account, but the content filters in the secondary language would be maybe missing a fourth filter!? Or probably there is some issue with the contextual filters at the second language site which see the 2 URL from the content ID filter, should be a bug or miss-configuration, not sure?

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet


Viewing all articles
Browse latest Browse all 291919

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>