Publisher is EE6 compatible, but it does not support the Fluid field.

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, 2021

When using {path='shop/product/{url_title}’} in our product list view, the link is using the main domain.

#1

BoldMinded (Brian)

Mar 04, 2021

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.

#2

Studioweb

Mar 04, 2021

I’ve added the credentials. No, we’re not using a MSM but do user Publisher Domain Control addon.

#3

BoldMinded (Brian)

Mar 04, 2021

How do I re-create this issue? What Url do I go to and what template file is it using?

#4

BoldMinded (Brian)

Mar 04, 2021

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?

#5

BoldMinded (Brian)

Mar 04, 2021

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.

#6

Studioweb

Mar 05, 2021

I’ll send you details in private comment

#7

Studioweb

Mar 05, 2021

Comment has been marked private.

#8

BoldMinded (Brian)

Mar 05, 2021

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:

#9

Studioweb

Mar 06, 2021

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?

#10

BoldMinded (Brian)

Mar 06, 2021

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.

#11

BoldMinded (Brian)

Mar 08, 2021

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.

#12

BoldMinded (Brian)

Mar 08, 2021

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.

#13

BoldMinded (Brian)

Mar 08, 2021

Comment has been marked private.

#14

Studioweb

Mar 09, 2021

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}

#15

BoldMinded (Brian)

Mar 09, 2021

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

Login to reply