Be sure to checkout our newest add-on Reading Time Pro!

EE4 compatibility updates:

  • Publisher is EE4 and EE5 compatible, but it does not currently support the Fluid field (it's in the works).
  • Reel is EE4 and EE5 compatible, but it does not currently support the Fluid field.

Ticket: Publisher Domain Control not correctly recognizing settings in MSM site

Status Resolved
Add-on / Version Publisher Domain Control 2.0.0
Severity
EE Version 3.4.3

Service Desk

Sep 17, 2018

After installing the “Publisher Domain Control” module i see the different domains are working on the different urls. However the {exp:publisher:languages} tag does not recognize the url and just add the prefix at the end of the url.

Is there something i miss?

Let me know,

Best,
Rein

#1

BoldMinded (Brian)

Sep 17, 2018

Can you provide more info? What does your PDC config look like, and what is the resulting URL you’re referring to?

#2

Service Desk

Sep 17, 2018

Ofcourse.

Config:

The urls are
EN: http://shop.maisondebonnavie.fr.duniqueserver.nl/
NL: http://shop.maisondebonnavie.nl.duniqueserver.nl/
FR: http://boutique.maisondebonnavie.fr.duniqueserver.nl/

You can check the language selector, it goes to a 404

#3

BoldMinded (Brian)

Sep 17, 2018

Have you tried {translated_url} instead of {switch_langauge_url}?

#4

Service Desk

Sep 17, 2018

Just changed it to {translated_url}, but the same result.

#5

BoldMinded (Brian)

Sep 17, 2018

Ok, I’ll investigate, but it may not be until later this week, or early next due to my schedule this week.

#6

Service Desk

Sep 18, 2018

Ok.

Also, the variable {publisher:canonical_url} does not work. Can you check why that var is not working.

#7

Service Desk

Sep 18, 2018

Another issue is that the Publisher Domain Control does not save per Multi site the settings.

if i update the domain urls in site 1, it update also the urls in site 2 with the one for site 1. Seems not the default behaviour right? or am i missing something?

#8

BoldMinded (Brian)

Sep 18, 2018

PDC is supposed to bridge the gap between multiple sites. If you’re defining unique URLs for each site, thats kind of defeating its purpose. If you have 3 sites, the URLs to each of those sites should always be the same, regardless of which site in the CP you’re editing at the time.

#9

Service Desk

Sep 18, 2018

well we have a case where we have 3 sites and where the languages per site (NL, EN, FR) need to be run on a different domain, so no prefix.

With PDC i thought it was working, and it seems to be on site one.

Any suggestion how to deal with this situation?

 

#10

Service Desk

Sep 18, 2018

Comment has been marked private.

#11

BoldMinded (Brian)

Sep 18, 2018

I see what you’re saying. This is not something I had accounted for. I’d have to add support for MSM to PDC. I may be able to look into this on Wednesday evening, but no guarantees it’ll be done then. Part of the issue is I don’t have an MSM/multi-domain environment setup locally right now, so I’ll have to spend some time to replicate this to properly fix the bug and add MSM support.

#12

Service Desk

Sep 18, 2018

Ok thanks for looking into 😊

I see that the extension is simple and you are just set the correct url and hide the prefix. So it looks like its just setting and saving the right data in the extension per site. Perhaps i can help to modify it.

Let me know when you need some more info.

#13

Service Desk

Sep 20, 2018

I just updated the PDC module, looks like this is working. See here the patch

https://www.dropbox.com/s/a7zw2pmnhelw3e3/pdc_patch_msm.diff?dl=0

#14

BoldMinded (Brian)

Sep 21, 2018

Thanks for the diff. I implemented the changes, but a bit differently. I’d rather the site_id be the top level array key instead of domain_name, just incase other settings are added in the future. So now its $settings[site_id][domain_name]

#15

BoldMinded (Brian)

Sep 21, 2018

Comment has been marked private.

#16

Service Desk

Sep 24, 2018

Thanks for the build. Just installed and notice that you did

if (isset($parsed[‘host’]) && $parsed[‘host’] == $host)

on my server $parsed[‘host’]) is empty, but $parsed[‘path’]) is filled in

