Supporting each other

Community forums

Welcome, Guest
Username: Password: Remember me
Report any technical problems you discover and discuss solutions.
  • Page:
  • 1
  • 2

TOPIC: Xerte offline does not work

Xerte offline does not work 1 year 7 months ago #6509

  • victor777
  • victor777's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 5
  • Thank you received: 0
Dear Tom

The file is here

drive.google.com/file/d/1omV3myNz7SS8taRkDK-joevXFocjM9Sl/view?usp=sharing

Thanks

Please Log in or Create an account to join the conversation.

Xerte offline does not work 1 year 7 months ago #6510

  • tom
  • tom's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 1092
  • Thank you received: 234
Hmmm. There is still someting fishy going on with the language files. It seems that the byte in the xml file, to indicate that the content is utf-8 is not particularly liked by Chrome.

If I strip that out, then it seems to work.

I don't know which version of Xerte online toolkits you use, but you can try the following:

Make a backup of modules/xerte/parent_templates/Nottingham/common_html5/js/xenith.js

Edit that file, and search for 'langxmlstr'. You should see a code fragmant like this:
// function gets data from language file
function x_getLangData(lang) {
    if (typeof langxmlstr != 'undefined')
    {
        // We have a off-line object with the language definition in a string
        // Convert to an XML object and continue like before
	x_languageData = $($.parseXML(langxmlstr)).find("language");
        x_setUp();
    }

Insert the following line right after the comment that starts with //Convert
langxmlstr = langxmlstr.substr(langxmlstr.indexOf("<"), langxmlstr.lastIndexOf(">") + 1);

So the resulting fragment is as follows:
// function gets data from language file
function x_getLangData(lang) {
    if (typeof langxmlstr != 'undefined')
    {
        // We have a off-line object with the language definition in a string
        // Convert to an XML object and continue like before
	langxmlstr = langxmlstr.substr(langxmlstr.indexOf("<"), langxmlstr.lastIndexOf(">") + 1);
        x_languageData = $($.parseXML(langxmlstr)).find("language");
        x_setUp();
    }

Of course you can check that in your project, by editing the xenith.js in there first and see if it works for you.

I attached a fixed xenith.js, that I patched from your zip file. You should also be able to copy that in your xerte installation.
Attachments:

Please Log in or Create an account to join the conversation.

Xerte offline does not work 1 year 7 months ago #6511

  • victor777
  • victor777's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 5
  • Thank you received: 0
thanks a lot for all your help my friend.
Everything was perfect after that fixed code.
Welcome to Medellín Colombia whenever you like to come.

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
  • 2
Moderators: ronmjultenjjs
Time to create page: 0.051 seconds
Copyright © 2021 The Xerte Project.
Xerte logo Apereo logo OSI Logo

Search