DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:favoris

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
plugin:favoris [2016-01-22 10:37] 88.87.91.3plugin:favoris [2023-10-30 23:12] (current) Klap-in
Line 7: Line 7:
 type       : action, syntax type       : action, syntax
 lastupdate : 2009-03-04 lastupdate : 2009-03-04
-compatible : 2008-05-05rincewind, angua+compatible : RincewindAngua
 depends    :  depends    : 
 conflicts  : conflicts  :
Line 153: Line 153:
  
 Thanks for this excellent plugin!  I've been using it for a couple years now.  Today I created several deeply nested page (about 100 character long namespace strings) and after saving one, I couldn't access my wiki!  I just got a "400 Bad Request - request header or cookie too large" error, regardless of which page I tried to load.  When I deleted (only) the Favoris cookies I could access the site again.  I guess that Favoris is overfilling the cookies and causing problems?  If so, is it possible to insert an "overflow" check to prevent the error?  I'm running the latest Favoris (2009-03-04) on Weatherwax and my browser is Firefox 24.  Thanks! --- [[user>rikblok|Rik Blok]] //2013/10/21 03:35// Thanks for this excellent plugin!  I've been using it for a couple years now.  Today I created several deeply nested page (about 100 character long namespace strings) and after saving one, I couldn't access my wiki!  I just got a "400 Bad Request - request header or cookie too large" error, regardless of which page I tried to load.  When I deleted (only) the Favoris cookies I could access the site again.  I guess that Favoris is overfilling the cookies and causing problems?  If so, is it possible to insert an "overflow" check to prevent the error?  I'm running the latest Favoris (2009-03-04) on Weatherwax and my browser is Firefox 24.  Thanks! --- [[user>rikblok|Rik Blok]] //2013/10/21 03:35//
 +
 +==== Patch for a wiki farm setup ====
 +
 +<code diff>
 +--- action.php.ORIG 2009-03-03 17:25:05.000000000 +0100
 ++++ action.php 2016-03-15 11:22:42.419287081 +0100
 +@@ -42,6 +42,8 @@
 +     function _update_cookie(&$event, $param) {
 +         global $INFO;
 + 
 ++ $cookieDir = empty($conf['cookiedir']) ? DOKU_REL : $conf['cookiedir'];
 ++
 +         if($event->data == 'snapfavoris') {
 +           $event->preventDefault();
 +         }
 +@@ -55,7 +57,7 @@
 +           //Si on ne souhaite pas suivre les favoris
 +           if ($fav['off']==1) {
 +             //On efface les eventuels cookies existants (sauf off)
 +-            foreach ($_COOKIE['favoris'] as $page => $cpt) if ($page != "off") setCookie("favoris[$page]", "", time()-3600, '/');
 ++            foreach ($_COOKIE['favoris'] as $page => $cpt) if ($page != "off") setCookie("favoris[$page]", "", time()-3600, $cookieDir, '', ($conf['securecookie'] && is_ssl()));
 +             return;
 +           }
 +           
 +@@ -64,7 +66,7 @@
 +             //On efface tous les cookies (y compris off)
 +             foreach ($_COOKIE['favoris'] as $page => $cpt) {
 +               list($cpt, $date)=explode(";",$cpt);
 +-              if ($cpt != "-1") setCookie("favoris[$page]", "", time()-3600, '/');
 ++              if ($cpt != "-1") setCookie("favoris[$page]", "", time()-3600, $cookieDir, '', ($conf['securecookie'] && is_ssl()));
 +             }
 +             return;
 +           }
 +@@ -82,7 +84,7 @@
 +         else $cpt=1;
 + 
 +         //On positionne le cookie
 +-        setCookie("favoris[".$INFO['id']."]","$cpt;".time(), time()+60*60*24*7, '/');
 ++ setCookie("favoris[".$INFO['id']."]","$cpt;".time(), time()+60*60*24*7, $cookieDir, '', ($conf['securecookie'] && is_ssl()));
 +     }
 +</code>
  
plugin/favoris.1453455443.txt.gz · Last modified: 2016-01-22 10:37 by 88.87.91.3

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki