Support » Plugin: Translate WP website - Weglot Translate » Wrong URLs in multisite

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Remy B



    Ok I see, can you send me the website address and the URL to ? So I can investigate what is making this in the URL.


    So, I debugged things a bit, and I think the problem is inside Weglot->replaceUrl()

    There’s a loop foreach ($this->network_paths as $np) that seems to be handling exactly what doesn’t work on my installation.

    The condition is always true for the first of the $this->network_paths. My multisite installation is inside a directory, so it’s accessible like http://localhost/preview/ and individual sites are http://localhost/preview/site

    I guess your code expects the first element of $this->network_paths to be empty or up to 2 chars, therefore the strlen($np) > 2 exists, but not all installations can go to the www root 🙂

    I hope this screenshot of my IDE can help you:
    Note that at the time of the screenshot the str_replace hasn’t run yet at all, and $urlTranslated is /el/preview/olsen/contact/. Once it runs, it becomes /preview/el/olsen/contact/ which is still wrong, as it should be /preview/olsen/el/contact/.

    Hope this helps a bit 🙂

    Plugin Author Remy B


    Hi Anastis, I just sent you a message by email 🙂 Hope you received it

    Hello this translate shows on my booking form 404 page only need help

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Wrong URLs in multisite’ is closed to new replies.