Hello dear xwiki people.
I just did a fresh install of xwiki a few days ago (running as a docker container on a Synology) and found the holiday request extension which I was excited to try out, but sadly I can not get arround the error:
Cannot invoke “String.toUpperCase()” because “style” is null.
I thought it has something to do with my date format under localization, which is: dd/MM/yyyy, but it didnt matter if I changed it or the code written in the extension. I wanted to try to disable the protection to see if thats the issue, but wasn’t able to do that either.
Maby someone here has idea how I could tackle this. THANKS!
Paul
The Velocity code on the page that gives the error when I try to open a new holiday request is:
{{include document="AppWithinMinutes.DynamicMessageTool" context="new" /}}
{{velocity}}
$xwiki.ssx.use("HolidayRequest.SkinExtension")
## Load the User Picker style for the Employee and Manager columns
#set($discard = $xwiki.ssfx.use('uicomponents/widgets/userpicker/userPicker.css'))
#if ($request.createHR == 'true')
#set($count = $doc.getValue('count'))
#set($defaultDateStyle = 'medium')
#set($title="Request_$datetool.format('yyyy-M-d H:m:s',$datetool.getDate())")
#set($newHRReference = $services.model.createDocumentReference('', 'HolidayRequest', $title))
$response.sendRedirect($xwiki.getURL($newHRReference, 'edit', "$!{request.queryString}&title='New Holiday Request'"))
#end
#if($isGuest)
$msg.get('contrib.hr.guest')
#else
{{html wiki="true"}}
<form action="" id="newHR">
<div>
<input type="hidden" name="parent" value="HolidayRequest.WebHome" />
<input type="hidden" name="template" value="HolidayRequest.HolidayRequestTemplate" />
<input type="hidden" name="createHR" value="true" />
<span class="buttonwrapper">
<input class="button" type="submit" value="$msg.get('contrib.hr.new.submit')" />
</span>
</div>
</form>
{{/html}}
#end
#set($originalMsg = $msg)
#set($msg = $services.dynamicMessageToolFactory.createDynamicMessageTool($msg, {
'holidayrequest.livetable.employee': $msg.get('contrib.hr.WebHome.employee'),
'holidayrequest.livetable.startDate': $msg.get('contrib.hr.WebHome.startDate'),
'holidayrequest.livetable.endDate': $msg.get('contrib.hr.WebHome.endDate'),
'holidayrequest.livetable.manager': $msg.get('contrib.hr.WebHome.manager'),
'holidayrequest.livetable.numberDays' : $msg.get('contrib.hr.numberDays'),
'holidayrequest.livetable.office' : $msg.get('contrib.hr.office'),
'holidayrequest.livetable.comment' : $msg.get('contrib.hr.comment'),
'holidayrequest.livetable.status': $msg.get('contrib.hr.WebHome.status')
}))
#set($columnsProperties = {
'_action': {'type': 'none', 'link' : 'view'},
'employee': {'type': 'text', 'size': 10, 'filterable': true, 'sortable': true, 'html': true, 'link' : 'view'},
'startDate': {'type': 'text', 'size': 10, 'filterable': true, 'sortable': true, 'html': true},
'endDate': {'type': 'text', 'size': 10, 'filterable': true, 'sortable': true, 'html': true},
'numberDays': {'type': 'number', 'size':10, 'filterable':true, 'sortable':true, 'html': true},
'manager': {'type': 'text', 'size': 10, 'filterable': true, 'sortable': true, 'html': true},
'status': {'type': 'list', 'size': 10, 'filterable': true, 'sortable': true, 'html': true},
'office': {'type': 'text', 'size': 10, 'filterable': true, 'sortable': true, 'html': true},
'comment': {'type': 'text', 'size': 10, 'filterable': true, 'sortable': true, 'html': true},
'_actions': {'sortable': false, 'filterable': false, 'html': true, 'actions': ['edit', 'delete']}
})
#set($options = {
'className': 'HolidayRequest.HolidayRequestClass',
'resultPage' : 'AppWithinMinutes.LiveTableGenerator',
'translationPrefix': 'holidayrequest.livetable.',
'tagCloud': true,
'rowCount': 15,
'maxPages': 10,
'selectedColumn': 'startDate',
'defaultOrder': 'desc'
})
#set($columns = ['_action', 'employee', 'startDate', 'endDate', 'numberDays', 'manager', 'office', 'comment', 'status', '_actions'])
#livetable('holidayrequest' $columns $columnsProperties $options)
#set($msg = $originalMsg)
#if(!$isGuest)
{{html wiki="true"}}
<form action="Summary" id="overview" style="display:inline;">
<span class="buttonwrapper">
<input class="button" type="submit" value="$msg.get('contrib.hr.summary')" />
</span>
</form>
<form action="Calendar" id="overview" style="display:inline;">
<span class="buttonwrapper">
<input class="button" type="submit" value="$msg.get('contrib.hr.calendar')" />
</span>
</form>
{{/html}}
#end
{{/velocity}}
The Full Error I attached to this post - I hope this helps.
full_wiki_error.txt (30.4 KB)
4 posts - 3 participants