Broken pages in Lectora: JavaScript the culprit

… can have multiple reasons. Here we’re looking into one particular broken page, Codificando con la CIF (Coding with the ICF). All previous and all following pages seem to work OK.

The page displays as disarranged objects, apparently with broken JavaScript functionality.

Step 1: Disable all inherited objects.

Result: The page displays correctly.

Step 2: Reenable all inherited objects

Result: The page is broken again.

Step 3: Look at the error in Firefox’ error console:

It is a JavaScript error:

Error: unterminated string literal
Source File: file:///I:/101-199/104.2-who-trainer/104.2-M01-D12/v8.17d-es/page19948.html
Line: 228, Column: 28
Source Code:
VarAktuellerSeitenname.set( ‘Codificando

Step 4: Try to adjust the site’s name

I also adjusted the site below it.

This did not help.

Step 5: Fix the problem in the HTML

Because this is easy to fix, and a single error, I decided to cater to Lectora’s fancy and just fixed it in the HTML. Hey, we’re working on a budget here :-)

VarAktuellerSeitenname.set( ‘Codificando al CIF’ )

The error consisted of a line break inserted by Lectora into JS code.

Remember, you can always hire us to fix your problems.

Leave a Reply