-
AuthorPosts
-
July 4, 2014 at 12:22 pm #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 tJuly 4, 2014 at 12:46 pm #287152Hey Sergio!
Do you mind creating a temporary admin login and posting it here privately so we can look into it?
Best regards,
YigitJuly 4, 2014 at 12:52 pm #287155This reply has been marked as private.July 4, 2014 at 5:35 pm #287302Hi!
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,
PeterJuly 10, 2014 at 12:00 am #289251Hello 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/', 'http://www.yachtcharterbcn.com/', $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
SergioJuly 10, 2014 at 5:23 pm #289623Hi!
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!
PeterJuly 10, 2014 at 6:16 pm #289657Hello 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
SergioJuly 10, 2014 at 9:02 pm #289720Hey!
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,
PeterJuly 11, 2014 at 2:13 am #289869July 12, 2014 at 2:53 pm #290479Hi!
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,
PeterJuly 14, 2014 at 10:27 pm #291270Hello 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
SergioJuly 15, 2014 at 5:14 pm #291701Hey!
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,
PeterJuly 15, 2014 at 7:02 pm #291760Hello 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
SergioJuly 17, 2014 at 4:40 pm #292552Hi!
The calendar seems to work for me now: http://www.clipular.com/c/6408407292575744.png?k=t_fEjQ70YpbDAPqU8cAAyZcl8o4
and http://www.clipular.com/c/5656684064145408.png?k=xx8dV0nfXhGPhLf31OS-oL-MU7ERegards,
Peter -
AuthorPosts
- You must be logged in to reply to this topic.