Jump to content

Why are my pages only accessable in default language?


Timo
 Share

Recommended Posts

Hi, I used multiple languages with ProcessWire in the past, but I never encountered this problem before:

I have a template where all child pages (events) are listed. In German (default language) all events are visible, like they are supposed to be. But in English only one event is visible!
The only difference I found is, that the visible event was created "by hand" via backend, and the other events where created by PHP API, because I imported the events ... 

Another effect is that trying to access the event URL in English leads to the 404 Error page. But when I'm logged in as admin, I can access the URL. Accessing the German version always works.

It feels like the events are only published in German, but not in English? 

The rest of the page works fine in both languages, only the events are showing this weird behaviour.

-> Is there anything special to take care of when creating pages via PHP API for multi page websites?
-> Has somebody any idea what could be the cause of this? I'm stuck ...

Link to comment
Share on other sites

  • 1 month later...

I have exactly the same problem, but I'd like to import my event pages by a command line script from another database. So I need to activate the language specific URLs programmatically, but I haven't found an API function to do this. Can anybody help me?

Link to comment
Share on other sites

14 hours ago, FlorianA said:

I have exactly the same problem, but I'd like to import my event pages by a command line script from another database. So I need to activate the language specific URLs programmatically, but I haven't found an API function to do this. Can anybody help me?

Will this do the trick?

https://processwire-recipes.com/recipes/activate-all-languages/

  • Like 2
Link to comment
Share on other sites

  • 1 month later...

After some further thoughts I wonder if it is a good idea to activate the Multi-Language URLs at all for my site. I have a lot of pages that will probably never be published in an other than the default language, but users with other languages should see untranslated pages nevertheless in the default language - without any additional effort for the page author. Would it be a solution for this to leave the multi-language URL module away and keep only the multi-language fields? One URL for all languages would be sufficient for me. Are there any other drawbacks with this approach?

Link to comment
Share on other sites

58 minutes ago, FlorianA said:

but users with other languages should see untranslated pages nevertheless in the default language

This will happen automatically if the fields for the page don't have a translated version - they will fallback to the default language.

 

Also, just an FYI - you can also use Admin Actions to batch activate languages.

597e5aaf1fc7f_ScreenShot2017-07-30at3_15_16PM.thumb.png.ab7fe06fcb91784aa4e89ae11d6b6b22.png

  • Like 2
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...