Tagged: x
-
AuthorPosts
-
February 2, 2017 at 8:42 am #1355257
waldaParticipantHi
I think i have the same proble as https://community.theme.co/forums/topic/translate-custom-sidebar-menu-with-wpml/
I’ve started translating duplicate pages to be able to use cornerstone in the future. I get this message above:
Warning: You are trying to edit a translation with the standard WordPress editor, but your site is configured to use the WPML Translation Editor.
there are pages in my website which has a secondary sidebar menu to navigate. But it dissasapears at duplicated translated page (spanish/english). http://institutomalave.com/reproduccion-asistida/
Dou you think i can keep my sidebar menu if i use the translation editor instead duplicate pages an edit one by one?
Thanks!
February 2, 2017 at 12:29 pm #1355527
RupokMemberHi there,
Thanks for writing in! I am not sure and I think it won’t depend on the theme. You can reach the WPML support for better clarification.
Cheers!
February 2, 2017 at 5:36 pm #1355890
waldaParticipantHi. WPML support solved my problem. They told me that x theme has an issue with the sidebars widget an it cannot be translated. They contacted to your people and you told them this will be solved at next release of x theme
I copy the trick:
In the wp-content / themes / x / framework / functions / global / admin / sidebars.php file, replace the “ups_display_sidebar ()” function with the following:
function ups_display_sidebar( $default_sidebar ) { $q_object = get_queried_object(); $sidebars = get_option( 'ups_sidebars' ); foreach ( $sidebars as $id => $sidebar ) { if ( is_singular() ) { if ( array_key_exists( 'pages', $sidebar ) ) { if ( array_key_exists( 'children', $sidebar ) && $sidebar['children'] == 'on' ) { $child = array_key_exists( $q_object->post_parent, $sidebar['pages'] ); } else { $child = false; } $page_id = $q_object->ID; $current_lang= apply_filters( 'wpml_current_language', NULL ); $default_lang= apply_filters( 'wpml_default_language', NULL ); if ($current_lang != $default_lang) { $page_id = apply_filters('wpml_object_id',$page_id, 'page', false, $default_lang ); } if ( array_key_exists( $page_id, $sidebar['pages'] ) || $child ) { return $id; } } } elseif ( is_home() ) { if ( array_key_exists( 'index-blog', $sidebar ) && $sidebar['index-blog'] == 'on' ) { return $id; } } elseif ( is_tax() || is_category() || is_tag() ) { if ( array_key_exists( 'taxonomies', $sidebar ) ) { $tax_id = $q_object->term_id; $current_lang= apply_filters( 'wpml_current_language', NULL ); $default_lang= apply_filters( 'wpml_default_language', NULL ); if ($current_lang != $default_lang) { $tax_id = apply_filters('wpml_object_id',$tax_id, 'category', false, $default_lang ); } if ( array_key_exists( $tax_id, $sidebar['taxonomies'] ) ) { return $id; } } } elseif ( x_is_shop() ) { if ( array_key_exists( 'index-shop', $sidebar ) && $sidebar['index-shop'] == 'on' ) { return $id; } } } return $default_sidebar; }February 2, 2017 at 6:30 pm #1355923
waldaParticipantAfter adding this, I tried to modify order of some elements of the main menu (not sidebar), try to save menu and an internal error occurs. I have reviewed the logs and this is the error:
[Fri Feb 03 01:21:14 2017] [warn] mod_fcgid: read data timeout in 60 seconds
[Fri Feb 03 01:21:14 2017] [error] [client 83.41.4.40] Premature end of script headers: php5.cgi, referer: http://institutomalave.com/wp-admin/nav-menus.phpI only happen when trying to record changes in the original language. When I change the menu of the version in another language no error occurs.
What could be the reason Is it relative to the changes I have made or a problem with my hosting?
thanks
February 2, 2017 at 11:39 pm #1356324
RupokMemberHi there,
Looks like the error is specific to mod_fcgid. Your hosting provider might help on this. Here I got a solution (at bottom) that you can try – http://expressionengine.stackexchange.com/questions/7467/mod-fcgid-read-data-timeout-in-45-seconds-premature-end-of-script-headers
Cheers!
February 3, 2017 at 4:31 am #1356564
waldaParticipantYes. I contacted the hosting. They have upgraded the php version to a higher one and the problem has disappeared. It was obsolete.
Thanks
February 3, 2017 at 8:41 am #1356776
RahulModeratorGlad to hear it!
Let us know if we can help with anything else.
Thanks!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1355257 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
