Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #287140

    Hello,

    I m using your theme, installed in http://www.yachtcharterbcn.com. Main domain is for english and novamaris.es is for spanish.
    Yesterday i update WPML to last version and I have detected that switcher language of theme Enfold doesn t work properly now. If i m in http://www.yachtcharterbcn.com, flags works correctly but if i m in novamaris.es flag for english language doesn t redirect to yachtcharterbcn.com, stay at novamaris.es
    I wrote yesterday night to WPML and they ask me:

    “Hello,
    Where are your language switchers located. Are they in the menu or in a widget?
    Do you have custom code controlling your switcher?
    Thanks,”

    This issue is not reselved yet and i write to you to know if is possible a new problem compability theme with last WPML update.

    Regards
    Sergio
    I don t

    #287152

    Hey Sergio!

    Do you mind creating a temporary admin login and posting it here privately so we can look into it?

    Best regards,
    Yigit

    #287155
    This reply has been marked as private.
    #287302

    Hi!

    We didn’t change the theme code and I’m pretty sure it’s a WPML bug. If they (WPML support staff) need the code of the theme language switcher I attached it below:

    
    		function avia_wpml_language_switch()
    		{
    			global $sitepress, $avia_config;
                
                if(empty($avia_config['wpml_language_menu_position'])) $avia_config['wpml_language_menu_position'] = apply_filters('avf_wpml_language_switcher_position', 'sub_menu');
                if($avia_config['wpml_language_menu_position'] != 'sub_menu') return;
    
    			$languages = icl_get_languages('skip_missing=0&orderby=custom');
    			$output = "";
    
    			if(is_array($languages))
    			{
    				$output .= "<ul class='avia_wpml_language_switch'>";
    
    				foreach($languages as $lang)
    				{
    					$currentlang = (ICL_LANGUAGE_CODE == $lang['language_code']) ? 'avia_current_lang' : '';
    
    					if(!avia_is_overview() && (is_home() || is_front_page())) $lang['url'] = $sitepress->language_url($lang['language_code']);
    					         
    					$output .= "<li class='language_".$lang['language_code']." $currentlang'><a href='".$lang['url']."'>";
    					$output .= "	<span class='language_flag'><img title='".$lang['native_name']."' src='".$lang['country_flag_url']."' /></span>";
    					$output .= "	<span class='language_native'>".$lang['native_name']."</span>";
    					$output .= "	<span class='language_translated'>".$lang['translated_name']."</span>";
    					$output .= "	<span class='language_code'>".$lang['language_code']."</span>";
    					$output .= "</a></li>";
    				}
    
    				$output .= "</ul>";
    			}
    
    			echo $output;
    		}
    

    Regards,
    Peter

    #289251

    Hello Peter,

    From WPML wrote me next:

    “I tested this and it seems to work properly with the default theme. I changed the file config-wpml/config.php at the lines 268-270:

    if( $lang['language_code'] == 'en' ) {
    $lang['url'] = str_replace( 'http://www.novamaris.es/&#039;, 'http://www.yachtcharterbcn.com/&#039;, $lang['url'] );
    }

    This solved issue. I don t know if it was a config WPML theme or WPML plugin, and if this solution was definitly or something temporal until next update.
    The question is that today i have updated theme to 2.9 and that solution is not working now.
    Us well i have detected that puglin for booking is not working for second language (yes for main):
    Exemple: main: http://www.yachtcharterbcn.com/charter/rent-sailboat-jeanneau-so39ds/ at end is booking calendar
    second language: http://www.novamaris.es/charter/alquila-velero-jeanneau-so39ds/ at end booking plugin calendar doesn t charge …
    I need help to solve this issue.
    Regards
    Sergio

    #289623

    Hi!

    1) Did you modify the wp-content\themes\enfold\config-wpml\config.php file again? Probably the updated theme files overwrote your modified config.php file and now the fix isn’t working anymore. You just need to modify it again based on the instructions posted here: https://kriesi.at/support/topic/last-update-wpml-and-enfold-switcher-language/#post-289251 and the fix should work again.

    2) The website displays an error:

    
    XMLHttpRequest cannot load http://www.yachtcharterbcn.com/wp-admin/admin-ajax.php. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://www.novamaris.es' is therefore not allowed access. 
    

    which is not related to the theme. You must either hire a developer who can take care of the cross domain error (see http://stackoverflow.com/questions/20035101/no-access-control-allow-origin-header-is-present-on-the-requested-resource ) or you make sure that both websites are loaded from one domain ( http://www.yachtcharterbcn.com/ or http://www.yachtcharterbcn.es/ ). You can’t use different domains if you want to use ajax.

    Cheers!
    Peter

    #289657

    Hello Peter,

    WPML modified again config.php, so no is working … but i don t understand reason of this problem because before WPML update all works perfect. So issue, is a problem of theme or WPML?

    About xmlhttpRequest i don t understand what you want to mean. I have just one server where is installed one wp.
    Main domain of this server is http://www.yachtcharterbcn.com (WPML is configurated for english) and http://www.novamaris.es is just a alias domain that redirect to main server.

    Before there wasn t any problem!
    regards
    Sergio

    #289720

    Hey!

    1) I think it’s a WPML issue. We didn’t change the flag code recently and it worked just fine with WPML 3.1.5. Since 3.1.6 two or three users reported some issues with wrong redirects, etc. but I’m pretty sure it’s no theme code issue.

    2) It’s something which is beyond the scope of our support forum. If you’re not sure what’s the best solution please consult a developer. The main problem is ajax doesn’t allow cross domain requests (i.e. requests from http://www.novamaris.es/ to http://www.novamaris.com or vice versa). It’s not important where the domains are hosted – you can host them on the same server or different servers. Personally I would recommend to switch to the sub-domain or directory solution (i.e. http://www.novamaris.com and http://es.novamaris.com or http://www.novamaris.com and http://www.novamaris.com/es/ ) but if you want to use two different domains you definitely must tweak your code or server settings to support cross-origin resource sharing: http://www.d-mueller.de/blog/cross-domain-ajax-guide/

    Regards,
    Peter

    #289869

    Hello Peter,

    I have reinstalled WPML 3.1.5 and flags without config.php modification works ok. Works ok too booking calendar.
    So problem must to be a WPML update.
    Could you check if issue about error xmlrequest is still there? i don t know how to check.
    Thanks for all
    Sergio

    #290479

    Hi!

    No, it’s not there anymore. It seems like WPML already takes care of CORS ajax requests but the 3.1.6 update broke the code somehow.

    Best regards,
    Peter

    #291270

    Hello Peter,

    thanks for your help!.
    WPML support wrote me about this and they asked me to reinstall 3.1.6 and “Replace the sitepress-multilingual-cma/inc/wpseo-sitemaps-filter.php with the attached file”.
    It seems that work properly and for this reason i write to you because if you have more issues like mine, may be this information will help anothers users. If you want i could send you file.
    About Ajax problem that you inform me before, i don t know how to check if there is any problem now with 3.1.6 and this file … Could you test it for me?
    Thanks and regards
    Sergio

    #291701

    Hey!

    I can’t test the booking calendar on http://www.novamaris.com/ – I just get a “Hosted by SigmaWeb Visit SigmaWeb!” message. On this page http://www.novamaris.es/ the event calendar doesn’t work or at least I couldn’t find it…

    Regards,
    Peter

    #291760

    Hello Peter,

    Booking calendar doesn t been shown at main page.
    In english version, one exemple is http://www.yachtcharterbcn.com/charter/rent-hanse-350-16th-23th-august/
    In spanish version, another exemple is http://www.novamaris.es/charter/alquila-hanse-350-del-15-al-23-de-agosto/
    Regards
    Sergio

    #292552
Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.