Viewing 16 posts - 1 through 16 (of 16 total)
  • Author
    Posts
  • #14710

    Hi everyone,

    Thanks to Kriesi for such a good theme Choices.

    INFORMATION:

    Site: http://www.nuforms.com

    Wordpress: 3.4

    Choices: 1.4

    WPML: 2.5.2

    Browser: Firefox 14,15

    PROBLEMS:


    PROBLEM 1

    On second language ajax portfolio doesn’t open item, just showing loading animation for a second and nothing happens. Main language works ok.

    First problem depend from WPML settings, please check below:

    GOOD >>>>>>>>

    WPML Settings:

    Language URL format

    Choose how to determine which language visitors see contents in

    V…Different languages in directories (http://nuforms.com/ – English, http://nuforms.com/ru/ – Russian, etc.)

    ……A different domain per language

    V…Language name added as a parameter (http://nuforms.com?lang=ru – Russian)

    BAD >>>>>>>>

    WPML Settings:

    Language URL format

    Choose how to determine which language visitors see contents in

    ……Different languages in directories (http://nuforms.com/ – English, http://nuforms.com/ru/ – Russian, etc.)

    V…A different domain per language

    ……Language name added as a parameter (http://nuforms.com?lang=ru – Russian)


    PROBLEM 2

    I’m using custom font with @font-face and it doesnt work on different domain(Russian), site’s second language. (Browser Firefox 14,15)

    There is something wrong with the styles or URL.

    Seems it’s related to the AJAX portfolio item opening bug, because it’s also depends from the same WPML settings that I wrote above.


    PROBLEM 3

    I know this theme is prepared for tranlating with WPML and Widget titles as well, but for some reason I can successfully translate Twitter widget title with WPML String translation.

    For example:

    <span class=’widget_first’>Latest</span> Tweets

    to

    <span class=’widget_first’>Последние</span> Твиты

    And translation doesn’t appear on the page.


    Hope you will help me!

    If you require additional information, please tell me, I can provide login to the site.

    Thanks,

    Aleksandr

    #84618

    Dear Aleksandr,

    I work at WPML support and would like to try and help out here.

    1) Your first problem is due to AJAX not being allowed to perform cross-domain requests. I think its the Avia Framework that sets the ajaxurl, but my version must be older and I dont have it. If we could point that to the translated url we should be able to fix it.

    2) Can you show me where you are using that font?

    3) You should find widget titles by going to String Translator and selecting the ‘Widgets’ context. Is that where you translated them?

    Best,

    David

    #84619

    Hi David,

    Thanks for reply!

    1) I think it’s possible to point, since WPML has ability to work with different domain names and has functionality for that. Hope it will be fixed soon. Please let me know about it’s progress, because I need two sites running soon and in worst case if it is dead end probably I can try something different.

    2) Its a page title, portfolio title and more, please below.

    Here is css style for the font:

    h1, h2, tr.pricing-row td, #top .portfolio-title, .callout .content-area, .avia-big-box .avia-innerbox {

    font-family: ‘MyriadProLightRegular';

    }

    It’s really strange that it doesn’t work:

    Firefox, IE9 and WPML 2 domains option

    Works:

    Chrome, Opera

    If I put WPML to use “Different languages in directories”, then it works in every browser.

    3) Yes, I did it in String translation in WPML in ‘Widgets’ context and it didn’t appear on site. Before I had experience with String translation and to me it also looks strange, I even checked Choices widget title php code, and WPML filter is applied there..

    If you need more information, please let me know. Login or something?

    Thanks,

    Aleksandr

    #84620

    bump!

    Hello,

    Please give me some answer, will these issues be fixed or not?

    Sorry David, but your answer doesn’t give any hope that it will be fixed.

    You said it’s my problem with domain name, I think it’s not my problem, it’s templates problem since it’s should work with WPML as said in description, otherwise I could buy any template and make WP Multilingual site with WP Multisite option. But I really like Kriesi templates and bought one because of WPML support!

    Regarding third problem, as you can see I did your suggestion in the first post! I don’t know, is it some kind of solving problem write to me that I’ve already done..

    Thanks,

    Aleksandr

    #84621

    Hi Aleksandr,

    I’ll have to ask Kriesi to take a look as I am familiar enough with the WPML implementation and how the AJAX portfolio might effect its use.

    Regards,

    Devin

    #84622

    Dear Aleksandr,

    Let me contact Kriesi for an updated version of the theme to get it fixed.

    I have the idea that using the home url instead of the site url for ajax, requests should work.

    Sorry about the late reply, I wasnt notified of your message. Ill make sure I set it up to get notified from now.

    Best,

    David

    #84623

    Hi!

    I have sent the files to david, hopefully he can help us with this issue :)

    Regards,

    Kriesi

    #84624

    Hey WPML-Team,

    Any news on this?

    I’ve put 1.5 Choices version and no fix to portfolio and widget title translate still..

    Also there is no FEEDBACK button on the left side on second language with A different domain per language -> ON.

    Thanks in support, WPML-Team please provide any status information.

    BR,

    Aleksandr

    #84625

    Hey Aleksandr,

    I’m not aware of any news yet but we’ll hopefully have an update very soon.

    Regards,

    Devin

    #84626

    Hi,

    I found a bug place for first problem:

    avia.js line 372:

    url: avia_framework_globals.ajaxurl,

    If I put direct link there like

    url: “http://nuforms.com/wp-admin/admin-ajax.php”, – this works on English .com site

    url: “http://nuforms.ru/wp-admin/admin-ajax.php”, – this works on Russian .ru site

    So to fix it, here what I did:

    in file class-superobect.php find this function function set_javascript_framework_url() and replace with below:

    function set_javascript_framework_url()

    {

    if ( is_language( ‘en’ ) ) {

    echo “n <script type=’text/javascript’>n /* <![CDATA[ */ n”;

    echo “var avia_framework_globals = {n tframeworkUrl: ‘”.AVIA_FW_URL.”‘, n tinstalledAt: ‘”.AVIA_BASE_URL.”‘, n tajaxurl: ‘”.admin_url( ‘admin-ajax.php’ ).”‘n t}; n /* ]]> */ n “;

    echo “</script>n n “;

    } elseif ( is_language( ‘ru’ ) ) {

    echo “n <script type=’text/javascript’>n /* <![CDATA[ */ n”;

    echo “var avia_framework_globals = {n tframeworkUrl: ‘”.AVIA_FW_URL.”‘, n tinstalledAt: ‘”.AVIA_BASE_URL.”‘, n tajaxurl: ‘”.home_url( ‘wp-admin/admin-ajax.php’ ).”‘n t}; n /* ]]> */ n “;

    echo “</script>n n “;

    }

    }

    Also to functions php add this function:

    function is_language( $current_lang ) {

    global $sitepress;

    if ( $current_lang == $sitepress->get_current_language() ) {

    return true;

    }

    }


    While I was waiting for support I did this fix by my own, regardless my weak php skills!!! Its very strange that customer should fix theme problems by himself while there are a lot of support team members…. is that good support? I dont want to complain, jsut saying that if noone DON’T WANT TO HELP, do it by yourself! Hope this fix help someone with same problem.


    SUPPORT TEAM! PLEASE HELP ME WITH OTHER PROBLEMS!

    Thanks,

    Aleksandr

    #84627

    For some reason it stopped work, but solution is somewhere near for first problem, please check code.

    Thanks

    #84628

    1st problem partly fixed.

    I did it with hard coded link for second language, but it’s not a good solution, in file class-superobect.php find this function function set_javascript_framework_url() and replace with below:

    function set_javascript_framework_url()

    {

    if ( ICL_LANGUAGE_CODE == ‘en’ ) {

    echo “n <script type=’text/javascript’>n /* <![CDATA[ */ n”;

    echo “var avia_framework_globals = {n tframeworkUrl: ‘”.AVIA_FW_URL.”‘, n tinstalledAt: ‘”.AVIA_BASE_URL.”‘, n tajaxurl: ‘”.home_url( ‘/wp-admin/admin-ajax.php’ ).”‘n t}; n /* ]]> */ n “;

    echo “</script>n n “;

    } if ( ICL_LANGUAGE_CODE == ‘ru’ ) {

    echo “n <script type=’text/javascript’>n /* <![CDATA[ */ n”;

    echo “var avia_framework_globals = {n tframeworkUrl: ‘”.AVIA_FW_URL.”‘, n tinstalledAt: ‘”.AVIA_BASE_URL.”‘, n tajaxurl: ‘http://nuforms.ru/wp-admin/admin-ajax.php’n t}; n /* ]]> */ n “;

    echo “</script>n n “;

    }

    }

    #84629

    Hi nuforms,

    I apologize for not having a solution for the issue, I’ll check with Kriesi to see if there have been any developments on our end since there hasn’t been a response here on it.

    It definitely isn’t our intention to have the customer bug fix themselves but as I’m sure you have found going into the issue and code it can be quite complicated to fix sometimes.

    Regards,

    Devin

    #84630

    Hi,

    Problem 2 fixed also, regarding cross domain font-face rendering in firefox by adding this to .htaccess:

    AddType application/vnd.ms-fontobject .eot

    AddType font/ttf .ttf

    AddType font/otf .otf

    <FilesMatch “.(ttf|otf|eot)$”>

    <IfModule mod_headers.c>

    Header set Access-Control-Allow-Origin “*”

    </IfModule>

    </FilesMatch>

    So the problem 3 only left! I think it’s totally related to the theme, I also have no success to show Latest Portfolio widget content on second language. (remember, different domains per language)

    Hope you guys will find solution!

    Thanks,

    Aleksandr

    #84631

    Problem 1 is fully fixed and solution could be added to the theme update with Kriesi additional filters, so the all images and content has an appropriate domain name. What I mean additional filter, you can read from here: http://www.wp-code.com/wordpress-snippets/how-to-make-sure-the-correct-domain-is-used-in-wpml/ so every content has an appropriate domain name.

    So using multi domain site with WPML there should be added function and filters to functions.php:

    <br />
    //Add all the necessary filters. There are a LOT of WordPress functions, and you may need to add more filters for your site.<br />
    add_filter ('site_url', 'wpcs_correct_domain_in_url');<br />
    add_filter ('get_option_siteurl', 'wpcs_correct_domain_in_url');<br />
    add_filter ('stylesheet_directory_uri', 'wpcs_correct_domain_in_url');<br />
    add_filter ('template_directory_uri', 'wpcs_correct_domain_in_url');<br />
    add_filter ('post_thumbnail_html', 'wpcs_correct_domain_in_url');<br />
    add_filter ('plugins_url', 'wpcs_correct_domain_in_url');<br />
    add_filter ('admin_url', 'wpcs_correct_domain_in_url');<br />
    add_filter ('fullsize', 'wpcs_correct_domain_in_url');<br />
    //Changes the domain for a URL so it has the correct domain for the current language<br />
    //Designed to be used by various filters<br />
    //@param string $url<br />
    //@return string<br />
    function wpcs_correct_domain_in_url($url){<br />
    if (function_exists('icl_get_home_url')) {<br />
    // Use the language switcher object, because that contains WPML settings, and it's available globally<br />
    global $icl_language_switcher;<br />
    // Only make the change if we're using the languages-per-domain option<br />
    if (isset($icl_language_switcher->settings['language_negotiation_type']) && $icl_language_switcher->settings['language_negotiation_type'] == 2)<br />
    return str_replace(untrailingslashit(get_option('home')), untrailingslashit(icl_get_home_url()), $url);<br />
    }<br />
    return $url;<br />
    }<br />

    Actually this filter fixes the problem with AJAX portfolio opening:

    add_filter ('admin_url', 'wpcs_correct_domain_in_url');

    Thanks,

    Aleksandr

    #84632

    One more filter added for image right url, to the post above:

    add_filter ('wp_get_attachment_url', 'wpcs_correct_domain_in_url');

Viewing 16 posts - 1 through 16 (of 16 total)

The topic ‘WPML Ajax porfolio item opening issue and Widget title’ is closed to new replies.