Issue #9 invalid

Double render when no default application started

Olexiy Zamkoviy
created an issue

Following snippet normally outputs two smiles on first page load and by one smile on next page reloads. When we do not start default weblocks application it outputs 3 smiles on first load and 2 smiles on second load. Because of double rendering of widgets some session stuff does not work properly.

(defun init-user-session (comp) (with-flow comp (yield (make-widget (lambda (&rest args) (format t ":)~%"))))))

In examples directory there is only one app working properly (weblocks-demo). Other affected with double render. I can make also 2 applications for testing (working correctly and incorrectly), just, please fix the issue. Meanwhile I'm trying to fix it myself.

Comments (5)

  1. Olexiy Zamkoviy reporter

    The problem was that google-chrome requests favicon.ico before page load on every request. So we had 2 request and on second requests there were problems with flash messages (they were displayed during the first "favicon" request). I fixed problem with adding favicon.ico to pub and (serve-static-file "favicon.ico"), but such issue makes weblocks browser incompatible.

  2. Olexiy Zamkoviy reporter

    By the way, here is serve-static-file

    (defun serve-static-file (name)
      (push  
        (hunchentoot:create-static-file-dispatcher-and-handler 
          (format nil "/~a" name) 
          (compute-public-files-path 
            'current-package ; place current package name here 
            (format nil "pub/~a" name))) 
        weblocks::*dispatch-table*))
    
  3. Olexiy Zamkoviy reporter

    By the way, here is serve-static-file

    (defun serve-static-file (name)
      (push  
        (hunchentoot:create-static-file-dispatcher-and-handler 
          (format nil "/~a" name) 
          (compute-public-files-path 
            'current-package ; place current package name here 
            (format nil "pub/~a" name))) 
        weblocks::*dispatch-table*))
    
  4. Log in to comment