Where should this code go?
What i am referring to is under 17.3 Translation Exceptions>Widgets in the Brandspace Documentation.
queue | 16 |
support |
Where should this code go?
What i am referring to is under 17.3 Translation Exceptions>Widgets in the Brandspace Documentation.
It says "We have made a custom widget called "WPML conditional."" Its continues,
1. Go to the widgets page.
2. Drag the "WPML conditional" widget into the sidebar/widget area.
The problem is: The "WPML Conditional" widget does not exist in the widgets page.
Hello
you disabled that widget by commenting the line
i didn't had the time yet to check latest Brandspace update with wp 3.5 / wpml 2.6.2 yet, for sure there are issues between wpml 2.6.1 and latest wordpress release.PHP Code:
//PeGlobal::$config["widgets"][] = "Wpml";
Will do some testing tomorrow morning and update the thread as soon as possible.
My cave is full of servers
I had a problem after the update of both WPML and WP. When i activated the WPML plugin after the update all my post, media and pages admin pages did not list anything. I consulted with WPML support and this is what they said. I have also sent this information to the BrandSpace support as feedback. I hope this helps you in resolving these issues. Thanks for your support.
This was their feedback on rectifying the problems between the theme and WPML:
It seems to be theme problem, Please contact your theme author to check following function in /themes/brandspace/framework/php/PeTheme/PeThemeWPML.php
public function instantiate() {
if (function_exists("icl_get_languages")) {
//PeGlobal::$config["widgets"][] = "Wpml";
}
//PeGlobal::$config["shortcodes"][] = "Wpml";
add_filter('widget_display_callback', array(&$this,'dynamic_sidebar_params_filter'),10,3 );
}
I have commented //PeGlobal::$config["widgets"][] = "Wpml"; and }
//PeGlobal::$config["shortcodes"][] = "Wpml";
yeah, i was referring to that mail you sent to us. Will have a go with 3.5 and latest wpml plugin tomorrow morning.
My cave is full of servers
I took a look at the code and, despite what wpml support told you, issue is not related to our theme but to their plugin:
http://wpml.org/forums/topic/calling...wordpress-3-5/
http://wpml.org/forums/topic/calling...setting-query/
as soon as one calls icl_get_languages (which is documented here), wordpress 3.5 crashes with an error in query.php.
We need icl_get_languages for our conditional widget and lang shortcode to work, by commenting those lines it doesn't get called so the wpml error doesn't trigger anymore.
My cave is full of servers
The issue seems related to icl_get_languages not being able to propely reset the query, the workaround found in one of those posts appears to work
PHP Code:
// edit /themes/brandspace/framework/php/PeTheme/PeThemeWPML.php
// undo the change wpml support made you do
public function options() {
$options[__pe("Any")] = "" ;
$langs = icl_get_languages('skip_missing=0');
// add this line here
wp_reset_query();
if (is_array($langs)) {
foreach($langs as $value) {
$options[strtoupper($value["language_code"])] = $value["language_code"];
}
}
return $options;
}
My cave is full of servers
It looks like it worked. thank you.