[ 
https://issues.apache.org/jira/browse/JSPWIKI-1049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18134412#comment-18134412
 ] 

Arturo Bernal commented on JSPWIKI-1049:
----------------------------------------

Follow up to my earlier comment, which left a wiki under a context path 
untried. I ran the current build (master plus a small unrelated change, Tomcat 
10.1, Chrome) as /wiki, with a host name that had no earlier cookies. On the 
first visit the wiki set one JSPWikiUserPrefs cookie with the path /wiki. After 
choosing the wysiwyg editor, section editing and the time zone GMT-5 and 
saving, the three values were there after reloading, and there was still one 
JSPWikiUserPrefs cookie, with the path /wiki. I repeated it with 
jspwiki.baseURL set to an address that ends with a slash, as in the comments of 
the report, and saved another preference: there was still one cookie with the 
path /wiki, not a second one with a slash at the end. So the two cookies with 
and without the final slash do not appear in this build, with or without the 
slash in the base URL.

A note for testing: wikis on the same host name share the cookies of the 
browser even on different ports, and in my first try with localhost I got two 
JSPWikiUserPrefs cookies only because other test wikis of mine were on other 
ports with the path /.

Separately, while doing this I found a case in which a preference is lost: a 
time zone with a plus sign. I chose GMT+5 and saved; after reloading, the 
selector showed the first option, GMT-12, and the cookie held GMT 5 with a 
space. The function that reads cookies in util/cookies.js replaces every plus 
sign with a space after decoding the value, and the value is written with the 
plus sign encoded, so GMT+5 turns into GMT 5. GMT-5 of this report is not 
affected. Limits: the report was about 2.10.2 and I only tried Chrome. Leaving 
this issue open.

> User preferences are not saved.
> -------------------------------
>
>                 Key: JSPWIKI-1049
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-1049
>             Project: JSPWiki
>          Issue Type: Bug
>          Components: Templates and UI
>    Affects Versions: 2.10.2
>         Environment: Amazon AWS Linux, yum installed OpenJDK 1.8.0, yum 
> installed Tomcat 8.0.39, downloaded JSPWiki 2.10.2 with Haddock template, 
> current Firefox browser
>            Reporter: Lance Bader
>            Priority: Major
>
> * Select User Preferences in user dropdown menu
> * Modify default editor to wysiwyg
> * Select section editing
> * Change Timezone to GMT-5
> * Click save
> Preferences are not saved.  Returning to User Preferences shows defaults.  
> Section editing icons are not present.  Plain editor is the default.
> Browser has two cookies with the name JSPWikiUserPrefs, one with path 
> /MLIWiki/ and one with path /MLIWiki .  Both have the same content:
> %7B%22version%22%3A%22haddock02%22%7D
> The only hint I can find in jspwiki.log:
> 2017-01-30 19:58:37,815 [http-nio-9443-exec-2] INFO 
> org.apache.wiki.util.PropertyReader MLIWiki:/MLIWiki/UserPreferences.jsp 
> MLIWiki:https://tools.museslabs.us:9443/MLIWiki/UserPreferences.jsp - No 
> jspwiki.custom.config defined for this context, looking for custom properties 
> file with default name of: /jspwiki-custom.properties
> In my case, jspwiki-custom.properties is in /usr/share/tomcat8/lib with the 
> owner:group root:root because, since there is no /home/tomcat, I had to 
> supply overrides for properties that depend on a home directory in order to 
> deploy the wiki and run Install.jsp.
> This JSPWiki has a customized jspwiki.policy and web.xml so only 
> authenticated users can view or edit anything and all traffic is restricted 
> to SSL connections.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to