output $parsed:
Array
(
  [path] => shop.maisondelabonnevie.com.duniqueserver.nl
)

So changing it to “if (isset($parsed[‘path’]) && $parsed[‘path’] == $host)” let it work as expected.

Btw, what is the status for the issue with {exp:publisher:languages} tag. Did you get a change to check that issue?

#17

BoldMinded (Brian)

Sep 24, 2018

I was under the assumption that your diff fixed the languages tag, which is what you originally reported as the issue.

#18

BoldMinded (Brian)

Sep 24, 2018

That conditional may better be suited as this then:

if (
                    (isset($parsed['host']) && $parsed['host'] === $host) ||
                    (isset($parsed['path']) && $parsed['path'] === $host))
                {
#19

Service Desk

Sep 25, 2018

Hi Brain,

Sorry, i posted 2 issues. One for the MSM issue, which is resolved now. THe issue about {exp:publisher:languages}  is still there. Any idea when you can look into that issue?

Let me know.

#20

Service Desk

Sep 25, 2018

Also, the PDC does not add the scheme. I change this

$url = substr($domain, -1) != ‘/’ ? $domain.’/’ : $domain;

to

$url = $_SERVER[‘REQUEST_SCHEME’]. ‘://’. substr($domain, -1) != ‘/’ ? $domain.’/’ : $domain;

#21

Service Desk

Sep 25, 2018

Sorry, the line should be

$url = $_SERVER[‘REQUEST_SCHEME’]. ‘://’. (substr($domain, -1) != ‘/’ ? $domain.’/’ : $domain);

#22

BoldMinded (Brian)

Sep 25, 2018

I just tested locally and its working fine without those changes. I don’t know why the URL needs to be re-assembled like that in your case.

#23

Service Desk

Sep 26, 2018

“I don’t know why the URL needs to be re-assembled like that in your case.”
me neither…

Did you check the issue about {exp:publisher:languages}? Any idea when you can look into that issue?

Let me know.

#24

BoldMinded (Brian)

Sep 26, 2018

After thinking about the languages tag issue, I don’t think it should change the domain names. The tag is meant to list out the languages available in Publisher, and the translated value of the current url. PDC is just meant to set the default language of an MSM site based on the url. Switching languages is switching sites in this case, and attempting to get the translated url from a different site could be complicated. Basically they’re two different things with different responsibilities and I’m not sure it makes sense to directly tie them together. If you need to make a language switcher to switch between sites, you may need to hard-code the domain names into a dropdown menu or anchor tags. I can look into addding an {exp:publisher_domain_control:domains} tag to list out the domains from the settings, but it may be a week or two. I’m slammed with work right now and trying to get ready for EE CONF too.

#25

Service Desk

Sep 26, 2018

You got a point. I will add just the new domain urls and if that can be done with {exp:publisher_domain_control:domains} i`m happy.

Thanks for know.

#26

Service Desk

Oct 09, 2018

Hi Brian,

Can you give me an ETA about {exp:publisher_domain_control:domains}?

Let me know.

#27

BoldMinded (Brian)

Oct 09, 2018

Maybe this week or next week. New features just aren’t high on the priority list right now, but I’ll get to it.

#28

BoldMinded (Brian)

Oct 09, 2018

Here is a new build, but it comes with a caveat:

Backup your DB first before dropping in the new files. When you go to update it will appear as if its not installed, so you’ll need to click the install button. If something doesn’t work correctly the next version I send may require your to restore from your database backup.

The new module tag looks like this:

{exp:publisher_domain_control:domains}
 {if is_active}active: {/if}{domain_name}

 {language_code}

 {total_results}

 {count}

 {is_active}

{/exp:publisher_domain_control:domains}

 

#29

BoldMinded (Brian)

Oct 09, 2018

Comment has been marked private.

#30

BoldMinded (Brian)

Oct 18, 2018

I’m going to go ahead and mark this resolved. The next version of PDC will be released soon with this new module tag.

Login to reply

Contact

For add-on support, please use the Support section. General inquries and pre-sale questions can be sent to support@boldminded.com.