I've tested this with a few views and the behavior is always the same. The path for nodes with languages other then the current one, will always be "CURRENT LANGUAGE"/node/"NID" but not the aliased path. It works perfectly for nodes with current language.
Repeatable: Always
Steps to repeat:
- add at least one translation of a node with aliased path
- setup a view with only path field display and select the nid of the translated node (with contextual filters or just filters)
Expected Results:
Paths like "de/meine-erste-node" when current language is "english".
Actual Results:
Paths like "en/node/2" when current language is "english".
Is there any way to fix this? I am currently trying to replace the query for this simple view but i haven't managed to get it working.
Comments
Comment #1
Anonymous (not verified) CreditAttribution: Anonymous commentedI've tried this code to replace the default query created by views:
I need to get this working with views since i render nodes with views_datasource into json and want to add translated paths to it. The paths are in url_alias table and views_datasource is not the problem. Paths still broken even when displayed plain from views.