Report any technical problems you discover and discuss solutions.

Xerte offline does not work

  • victor777
  • Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 3 months ago #6509 by victor777
Replied by victor777 on topic Xerte offline does not work
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.

More
6 years 3 months ago #6510 by tom
Replied by tom on topic Xerte offline does not work
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:
Code:
// 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
Code:
langxmlstr = langxmlstr.substr(langxmlstr.indexOf("<"), langxmlstr.lastIndexOf(">") + 1);

So the resulting fragment is as follows:
Code:
// 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.

  • victor777
  • Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 3 months ago #6511 by victor777
Replied by victor777 on topic Xerte offline does not work
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.

Moderators: ronmjultenJohnSmith
Time to create page: 0.154 seconds
Copyright © 2026 The Xerte Project.
Xerte logo Apereo logo OSI Logo