Jump to content
yinken

Default homepage in multi-site and mult-language environment

Recommended Posts

Hi everyone,

I am using ProcessWire to run a multi-site environment using the Multisite module by Soma.

It's working great with one small caveat. It always defaults to the English version of the site. So when you access the base url (somedomain.com) it always redirects to somedomain.com/en/. In my particular case I need it to go to the Germany version somedomain.com/de/.

Some things I've tried:

  • I've tried fiddling around with the AutoDetectLanguage module to have a user redirected based on the detected browser language - didn't work.
  • I've also tried messing with a module that changes what the default homepage is (smth like DefaultHomepage I believe), but that also had no affect.
  • I used the Redirect module to have the root ('/') redirected to specific language URL ('/de/) - also didn't work

My guess is that it has something to do with the default language in the setup which is set to english, but I am not sure.

Has anyone else come accross this issue?

Thanks in advance.

Share this post


Link to post
Share on other sites

Thanks for your reply. I have seen this answer.

It points to a setting in the Page Names configuration of the Language Support module. I think this is were my problem comes in: In order for the multi-site module to work, the "name" of the page needs to be the actual domain that redirects to this part of the multi-site environment for both languages. 

So "somedomain.com" as name for both "/en/" and "/de/".

But in order to have Processwire redirect a user to a specific language version of the homepage, the "name" of the homepage needs to be that of a language, so "/de/" and "/en/" in my case.

 

 

 

 

 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By happywire
      [solution]
      =========================================================
      Using devilbox to develop locally.
      Installing the Beginner, Intermediate and Blank sites from the setup menu works perfect.
      The sites load, all pages load, can access the admin panel, all fine.

      However when installing the Multi-language site, the one I can pick during the setup procedure, things do not work.
      The English Home page works.
      The English About page,
      https://wiremultilang.loc/en/about/ tells me
      Same for the English Sitemap,
      https://wiremultilang.loc/en/site-map/ .
      I have allowed all cookies and can see them when checking in the browser cookies and site data, using Firefox 65.0.1 64-bit on Ubuntu 18.04.2 LTS.
      Clicking "German" on the Home page,
      https://wiremultilang.loc/de/ , shows me the German version of the 404 page.
      Clicking "Finish" on the Home page,
      https://wiremultilang.loc/fi/ , shows me the Finish version of the 404 page.
      What could be the issue here?
      Thank you for your guidance or any help you could supply.
    • By joeck
      Hi there,
      I'm trying to have a multi-site (multiple databases) setup on a IIS (Microsoft) server.
      I know that IIS is not officially supported by ProcessWire but customer is insisting on IIS.
      I get an 500 Error when trying to access the sub-domain/other processwire site.
      Did somebody do this before or is it not possible at all to have a multi-site setup on IIS?
      Thanks
    • By joeck
      Hi Everyone,
      I was playing around with the ProcessWire command-line script sitemap.sh (https://processwire.com/docs/front-end/include/)
      I currently have a multi-site setup (with separate databases).
      -> site
      -> site-other
      The sitemap works but it shows only the pages from the default site directory. How can I get the sitemap of the site-other directory?
      Here is my working code that prints the sitemap of 'site':
      #!/usr/bin/php <?php namespace ProcessWire; include("index.php"); // bootstrap ProcessWire function listPage($page, $level = 0) { echo str_repeat(" ", $level) . $page->title . "\n"; foreach($page->children as $child) { listPage($child, $level+1); } } listPage($pages->get("/")); // start at homepage I tried including index.config.php instead of index.php but that didn't help...
    • By usualCommission
      Hey everyone,
      I'm pretty experienced with pagination and haven't seen this before. I have my pages pulled using $pages->find, which is working fine however using renderPager() generates pagination where the links do not work. Here are some details.
      All templates needing pagination have pagination enabled in the admin. URL Segments are not enabled. Clicking on the "Next" or numbered links merely reloads the current page. The link href values are properly being output with the urls being /page2, /page3, /page4, etc. Manually entering the paginated urls has the same effect of reloading the current page with no new content. Pages are being returned from the ->find function properly and with the proper limit. A few other details:
      ProcessWire v3.0.98 Multi-language is enabled, 2 languages implemented. Pagination does not work on either language Have very few modules installed (few enough to list), none of which I could see interfering: ProFields, ProDrafts, ListerPro, DB Backups, Cronjob DB Backup, Upgrades, Upgrade Checker, Force Password Change, Markup Sitemap XML I'm stumped. For the sake of being overly-thorough, here's the code:
      <?php $articleTemplates = [ 'template_news_article', 'template_news_video', 'template_news_press_release' ]; $searchParams = [ 'template=' . implode('|', $articleTemplates), 'sort=-published', 'limit=' . $pages->get('template=template_news')->list_count ]; $articles = $pages->find(implode(',', $searchParams)); echo $articles->renderPager(); ?>  
    • By swampmusic
      Trying to figure out work flow for translators on a new website and have hit a brick wall.
      Site was launched in Spanish, now the translators want to add in other languages.
      I presumed that when you tick the "active" language checkbox on settings for the home page, then the new language would not appear on the public facing website, but translators would be able to work with the pages in the admin and view their work.
      Finally, once all translation had been completed, we could activate the language from the home page.
      I have searched thru the forums and found older articles from 2015 here.
      https://processwire.com/talk/topic/11100-disable-a-language-on-a-multilanguage-site/ https://processwire.com/talk/topic/10467-allow-translators-to-work-on-hidden-language/ This seems a really messy hack, or did i miss something ?
      Does anyone know if there has been an update within Processwire since 2015  to make this better/easier, or other articles explaining how to achieve it ?
      We were looking for a solution that the client can use from within Admin. Not via .htaccess or similar that would require tech skills.
      Many thanks for reading 🙂
       
×
×
  • Create New...