Jump to content

Andiministrator

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by Andiministrator

  1. I had the same problem. After playing around I found out that there is a code in LanguageSupportPageNames.module with a comment "verify that page path doesn't have mixed languages where it shouldn't". This code was redirecting my non-default language page path to the default page path (and that didn't work correctly for my setup). I commented the redirect line out and it worked for me: // verify that page path doesn't have mixed languages where it shouldn't $redirectURL = $this->verifyPath($this->requestPath); if($redirectURL) { #$this->wire('session')->redirect($redirectURL); return; } But this can't be a solution (to change code in the wire). That brings me to my question: Is there a way to deactivate this redirect using the config, a hook or something? My Setup: Nginx Webserver, PHP 7, Processwire 3.0.165. I use 2 different domains, one for each of my two languages.
  2. Thanks, this was helpful for me. Just one notice: To get out the message, "wire('session')" was not working for me, I used $this instead: function example1(HookEvent $event) { $page = $event->arguments[0]; $this->message("Hello World 2 ! You saved {$page->path}"); } $pages->addHookAfter('Pages::save', null, 'example1');
×
×
  • Create New...