Please make sure to update to WPML 4.3.4 before reporting any issue

Hi, Amit here, I am the WPML Support Manager, our current ticket queue is high, update your WPML plugins and make sure you meet the minimal requirements for running WPML before reporting an issue please - many tickets are resolved doing that

Please look at our updated list of Known Issues and you can also use our support search to find helpful information and of course review our documentation before opening a ticket.

If you do need to open a ticket please make sure to provide us with all the needed information as described in this page

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 11 replies, has 3 voices.

Last updated by sarah.n 6 years, 11 months ago.

Assigned support staff: sarah.n.

Author Posts
December 14, 2012 at 5:21 pm #90748

Sylvie

Hi,

Since the upgrade of the multilingual CMS from version 2.6.1 to 2.6.2, I have huges flags showing for the language selector in the WP admin panel. Please see attached image. If I click on all languages it goes away but reload everytime I get a new page.

When I deactivate the plug-in, the flags go away. I've reinstalled an earlier version of CMS multilingual and the flags disapear. Any ideas ? Thanks.

December 15, 2012 at 10:05 am #90854

Harshad

Dear Sylvie,

I see you have a custom flag uploaded other than default flag, Can you re-upload your custom flag from wpml -> languages -> edit languages?

December 15, 2012 at 6:48 pm #90926

Sylvie

Hi Harshad, I switched to WPML flags (no problems) and then re-uploaded my custom flags but they reappear.

I had made a custom-functions.php with the following code, could the problem be there?

<?php

/*Code for language footer widget modified to exclude active language*/
function languages_list_footer(){
$languages = icl_get_languages('skip_missing=0&orderby=code');
if(!empty($languages)){
echo '<div id="footer_language_list">

    ';
    foreach($languages as $l){
    echo '

  • ';
    if(!$l['active']) echo '<a href="'.$l['url'].'">';
    if(!$l['active']) echo '<img src="'.$l['country_flag_url'].'" height="18" alt="'.$l['language_code'].'" width="18"/> ';
    if(!$l['active']) echo $l['native_name'];
    if(!$l['active']) echo '</a>';
    echo '
  • ';
    }
    echo '

</div>';
}
}
add_filter('wp_footer', 'languages_list_footer');

/*Code for horizontal line of flags in header without current language*/

function language_selector(){
$languages = icl_get_languages('skip_missing=0&orderby=code');
if(!empty($languages)){
foreach($languages as $l){
if(!$l['active']) echo '<a href="'.$l['url'].'">';
if(!$l['active']) echo '<img src="'.$l['country_flag_url'].'" height="36" alt="'.$l['language_code'].'" width="36"/> ';
if(!$l['active']) echo '</a>';
}
}
}
?>

December 15, 2012 at 8:45 pm #90931

Sylvie

I have also reverted to older version, switch to WPML flags, upgraded then loaded my custom flags and they reappear again at the same size in the language switcher of the admin menu.

December 16, 2012 at 9:04 am #90992

Harshad

The custom functions should not interfere in admin language switcher, I think its another CSS which is overriding the flag size.

I will have to look into it, Can you please send me test Admin details to my email address.

December 16, 2012 at 6:27 pm #91040

Sylvie

Hi Harshad, just sent you the info. Thanks for looking into it.

December 17, 2012 at 3:39 pm #91333

sarah.n
Supporter

Languages: English (English ) German (Deutsch )

Hello Sylvie,

I will be taking over your ticket at this point. I have sent you an email regarding the test site login information.

December 19, 2012 at 2:22 pm #91984

sarah.n
Supporter

Languages: English (English ) German (Deutsch )

Hello Sylvie,

Just an update to the flag icon problem.

It appears that WordPress 3.5 applies the following css in the admin area:

#wpadminbar * {
  -moz-box-sizing: content-box;
  color: #CCCCCC;
  font: 13px/28px sans-serif;
  height: auto;
  letter-spacing: normal;
  margin: 0;
  padding: 0;
  position: static;
  text-shadow: 0 -1px 0 #444444;
  text-transform: none;
  width: auto;
}

What concerns us here is the width: auto; Now this would normally not cause any issues hwoever as you have uploaded large custom flags (300 x 300) that css property forces them to display at the full size.

May I suggest that you manually resize your custom flags to the exact size you want them to display?

Can you try this please?

December 19, 2012 at 5:41 pm #92085

Sylvie

Hi Sarah, I've resized my flags to the minimum width I use to display them in my site, which is 36x36. Although it is still too big for the admin menu of WP, at least, it let's me work and be functional. Thanks for the patch!

One last question, would it be possible to modify that property, say for example in WPML so even if the images of the flags uploaded are larger, they would be displayed at the size used by WPML before the upgrade?

Thanks

December 20, 2012 at 6:30 am #92145

sarah.n
Supporter

Languages: English (English ) German (Deutsch )

Sylvie,

I would rather suggest that you load an admin-only css stylesheet from your theme.
Example:

add_action( 'admin_print_styles', 'mytheme_add_admin_styles' );
function mytheme_add_admin_styles() {
        $file_dir=get_bloginfo('template_directory');
        wp_enqueue_style("admin-styles", $file_dir."/scripts/custom_admin_styles.css", false, "1.0", "all");
}
December 20, 2012 at 4:27 pm #92372

Sylvie

Hi Sarah, I try to learn as much as I can but I am not a programmer. Could you give me more details on how to add such an admin-only css? In which file do I add the code you provided, and where in the file? I also have a child-style css, so can I put the styling there and what do I use to call up the proper element to style?

December 21, 2012 at 6:35 am #92540

sarah.n
Supporter

Languages: English (English ) German (Deutsch )

Hello Sylvie,

If you are using a child theme add the following code into your child theme's functions.php file

add_action( 'admin_print_styles', 'mytheme_add_admin_styles' );
function mytheme_add_admin_styles() {
wp_enqueue_style("admin-styles", get_stylesheet_directory() . "/scripts/custom_admin_styles.css", false, "1.0", "all");
}

Then create a folder inside the child theme. Name it "scripts". If you already have a folder which holds javascript files then adjust the path in the function above.

Next, create a css file and name it "custom_admin_styles.css" This will be uploaded inside the child theme/scripts folder.

This is what "custom_admin_styles.css" should contain:

#wpadminbar #wp-admin-bar-WPML_ALS img {width:enter-width-in-px;height:enter-height-in-px;}

Let me know how you get on with this.

The topic ‘[Closed] Huge languages flags showing since upgrade’ is closed to new replies.