Publisher does not support the Fluid field type. Please do not contact asking when support will be available.
If you purchased an add-on from expressionengine.com, be sure to visit boldminded.com/claim to add the license to your account here on boldminded.com.
Ticket: {path=‘shop/product/{url_title}’} uses wrong domain
Status | Resolved |
Add-on / Version | Publisher Domain Control 3.3.4 |
Severity | |
EE Version | 5.4 |
Studioweb
Mar 04, 2021When using {path='shop/product/{url_title}’} in our product list view, the link is using the main domain.
BoldMinded (Brian)
Is this an MSM site?
You might have to re-add the ftp and cp login to the ticket. Since the last ticket was closed it was deleted from my db.
Studioweb
I’ve added the credentials. No, we’re not using a MSM but do user Publisher Domain Control addon.
BoldMinded (Brian)
How do I re-create this issue? What Url do I go to and what template file is it using?
BoldMinded (Brian)
Can you give a more detailed description? You said the link is using the main site? So what are you seeing and what do you expect to see?
BoldMinded (Brian)
It does not appear as if shop/product is an existing template, so what type of URL is it? I really need more information before I can spend more time on this. Please provide a URL to re-create the issue, describe what type of URL this is, is shop/product supposed to be a template? E.g. what is “product” in the url? If that is an arbitrary value then Publisher won’t know how to translate it.
Studioweb
I’ll send you details in private comment
Studioweb
Comment has been marked private.
BoldMinded (Brian)
Ok, was an easy fix once I realized what the problem is. Do you need me to send a new build or is keeping the edited file on your server enough? For reference:
https://www.dropbox.com/s/n02zkua4mh6cq12/ticket-2260-site-url-lang-override.png?dl=0
Studioweb
Hi Brian,
The first issue is fixed. The second remains; I’ve added {exp:publisher:switcher style=”links”} on the same page. Could you look at that one too?
BoldMinded (Brian)
I took a quick look at this and unfortunately I’m not going to have a quick fix for the second issue. It could be a few days… maybe a week or more. I don’t know.
BoldMinded (Brian)
Ok, I looked into this yesterday and realized just how difficult it would be to support this, and then realized that I have gone down this path before. I found this old ticket where someone has the same issue, which I think you should read through. Basically making this would would require such a significant re-write of how the language switching works, that I’m simply not going to go down that road. It’s already a fragile process, and I’m not about to go into a china shop like a bull.
https://boldminded.com/support/ticket/1831
The version I mentioned in that ticket still hasn’t been released… so I can send it to you. See comment #28 in that ticket. I’ll try to send you a build later tonight or tomorrow.
BoldMinded (Brian)
Here is the latest build. You’ll need to click the install button again, but your old settings should remain. Use the domains tag noted in ticket #1831 from the previous comment.
BoldMinded (Brian)
Comment has been marked private.
Studioweb
Hi Brian,
The solution lies within the function changeLanguage() in Services/Session.php I suspect. I really need the redirect method and the {exp:publisher_domain_control:domains} doesn’t offer this functionality as far I see. But no worries here; I can fix this myself (for the time begin)by changing this function or use the tag below.
{exp:publisher:languages} {if short_name == ‘en’}<?php echo str_replace($main_HTTP_HOST, $translated_english_HTTP_HOST, “{translated_url}”); ?>{/if} {if short_name == ‘pl’}<?php echo str_replace($main_HTTP_HOST, $translated_polish_HTTP_HOST, “{translated_url}”); ?>{/if} {/exp:publisher:languages}
BoldMinded (Brian)
The solution isn’t as easy as changing something in changeLanguage(), trust me 😊 The url translations are without a doubt the most complex part of Publisher, and it has tentacles and impact in various parts of the codebase.
In this situation you might have to do a custom solution like that. Sorry