Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter dingzj

    (@dingzj)

    damn it, just fixed it.

    changed s2member code by changing:
    ... home_url('/?ws_plugin__s2member_menu_pages_css=...

    to

    ... home_url('/wp-admin/admin.php?ws_plugin__s2member_menu_pages_css=...

    similar for the js call too.

    @dingzj – could you please post that change to the s2member github page as an issue so it gets fixed upstream?

    I think there are a few more errors regarding s2member and qtranslate-x and of course a few places missing translation…

    Here is a list of things there translation does not work – maybe you got ideas how to fix them?

    1. All emails – e.g.:
    General Configuration –> New user email message. – it’s not possible to use language shortcodes or anything here to get them translated.
    Or the Signup Confirmation Email for Paypal.

    2. Basically any text you enter in the s2member config – e.g.
    General Configuration –> Registration Profile Fields and & Options –> Custom Registration/Profile Fields (optional, for further customization) — adding a field the name of is not translatable.

    3. s2member protected downloads – do not work if language is second language (or third and so on) – because the download link is rewritten to domain.com/XX/link and that does not exist. Can be circumvented by creating symbolic link in website root folder named XX and linking back to website root folder

    Some more I just don’t remember for now…

    Oh – and in which s2member plugin file did you change that?

    Thread Starter dingzj

    (@dingzj)

    @extremecarver

    Will do to post changes on github issue and create a PULL request.

    The file I changed is this one under s2member plugin folder:
    includes/classes/menu-pages.inc.php

    or you can search/grep home_url.*ws_plugin__s2member_menu_pages part

    Thread Starter dingzj

    (@dingzj)

    Unfortunately, I am not expert on s2member or php programmer.
    I just follow some common sense on the error message and search the source of it, and fixed it.
    In fact, I am not 100% sure my fix is the perfect solution, it might have some impacts that I don’t know; but it fixed my needs.

    Is it working for you with the new s2member version?
    For me it is still broken….
    (same rubbish as all the time – s2member is simply completely unreliable and badly programmed/documented).

    Ah – just noticed. With standard WordPress admin interface it works now. However using “Ozh’ Admin dropdown menu” it’s still broken. So clearly the fix in the newest s2member version is not fully correct..

    Thread Starter dingzj

    (@dingzj)

    actually, I later find that it was not the issue of qtranslate x at all.
    I had a nginx (similar to apache) redirect to do the following (roughly list here, but you get the idea)

    location / {
    try_file $uri$request $uri$request/ /index.php?q=$uri$request
    }

    I bet s2member main config page used some query string to show the page, and that leads to infinite redirect loop.
    You will see server[HTTP_REQUEST] and server[QUERY_STRING] are not the same, and s2member will keep converting them in order to add language path (.eg., /us/, /gb/, etc)

    I cracked the code in s2member to solve the infinite loop thing. the UI was showing correctly later. Not sure why the UI was showing incorrectly.

    What did you.replace.it with? I’m also using nginx. (And s2member doesn’t play so nice with it)

    Wel – this is my block – is there something you would change in this regard? Watch out about the location /XX – they might be needed to catch IPNs – this is clearly some qtranslate-x / s2member bug of things translated that should not be translated. Hence I catch them using this rule.

    location / {
    try_files $uri $uri/ /index.php$args;
    }

    location = /de/ {
    if ( $arg_s2member_paypal_notify ) {
    rewrite ^ / permanent;
    }
    try_files $uri $uri/ /index.php$args;
    }
    location = /es/ {
    if ( $arg_s2member_paypal_notify ) {
    rewrite ^ / permanent;
    }
    try_files $uri $uri/ /index.php$args;
    }
    location = /it/ {
    if ( $arg_s2member_paypal_notify ) {
    rewrite ^ / permanent;
    }
    try_files $uri $uri/ /index.php$args;
    }

    Thread Starter dingzj

    (@dingzj)

    Hi,
    I only have this rule:

    location / {
        try_files $uri $uri/ /index.php?q=$uri&$args;
    }

    I didn’t rewrite the papal_notify IPN stuff at all.

    Just search back my further fix, I did fix the infinite loop by changing qtranslate-x core code, please see this gist for how I changed it.
    https://gist.github.com/dingzj/67262a0ea3a3e519ef2f

    RED color is my changes, GREEN is the original one in version 3.4.

    Not sure how is this help you.

    okay – well thanks. I noticed the second part of your diff is now in qtranslate-x core – the first part not (but does not change anything for me)…

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Too many redirects on s2member config page when using s2member and qtranslate x’ is closed to new replies.