Index: xwiki-platform-core/xwiki-core/src/main/java/com/xpn/xwiki/XWiki.java =================================================================== --- xwiki-platform-core/xwiki-core/src/main/java/com/xpn/xwiki/XWiki.java (revision 11467) +++ xwiki-platform-core/xwiki-core/src/main/java/com/xpn/xwiki/XWiki.java (working copy) @@ -1583,6 +1583,7 @@ } } } catch (Exception e) { + LOG.debug("exception during evaluating skin",e); } try { @@ -1718,6 +1719,7 @@ } } } catch (Exception e) { + LOG.debug("exception during getting skin file, revert to default base skin",e); } // If all else fails, use the default base skin, even if the URLs could be invalid. @@ -1771,8 +1773,14 @@ url = urlf.createSkinURL(filename, skin, context); } return urlf.getURL(url, context); + } else { + if (LOG.isTraceEnabled()) { + LOG.trace("resource does not existsi for path "+path); + } } } catch (Exception e) { + LOG.debug("Exception during search of file " + +filename+" in skin "+skin,e); } return null; @@ -1791,15 +1799,35 @@ // Try to get it from URL if (context.getRequest() != null) { skin = context.getRequest().getParameter("skin"); + if (LOG.isDebugEnabled()) { + if (skin!=null && !skin.equals("")) { + LOG.debug("skin " + skin + " is get from request"); + } + } } - if ((skin == null) || (skin.equals(""))) { skin = getUserPreference("skin", context); + if (LOG.isDebugEnabled()) { + if (skin!=null && !skin.equals("")) { + LOG.debug("skin " + skin + " is get from user preferences"); + } + } } - if (skin.equals("")) { - skin = Param("xwiki.defaultskin", getDefaultBaseSkin(context)); + if (skin == null || skin.equals("")) { + skin = Param("xwiki.defaultskin",null); + if (skin!=null) { + if (LOG.isDebugEnabled()) { + LOG.debug("skin " + skin + " is get from xwiki configuration"); + } + }else{ + skin = getDefaultBaseSkin(context); + if (LOG.isDebugEnabled()) { + LOG.debug("skin " + skin + " is get as default based skin"); + } + } } } catch (Exception e) { + LOG.warn("exception during finding skin", e); skin = getDefaultBaseSkin(context); } try { @@ -1810,6 +1838,7 @@ } } catch (XWikiException e) { // if it fails here, let's just ignore it + LOG.debug("Exception during getting skin",e); } context.put("skin", skin); @@ -2004,6 +2033,7 @@ } } } catch (Exception e) { + LOG.warn("exception during getting preference "+prefname,e); } return getWebPreference(prefname, context);