Closed (fixed)
Project:
Domain Path
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
9 Oct 2013 at 15:15 UTC
Updated:
17 May 2023 at 20:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
brettbirschbach commentedHere's the patch.
Comment #2
brettbirschbach commentedComment #3
scottalan commentedI wasn't able to get this patch to apply without running
patch -p1 < [patch]. I need this to apply with git apply so I re-rolled the same exact patch but will apply with git apply during a drush make or withcurl http://drupal.org/files/[patch-name].patch | git apply -Comment #4
scottalan commentedComment #5
scottalan commentedI need to review this further as I'm not sure this is fixing the problem I'm having. I am unable to see the domain paths, however the patch does not bring them back. I will debug when I get a chance and hopefully come up with a fix. Each of the path fields/labels are set to {display: none} ??
Comment #6
rsvelko commentedtested : this patch fixes the issue in title. And the issue was really nasty before the patch.
Comment #7
rsvelko commentedthe patch is:
diff --git a/domain_path.module b/domain_path.module
--- a/domain_path.module
+++ b/domain_path.module
@@ -310,7 +310,8 @@ function domain_path_form_node_form_alter(&$form, $form_state) {
foreach ($domains as $domain_id => $domain) {
$path = FALSE;
if ($nid) {
- $path = domain_path_lookup_path('alias', 'node/' . $nid, $domain_id);
+ $lang = empty($form['#node']->language) ? NULL : $form['#node']->language;
+ $path = domain_path_lookup_path('alias', 'node/' . $nid, $domain_id, $lang);
}
$default = '';
I checked the domain_path_lookup_path - function - whether it expects LANGUAGE_NONE or NULL when no-language is set in a non-multilang site.
Patch is ok cause exactly NULL is expected in this case.
So the line
+ $lang = empty($form['#node']->language) ? NULL : $form['#node']->language;
is correctly setting lang to null and NOT to LANGUAGE_NONE when empty...
Comment #8
alberto56 commentedJust changing the title to avoid confusion with #2908039: Domain paths will not appear on node edit form if there are more than 25 domains
Comment #9
joekersPatch works for me in that I don't lose my existing aliases when saving a translation, however I can't save an alias for a translation - not sure if that's just not supported by the module or actually an issue?
Comment #10
joekersI ended up using patches from #2809155: Support multi language (which includes this patch) and #2033875: Add Entity Translation support.
Comment #11
agentrickardThis module could use a new maintainer, so if anyone is interested, please open an issue.
Comment #13
i-trokhanenkoCommitted patch #3
Comment #14
i-trokhanenkoThanks