Jump to content

Error: Argument 2 passed to LanguageSupportPageNames::getPagePath() must be an instance of Language


Recommended Posts

Posted (edited)

Hi,

I'm experiencing some big problems with a site i'm developing. It's frustrating, since my client already started filling in the data. Anyways.

I'm installed the language package for german and de-installed it afterwards (I wasn't sure i would need it).

Now i'm blocked out of the admin pannel, can't access to any page on the frontend (i get an "Internal Server Error"). I checked the error log and found the following: 

2014-01-15 03:58:26    guest    http://dev.neuland-film.ch/admin/login/    Recoverable Fatal Error:     Argument 2 passed to LanguageSupportPageNames::getPagePath() must be an instance of Language, null given, called in /var/www/vhosts/neuland-film.ch/dev.neuland-film.ch/wire/modules/LanguageSupport/LanguageSupportPageNames.module on line 324 and defined (line 183 of /var/www/vhosts/neuland-film.ch/dev.neuland-film.ch/wire/modules/LanguageSupport/LanguageSupportPageNames.modul
 
I have no idea how to fix this… I tried re-installing the wire, didn't help. I'm afraid of losing data and some work on the templates if i have to do a fresh install. 
 
Can anyone help me out? 
 
Thanks a lot.
 
 
It's this line of code that's creating the error (probably not able to load the language bit?)
$event->return = $this->getPagePath($page, $language); 
Edited by lenoir
Posted

So you don't need LanguageSupport at all? Removing the language pack means? You deleted the json files on on the default language, or you removed languages at all? So you don't need LanguageSupportPageNames?



If you don't need LanguageSupportPageNames you could try deinstall it from API

In the root where index.php is create a new php script for example tool.php with this:

<?php
include("index.php");
wire("modules")->LanguageSupportPageNames->uninstall();
echo "Uninstalled LanguageSupportPageNames";
Posted

Thanks Soma for the quick reply. Unfortunately that didn't work: I got the following error:

"Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Error has been logged."
Posted

What error?

Applied it? You mean you browsed to the script yourdomain.ch/tool.php ??

What if you make tool.php with

<?php 
echo "Hello World";

And open it in browser?

Posted

Yes, i create a document called tool.php with the above script and i got the "internal server error". Hello World works fine. Apparently, I can't get to anything from PW anymore.

Thanks.

Posted

Ok one last time: WHAT is the error if you call tool.php? :D

If you call the script like this with PW bootstraped, there would be no LanguageSupportPageNames so there can't be an error there :)

What else have you installed that would be important to know? Modules? Hooks?

Posted

Well, that's the thing. I get the error message above, but no error listed in the log. 

I haven't installed much. I got the ProcessExportProfile, the TextformatterVideoEmbed (not in use though).

Here's what i was working on when it happened:

I added language support to get the field datetime in german. I didn't succeed and decided to remove the language modules. I probably de-installed the wrong module, since all of a sudden were both german AND default language gone. I don't really know what the next step was (i don't recall doing much), but anyway i couldn't access to any PW page, frontend nor backend.

@lenoir: If you want to see the specific error you can find the log in /site/assets/logs.

Yes, that's where I got the first error "2014-01-15 03:58:26    guest    http://dev.neuland-f...ch/admin/login/    Recoverable Fatal Error:     Argument 2 passed to LanguageSupportPageNames::getPagePath() must be an instance of Language, null given, called in /var/www/vhosts/neuland-film.ch/dev.neuland-film.ch/wire/modules/LanguageSupport/LanguageSupportPageNames.module on line 324 and defined (line 183 of /var/www/vhosts/neuland-film.ch/dev.neuland-film.ch/wire/modules/LanguageSupport/LanguageSupportPageNames.modul"

Posted

If there's no error in PW error log then you might find one on the apache server error log.

Internal Server Error mostly has to do with some other error might nothing to do with PW. Also I think you can't de-install something you shouldn't.

Might aswell could be htaccess. What if you remove htaccess? Any difference?

Posted

Removing htaccess didn't help.

You're right though, there is an apache error log. it repeats 5-6 times the following:

[Wed Jan 15 11:20:46 2014] [warn] [client 92.230.243.83] mod_fcgid: stderr: PHP Fatal error:  require(): Failed opening required '/var/www/vhosts/neuland-film.ch/dev.neuland-film.ch/wire/core/ProcessWire.php' (include_path='.:') in /var/www/vhosts/neuland-film.ch/dev.neuland-film.ch/index.php on line 87, referer: http://processwire.com/talk/topic/5330-error-argument-2-passed-to-languagesupportpagenamesgetpagepath-must-be-an-instance-of-language/

Posted

And? does the "/var/www/vhosts/neuland-film.ch/dev.neuland-film.ch/wire/core/ProcessWire.php" exist?

  • Like 1
Posted

Looks like some server issue: /var/www/vhosts/ vhost? Ask your hosting admin support...

Looks like some mod_fcgid issue, but no idea what it is.

  • Like 1
Posted

Ok, I'll look into this. Weird though, because it worked flowlessly until this morning.

Thank you for your time Soma!

Posted

Yeah that's usually with those hostings, they just update/change something without telling. And one morning... bamm

  • Like 1
Posted

Did a clean install this morning, solved my issue. Lost quite a lot of time and data, but the website's up and running again. Thanks for your help anyway, i appreciate.

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
×
×
  • Create New...