external index.html issue
March 11, 2014 12:00 AM
Hi,
there's a problem with how external HTML objects are included in Lectora.
Steps to reproduce:
1. Click "Insert Web Window" -- "Local content" -- "Copy all files and subfolders"
2. Navigate to your local html content (let's say it's a HTML game), select "index.html". The files are added into /external/ folder and sit there safely.
4. Publish and open. You'll notice that all game files have been copied into the root folder of your course, and that the game's index.html file has been overwritten with Lectora's main index.html. So when you view the slide with the game, it shows your Lectora course inside your Lectora course.
Similarly, if you want to add multiple HTML games, and they have similarly named folders or files, they'll be overwritten already in the project (you'll get a warning but only after some non-duplicate files have been copied, and you'll have to sort this mess).
Obviously, this should not happen as a silent bug. Maybe each time user adds local webcontent, it should be copied into a separate subfolder in /extern/. When the project is published, the files should be placed into /extern/1, /extern/2 and so on, to avoid overwriting them. The link in the External Object's HTML should take account of that. That's just one way to solve it.
Discussion (4)
Another problem is that all the extra files are not included as "required" with the web window. So if you copy the web window into another course, it does not take the files with it, you have to find them and move them on your own.
And even if you wanted to add the extra files and folders to the web window object as "required", you.. can not. Unlike normal External HTML Objects, the Web Window does not have the "Additional files" or "Required variables" option.
UPDATE. Even if you add folders as "Additional files/folders" to an External Object, their contents isn't copied with the object. So imagine this scenario:
1. You create an external object in Title A, add folder "myfiles" as additional folder.
2. You copy the object into the Title B. Lectora copies the object and the "myfiles" folder to the new title.
But the folder is empty. Lectora only re-created the "myfiles" folder and didn't copy any files in it. If you want all files to be copied, you have to add all of them as Additional files. Kind of counter-intuitive, I think.
Another bug linked to External HTML Objects. Steps to reproduce:
1. Create an External HTML Object.
2. Add a folder into "additional files and folders" for the object.
3. Try and save the Ext Object as a Library Object. Lectora will throw a "cannot write to disk" error. Lectora will still create the AWO, but it'll be broken and cause issues if you try to add it to a project.
Expected behaviour:
3. Save the Ext Object as a Library Object. It saves normally and imports normally into any titles, including all the content that was in the additional folders.
Another issue (not critical) is that you cannot use a dot in the name of an External Object. Try renaming it into "External.object" or "google.com" and it will revert to its original name. Same applies to a few other non-alphanumerical characters.
Hi Sergey,
We met at the Lectora Conference 2014. You showed me branchtrack after the presentation by Jennifer Platt.
I have been trying to place 5 html5 games I have created into one lectora project using the web window. Each time Lectora replaces the index.html automatically. I have tried renaming the individual index & html5game folders with unique numbers, but on publish, lectora reports "they have gone missing."
Any updates on the external link issue for html?
Discussions have been disabled for this post