Javascript errors / Upgrade errors
Posted: Mon Mar 02, 2015 11:03 am
Hey,
the blogs that I have attended for upgrades from 1.x to 2.x which did not run properly (4 blogs) all showed the same issue.
The new parsing of javascript through Smarty can easily be screwed up by PHP errors, i.e. by wrong config.inc.php files of a template (emitting PHP notices) or by malformed paths, or by outdated plugins. In those cases, the whole javascript file will be invalid.
Users usually saw no proper indication unless they opened their JS console or the JS file URL manually; most usually people wondered why the expanding/collapsing of items wouldn't work.
To remedy this I tried to find a way to at least notice users that something wasn't working properly. For that I added a check to the overview.tpl file that uses a JS check to see whether serendipity.spawn exists or not, and then show an error message.
Commit is: https://github.com/s9y/Serendipity/comm ... e327c35fc2
What do you think?
the blogs that I have attended for upgrades from 1.x to 2.x which did not run properly (4 blogs) all showed the same issue.
The new parsing of javascript through Smarty can easily be screwed up by PHP errors, i.e. by wrong config.inc.php files of a template (emitting PHP notices) or by malformed paths, or by outdated plugins. In those cases, the whole javascript file will be invalid.
Users usually saw no proper indication unless they opened their JS console or the JS file URL manually; most usually people wondered why the expanding/collapsing of items wouldn't work.
To remedy this I tried to find a way to at least notice users that something wasn't working properly. For that I added a check to the overview.tpl file that uses a JS check to see whether serendipity.spawn exists or not, and then show an error message.
Commit is: https://github.com/s9y/Serendipity/comm ... e327c35fc2
What do you think?