vigetlabs / craft-localeredirector

Craft plugin for detecting user language preferences and redirecting to the appropriate locale.
MIT License
24 stars 4 forks source link

Property "Craft\LocaleRedirectorService.path is not defined #2

Closed MischaSz closed 7 years ago

MischaSz commented 8 years ago

Hi

I've just installed your plugin on a Craft CMS 2.6.2950 installation and I'm getting the following error (the error message itself is in German; I've translated it in the subject field and I removed some part if the URL for privacy reasons):

CException

Eigenschaft "Craft\LocaleRedirectorService.path ist nicht definiert.

/home//public_html/_staging/craft/plugins/localeredirector/services/LocaleRedirectorService.php(40)

28 craft()->request->redirect($url, true, 302); 29 } 30 31 // Private Methods 32 // ========================================================================= 33 34 /* 35 Return a new url with locale included 36 @param string $locale 37 / 38 private function newUrl($locale) 39 { 40 $path = $this->path = craft()->request->getPath(); 41 $params = $this->querystring = craft()->request->getQueryStringWithoutPath(); 42 43 return UrlHelper::getSiteUrl($path, $params, null, $locale); 44 } 45 46 /* 47 Set a cookie 48 @param string $name 49 @param string $value 50 @param int $expire 51 @param string $path 52 * @param string $domain

Any idea?

Regards Mischa

jeremyfrank commented 8 years ago

Hi Mischa. At first glance, I'm not sure what is causing the error, but I'm hoping to look into it more closely after the new year. I'll keep you posted.

jeremyfrank commented 7 years ago

Mischa, I just pushed an update which fixes this.