Needs work
Project:
UUID Link
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
30 Sep 2013 at 17:57 UTC
Updated:
17 Oct 2014 at 13:11 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
sylus commentedAttaching patch.
Comment #2
sylus commentedAttaching patch.
Comment #3
sylus commentedBetter guarding.
Comment #4
joseph.olstadAfter applying this patch langcode still defaulting to english even if in other language with properly encoded uuid link.
time for xdebug
Comment #5
sylus commentedJust spend the last few hours on this and got it fixed but with quite a few hacks. Will post it here once clean up dpm's.
Comment #6
joseph.olstadShooting in the dark here but I'm guessing something along the lines of:
- 'language' => $languages[$langcode],
+ 'language' => $language->language,
? anyhow, curious to see the fix.
Comment #7
sylus commentedUpdating patch.
1) token_replace needs to be passed in langcode from filter_preprocess
2) i had to make the replacements variable non-static as with field translation it was always only eventually passing one language (maybe should use drupal_static?)
3) am now calling entity_uri vs node_uri and completely bypassing the uuid_link_entity_url so no doubt have broken support for non node related entities.
However the languages are fully working now in nodes.
Comment #8
sylus commentedWhoops had a few more lines could have removed. Here we go.
Comment #9
sylus commentedUpdating the patch.
Comment #10
skwashd commentedThanks for the patch. Overall I'm in favour of this. The whitespace/coder compliance changes while welcomed make it more difficult to read the patch.
There are 2 things I have concerns about.
Instead of removing these docs they should be retained and updated.
Initialising options as an empty array before the if() block removes the need for the else. You can then also have
$options['language'] = $languages[$langcode];in the if() block.