Jump to content
cosmicsafari

LanguageTranslator thowing Fatal Error on both front and back end?

Recommended Posts

Hi all,

Thought I had the language translation working but now when I attempt to access the language through the backend (Setup > Languages > My Language) it throws an error:

Recoverable Fatal Error: Argument 3 passed to ProcessWire\LanguageTranslator::textdomainTemplate() must be of the type array, null given

Can anybody shed any light on what would cause this error when trying to access my language through the settings in the backend, or attempting to view it on the frontend with its language specific URL.

The only thing I have changed recently was moving the DB to a different location however the one exported was the one that I previoulsy had my custom language working on it previoulsy.

Any ideas, im at a bit of a lose as to what would have caused this when it was working previously.

 

Share this post


Link to post
Share on other sites

Not an explanation as to what caused the issue, however this workaround got me back up an running.

I deleted the language page record from pages table of the DB, this allowed me to create a new language while still keeping the same name.

I then receated the the language from within the backend and readded in the alternative language content to the fields in the effected pages.

So to summarise I have it working again but still have no idea what caused the intial problem

Share this post


Link to post
Share on other sites

I just had a similar error message on one of my sites:
 

Uncaught TypeError: Argument 3 passed to ProcessWire\LanguageTranslator::textdomainTemplate() must be of the type array, null given

It is not a consisten error, appeared only once in the log. No idea what causes this. Maybe someone can jump in?
The site actually uses only 1 language I installed Languages base module so I can have the backend in German. 

Share this post


Link to post
Share on other sites

I just had this same problem (some error in the translation csv I uploaded) and I fixed it through navigating to the admin page id folder in site/assets/files/LANGUAGEPAGEID/ and deleted all my templates*.json translation files.

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 ICF Church
      Hi 👋
      Anyone else having this problem?
      Requirements:
      - Repeater (matrix & normal) with mutlilanguage fields (text, textarea…) 
      - Backend language set to something other than default (ie. German) 
      Reproduce:
      - Add a new repeater Item (ajax, I found no way to possible to disable it with matrix)

      (Notice how the default language tab is active instead of the backend language…)
      - Write something into the (default language) field
      - Try to save, if field is required, this will not work. If not required, then when reloading, the content will be inside the backend language field, instead of the default language field who was (presumably) active
      Analysis:
      When  loading  a new repeater element with ajax, the default langue tab is active, but the backend language inputfield is visible (with no visual indication). When writing into the field, it will populate the backend language. When manually clicking on the default language tab (which is already active), the field will switch to the actual default language field (which is [now] empty) (that can now be populated…)
      Also Notice, the labels of the elements to be added are in default language as well instead of the translated label (images instead of Bilder)…
      ProcessWire 3.0.148, Profields 0.0.5…
      Is it my system configuration, or does anyone else have the same issue? This is a screen recording of the problem:

      Screen Recording 2020-02-25 at 14.18.31.mov
    • By snobjorn
      Here's my Norwegian language pack for ProcessWire. I've been adding translations over some time, to suit my own projects users needs.
      Last updated:
      2019/06/19 (June 19, 2019)
      Status:
      Not yet complete. Translations that non-superusers will see is prioritized.
      Name:
      ProcessWire-Norwegian-Language-Pack-nb-NO
      Translated using:
      ProcessWire 3.0.133 dev
      Number of files:
      189 wire files and 95 site files – ranging from just started to completely translated. The site files includes translation some free and some pro modules, see the complete list in the README.md at GitHub.
      Available at GitHub:
      https://github.com/snobjorn/processwire-norwegian-language-pack-nb-no
    • By cosmicsafari
      Hi all,
      Starting work for a new client, so pulled down a copy of their existing PW site.
      All looks normal in terms of the codebase structure, set it up as I would normally for any PW site yet I everytime I attempt to view a page I get:
      From what I can gather its running PW version 2.8.
      On the live environment where I copied it from and its working fine, they are apparently running PHP 7.1 whereas I am running PHP 7.3 locally, just incase that may be a cause for the issue.
      Any ideas as nothing seems obvious to me at this point.
       
       
    • By Manuel
      Hi everybody!
      I'm new to PW and just did the beginner-tutorial “Hello Worlds”, a beginning ProcessWire tutorial --> Link
      After extending the template from the original tutorial with a page_reference-Field (Page-Field value type is configured as single page),
      PW throws a fatal error when i try to output multiple pages:
      $planets = $pages->find("template=planet, sort=-title"); foreach($planets as $planet) { echo $planet->title; echo $planet->planet_reference->title; } Should return three Pages, but throws the following error:
      When i try to output the field with a single page, everything just works fine:
      $planet = $pages->get(1018); echo $planet->title; echo $planet->planet_reference->title; I've tried to solve the problem with myself (and google), but i can't fix the error.
      Thanks a lot!

      My enviroment:
      OSX Mojave / MAMP (PHP 7.2), PW v 3.0.123
    • By louisstephens
      Hopefully this is the right place, if not, please move it to the proper sub. I installed the multi language module on my development (sandbox) set up not too long ago to test out a few things. From the start, I ran into some issues with dependencies not being met/installed, so I thought that I would simply just uninstall what had been. Unfortunately, that took me down a road of using some code in my home template to remove the modules (cant find it at the moment). After some struggling, I finally got it uninstalled, but it left behind 3 fields,
      language language_files language_files_site I thought that I could simply remove them from the languages template and then delete them, but I get the following error:

      I was wondering, is there a way to remove these using the api? I couldn't add any new users to the setup until I made "language" not required, but I was hoping to just remove all of the fields.
×
×
  • Create New...