Double render when no default application started

Olexiy Zamkoviy avatarOlexiy 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

    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

    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

    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
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.