Closed (fixed)
Project:
Workbench Moderation
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 Mar 2013 at 22:26 UTC
Updated:
13 Feb 2015 at 08:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
joel_osc commentedHere is a patch which seems to fix it by changing how workbench moderation decides on the path language. I just copied the method from the path module which uses "$langcode = entity_language('node', $node);"
Comment #2
alanburke commentedExcellent work.
Comment #3
weri commentedWe had the same problem with the path alias in the described scenario.
I applied and tested the patch. The patch works great and solves the problem.
Thanks for the patch!
Comment #4
cmoad commented+1 on getting this pushed. We had the same problem.
Comment #5
cristiroma commentedWe found an issue with the following piece of code from the patch:
The problem is that the $node->language is ALWAYS the source language, not the current language. Thus pathauto will break the alias for english language.
Imagine the following scenario
1. Add new node in english (node/42)
url_alias is
481 | node/42 | articles/eeee | en
2. Add translation in romanian using "Add" from Translate tab. The table will look like this
482 | node/42 | articles/eeee | ro
481 | node/42 | articles/eeee | ro
So the english alias is lost., this is because path_load($conditions); will load the english alias instead of romanian one.
The proposed patch is to replace with
Note: Also having some double-thoughts about running this from command line, like "drush migrate-import" with translations ...
Comment #6
joel_osc commentedNot sure what you are saying about the patch, in it I remove the following lines:
Comment #7
cristiroma commentedYes, nevermind, was a little bit tired. Apologies for this mistake.
We just tested your patch and works perfectly :)
Comment #9
colanComment #10
colanForgot to set this up for forward porting.
Comment #11
das-peter commentedDoes not apply to the 2.x branch, it uses State Machine / State Flow and thus we don't have such code anymore.