Timo Posted May 21, 2017 Share Posted May 21, 2017 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 More sharing options...
tpr Posted May 22, 2017 Share Posted May 22, 2017 You should activate those pages, check the checkboxes next to the page names (Settings tab at page edit). 1 Link to comment Share on other sites More sharing options...
Timo Posted May 22, 2017 Author Share Posted May 22, 2017 Hey tpr, thanks a lot! I never noticed that checkbox before. And I don't understand why it was deactivated. But now it works Link to comment Share on other sites More sharing options...
FlorianA Posted June 25, 2017 Share Posted June 25, 2017 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 More sharing options...
SiNNuT Posted June 26, 2017 Share Posted June 26, 2017 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/ 2 Link to comment Share on other sites More sharing options...
FlorianA Posted June 26, 2017 Share Posted June 26, 2017 Thanks a lot @SiNNuT, it works! Would never have found it out myself - still seeing no API ... Link to comment Share on other sites More sharing options...
FlorianA Posted July 30, 2017 Share Posted July 30, 2017 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 More sharing options...
adrian Posted July 30, 2017 Share Posted July 30, 2017 Also, just an FYI - you can also use Admin Actions to batch activate languages. 3 Link to comment Share on other sites More sharing options...
adrian Posted July 30, 2017 Share Posted July 30, 2017 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. 2 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now