Code Monkey home page Code Monkey logo

craft-localeredirector's People

Contributors

iemand002 avatar jeremyfrank avatar romainpoirier avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

craft-localeredirector's Issues

Problem with the redirect of only two specific url

Hi,

I've installed the last version of the plugin and it works well except that two urls.
I've not idea why.

The url is blog and far-q-assioma and they are located in this website https://cycling.favero.com/.

Blog and Faq are two single pages translated in 5 languages.
The URI in the section's setting is (for FAQ for example):
en -> faq-assioma
it -> faq-assioma
fr -> faq-assioma
es -> faq-assioma
de -> faq-assioma

If I go to the website and I choose Italian language
and after, I try to navigate to https://cycling.favero.com/fr/assioma, it redirects well to the italian version of the page. This page has the same settings of blog and Faq

If I try the same, first selecting Italian language and after, I try navigate to https://cycling.favero.com/fr/faq-assioma, it loads the francais version instead of the Italian version without changing the language cookie setting (it remain IT).

Do you have any suggestion about this?

Thanks in advance and regards,

Davide

Breaks AJAX requests to plugin controller

I make an AJAX call to the URL "${window.baseUrl}actions/podioLead/newLead/" and it redirects it to "${window.baseUrl}/en/actions/podioLead/newLead/" which ends up to Bad request.

This URL points to an action of a custom plugin I have developed. Is there any way to prevent the redirect?

Lastsegment bug in newUrl Function

Hay,

I've the following URL structure:
/ => de
/fr => fr

It does redirect me to an entry page instead of the home when i enter www.mydomain.de/ or www.mydomain.de/fr but only when i've switched to an other locale and open the startpage in a new Tab.

Fix:

private function newUrl($locale)
    {
        $qs = $this->querystring ? '?' . $this->querystring : '';
        $segments = craft()->request->segments;
        $lastSegment = end($segments);
        if ($lastSegment) {
            $criteria = craft()->elements->getCriteria(ElementType::Entry);
            $criteria->slug = $lastSegment;
            $entry = $criteria->first();

            if (!empty($entry)) {
                $new = craft()->elements->getElementById($entry->id, ElementType::Entry, $locale);
                return UrlHelper::getSiteUrl($new->uri, null, null, $locale) . $qs;
            }
            return false;
        }
        return UrlHelper::getSiteUrl('/', null, null, $locale) . $qs;
    }

Browser locale is being forced

Hi,

The plugin seems to force the browser language. It's impossible to switch languages.
I'm using the latest version of Craft and the plugin on a multi-environment setup.

If you want, I could give you access to the code and/or backend.

[Fixed] Issue with redirect from secondary language to main language url

I've a multilanguage website with Locale Redirector plugin installed on Craft CMS 2.6.2986.

The site base language is English EN.

When a user come inside the website is will be redirect in base of his browser language settings.

But I find this issue:

If a english user (language EN) comes from an external Italian link the plugin doesn't redirect to the correct URL.

That's what happen:

user clicks this url www.sitename.com/it/slug_italian
and it land in this www.sitename.com/slug_italian
instead he sould land in www.sitename.com/slug_english.
The opposite case, an Italian user click on English link, works well and he is correctly redirected.

Here a pratical example:
https://cycling.favero.com/it/supporto
if you have a browser in english language it not resolve the translation but it show you 404.

UPDATE
I've update the plugin with the new version and it seems works well!

Thanks in advance and regards.

Property "Craft\LocaleRedirectorService.path is not defined

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

Error many redirects

Hi,
I've just installed the plugin on Craft CMS 2.6.2962 and homepage page isn’t working in console I have an error: net::ERR_TOO_MANY_REDIRECTS

Any idea?
Thanks
F

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.