Clock module does not appear

Hi

I use xibo 1.74 (cms and seven client)

Clock module appears in the layout preview but not in the client !

Thanks

DV

Hi,

It should work and is working for us in our test environment.
Please go to modules page in your CMS and click Verify all.

You should wait few minute and then it appears.
I thought it doesn’t work also but I left turned and the clock module appeared.

Hi

Ok I click Verify all and now the clock module appears with chinese character…

On layout preview clock module appears in french and on the client with chinese character

Thanks

DV

Hello,
look at this link : Clock module displaying in chinese 1.7.4

Hi

I saw this post but when I add : moment.locale("’ . Translate::GetJsLocale() . '"); '; after the line 516,

the Verify all does not stop…

DV

Hi,

Found the issue about the hanging verify all. I skipped a line when updating text_module.php as it is displayed when reading the post.

verify all now works well but the clock is still displaying in Chinese on displays (but not in preview).

Here is how the clock module is formatted, if it may help :
[dddd DD MMMM YYYY HH:mm]

Are you using the Clock module or the Text module?

I am using the clock module. Here is the config screen :

And here is how it is rendered on displays :

Aside from that, the format guide link points to the documentation home page.

As it is working in the Layout Designer but not in the Player we need to try and extract the downloaded, formatted content from the Player library.

These are stored as .htm files in the local player library and are prefixed with a long ID. How many htm files you have will depend on the number of layouts/regions you have.

Your clock will have the following inside it (amongst other things)

<span class="clock" format="dddd DD MMMM YYYY HH:mm"></span>

Can you look through each one until you find your clock and then paste the contents of the file here between code tags?

Yup, link should point to - Clock module

Regarding clock module, it should just work without problems.
It does work for us, using the same date format as you are trying to, see:

For now please do what Dan asked you to do :smile:

Here is the content of the htm file. Opening it directly in IE displays the clock in Chinese too.

<!doctype html>
<html lang="en">
    <head>
        <title>Xibo Open Source Digital Signage</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="viewport" content="width=1788" />
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <!-- Copyright 2006-2014 Daniel Garner. Part of the Xibo Open Source Digital Signage Solution. Released under the AGPLv3 or later. -->
        <style type="text/css">
            body {
                margin: 0;
                overflow: hidden;
                font-family: sans-serif, Arial, Verdana, "Trebuchet MS";
            }
            h1, h2, h3, h4, p {
                margin-top: 0;
            }
            #iframe {
                border: 0;
            }
            .cycle-slide p, p.cycle-slide {
                margin-bottom:0;
            }
        </style>
        <!--[[[STYLESHEETCONTENT]]]-->
        <link href="fonts.css" rel="stylesheet" media="screen"><style type="text/css"></style>
    <style type='text/css'>body {background-image: url('C:/Users/ds/Documents/Xibo Library/backgrounds/1920x1080_9.jpg'); background-attachment:fixed; background-color:#000000; background-repeat: no-repeat; background-position: -62px -974px; }</style></head>
    <!--[if lt IE 7 ]><body class="ie6"><![endif]-->
    <!--[if IE 7 ]><body class="ie7"><![endif]-->
    <!--[if IE 8 ]><body class="ie8"><![endif]-->
    <!--[if IE 9 ]><body class="ie9"><![endif]-->
    <!--[if (gt IE 9)|!(IE)]><!--><body><!--<![endif]-->
        <div id="content"><p style="text-align: center;"><span style="font-size:80px;"><span class="clock" format="dddd DD MMMM YYYY HH:mm"></span></span></p>
</div>
    </body>
    <script type="text/javascript" src="jquery-1.11.1.min.js"></script><script type="text/javascript" src="moment.js"></script><script type="text/javascript" src="xibo-layout-scaler.js"></script><script type="text/javascript">
                    var locale = "";
                    var options = {"previewWidth":0,"previewHeight":0,"originalWidth":"1788","originalHeight":"72","scaleOverride":0};

                    function updateClock() {
                        $(".clock").each(function() {
                            $(this).html(moment().add(0, "m").format($(this).attr("format")));
                        });
                    }

                    $(document).ready(function() {
                        moment.locale(locale);
                        updateClock();
                        setInterval(updateClock, 1000);
                        $("body").xiboLayoutScaler(options);
                    });
                </script>
</html>
<!--[[[CONTROLMETA]]]-->

That is the issue…

The only way I can see that being empty is if your default language doesn’t exist - what do you have in your DEFAULT_LANGUAGE setting?

Default language is set to fr_FR.

Indeed, setting var locale = “fr_FR”; in the .htm file fixed the issue. However I should not have to edit the file, should I?

No, you shouldn’t, CMS will override this file next time there will be any change to this layout.
So you want something like that:

Could please go to settings->regional and change DEFAULT_LANGUAGE to ‘fr’ just fr not fr_FR and see if that change anything?

As you may imagine I tested it with other languages, obviously including French and it seems to work just fine. in default language you always want to have same name as .mo file with the translation. (or you can try to use detect language assuming your browser is set to French)
List of .mo files with different translations

1 Like

Setting default language to fr instead of fr_FR and unchecking the detect language box made it work. I now get a nice French date/time.
Thanks a lot!

1 Like

Great, happy to help :smile:

This actually was an issue for me too in 1.7.6 and after an entire day of searching your solution works for me. Thank you.