Re: [xwiki-devs] [xwiki-users] overriding view.vm in own skin
On Thu, 24 Jul 2008 19:13:12 +0300, rssh wrote
On Thu, 24 Jul 2008 19:02:20 +0300, rssh wrote
Good day, community.
Yet one update: looks like this is error in xwiki: (from XWiki.java: ) try { // Try to get it from context skin = (String) context.get("skin"); if (skin != null) { return skin; } // Try to get it from URL if (context.getRequest() != null) { skin = context.getRequest().getParameter("skin"); } if ((skin == null) || (skin.equals(""))) { skin = getUserPreference("skin", context); } if (skin.equals("")) { ******************** - must be skin!=null || skin.equals("") *** (so, I think that error is here). skin = Param("xwiki.defaultskin", getDefaultBaseSkin(context)); } } catch (Exception e) { ****************** (!) --- why we don't log anything (may be in debug mode) skin = getDefaultBaseSkin(context); } Can anybosy from core team quicly say: is such errors possible or I forgott something very basic ? If this error is possible, I will submit patch during next few days. Also I'm a bit frustrated by number of empty generic catch bloks in XWiki.java. Debugging such code can become a hard task. About cited part from xwiki.cfg: I guess that FileNotFoundException must be catched with logging only in debug mode, any other Exception must be logged in warnings.
Small question about customizing xwiki: - I want to customize skin, by creating own skin (with name 'x'), After reading http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Skins I do next sequences of steps:
a) creating directory <xwiki-base>/skins/x, b) copying all files from touckan to x c) changing default skin in xwiki.cfg grom touckan to x d) copying file templates/view.vm to x e) customizing view.vm (writing onethins inside)
Last step does not work; i. e. if I change view.vm, nothing changed in xwiki.
So, question: it is such problem with my installation, or I missed something during creation of skin ?
self-moderation: whith ?skin=x additional parameter all works.
So: is exists way, where xwiki.defaultskin parameter from xwiki.cfg is incorrect ?
-- Ruslan Shevchenko GradSoft. http://www.gradsoft.ua
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Ruslan Shevchenko GradSoft. http://www.gradsoft.ua
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Ruslan Shevchenko GradSoft. http://www.gradsoft.ua
On Jul 24, 2008, at 6:57 PM, rssh wrote:
On Thu, 24 Jul 2008 19:13:12 +0300, rssh wrote
On Thu, 24 Jul 2008 19:02:20 +0300, rssh wrote
Good day, community.
Yet one update: looks like this is error in xwiki: (from XWiki.java: )
try { // Try to get it from context skin = (String) context.get("skin"); if (skin != null) { return skin; }
// Try to get it from URL if (context.getRequest() != null) { skin = context.getRequest().getParameter("skin"); }
if ((skin == null) || (skin.equals(""))) { skin = getUserPreference("skin", context); } if (skin.equals("")) { ******************** - must be skin!=null || skin.equals("") *** (so, I think that error is here). skin = Param("xwiki.defaultskin", getDefaultBaseSkin(context)); } } catch (Exception e) { ****************** (!) --- why we don't log anything (may be in debug mode) skin = getDefaultBaseSkin(context); }
Can anybosy from core team quicly say: is such errors possible or I forgott something very basic ?
If this error is possible, I will submit patch during next few days.
Also I'm a bit frustrated by number of empty generic catch bloks in XWiki.java. Debugging such code can become a hard task.
Completely agree. It's up to all of us to comment it properly or add debug information or add better error handling. Be sure that we share your frustration Ruslan since most of us are in the same situation, i.e. we don't know what the code does and why there's a catch, etc. I don't know enough to tell you if you're right or wrong though about your question... Sorry -Vincent
About cited part from xwiki.cfg: I guess that FileNotFoundException must be catched with logging only in debug mode, any other Exception must be logged in warnings.
Small question about customizing xwiki: - I want to customize skin, by creating own skin (with name 'x'), After reading http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Skins I do next sequences of steps:
a) creating directory <xwiki-base>/skins/x, b) copying all files from touckan to x c) changing default skin in xwiki.cfg grom touckan to x d) copying file templates/view.vm to x e) customizing view.vm (writing onethins inside)
Last step does not work; i. e. if I change view.vm, nothing changed in xwiki.
So, question: it is such problem with my installation, or I missed something during creation of skin ?
self-moderation: whith ?skin=x additional parameter all works.
So: is exists way, where xwiki.defaultskin parameter from xwiki.cfg is incorrect ?
Can anybosy from core team quicly say: is such errors possible or I forgott something very basic ?
If this error is possible, I will submit patch during next few days.
Also I'm a bit frustrated by number of empty generic catch bloks in XWiki.java. Debugging such code can become a hard task.
Completely agree. It's up to all of us to comment it properly or add debug information or add better error handling. Be sure that we share your frustration Ruslan since most of us are in the same situation, i.e. we don't know what the code does and why there's a catch, etc.
Hope it is possible to fix such thinks incrementally. I. e. I will add few extra logging statements in tomorrow patch. Regads.
participants (2)
-
rssh -
Vincent Massol