Last update: Wed, Sep 12, 2012 at 10:11 PM.
River2 encoding issues
  • Late in the day a bunch of messages on the Frontier-user list about breakage. The dynamic home page, a view on the river, doesn't work. The problems started Tuesday morning. The static pages work fine.
  • Andrew Shell gave me some more data to work with that quickly led me to the problem. There's a dynamic JSON river.js file, that's returned to make up the home page. It can be parameterized to only return the items in an individual feed, or only podcasts or pictures, so it isn't an option to just use the static JSON river, it has to be dynamic.
  • That means the text has to flow out of Frontier, and it interprets backslashes the same way that JSON does, and therefore consumes them. And makes the JSON invalid, leading to the breakage.
  • The solution is for Frontier to pass the text back without any interpretation. Found a trick that made this possible. I simply changed the template from {bodytext} to <%bodytext%> -- making it a macro, and I turned macro processing on (it had been off for this page). Once the macro substitution takes place there is no further processing, which leaves the backslashes alone. Problem solved. It may come up again, in other places, so I wanted to leave a note.
  • Also at the same time, I made a change that encodes backslash as double-backslash. This had been a long-standing omission. I figure with four programmers watching now, it's probably cool to attempt this change, figuring that any breakage is likely to be reported. Devolopment approaches can change now that we're getting reports. Big change.
  • Andrew also suggested making a change in the JavaScript code, but I do not want to do this at this time. Too many moving parts. Let's have this settle down before making the other change. It should be done as part of general work on the river JS code.
    • river2suite.viewJsonNews3
    • river2Suite.viewDynamicJson