Moin,
ich habe eine Liste von Datenbankobjekten mit einer MultipleLinkPage erstellt.
Diese Seite wird auch richtig angezeigt.
Jedoch funktioniert der Button zum Löschen eines Eintrags nicht. Fehlermeldung: Der Parameter „objectIDs“ fehlt oder ist ungültig.
Code
File:
{WSC}/lib/data/AbstractDatabaseObjectAction.class.php in line 321
Stacktrace:
#0 {WSC}/lib/data/AbstractDatabaseObjectAction.class.php(200): wcf\data\AbstractDatabaseObjectAction->validateDelete()
#1 {WSC}/lib/action/AJAXProxyAction.class.php(83): wcf\data\AbstractDatabaseObjectAction->validateAction()
#2 {WSC}/lib/action/AJAXInvokeAction.class.php(111): wcf\action\AJAXProxyAction->invoke()
#3 {WSC}/lib/action/AbstractAction.class.php(53): wcf\action\AJAXInvokeAction->execute()
#4 {WSC}/lib/action/AJAXInvokeAction.class.php(65): wcf\action\AbstractAction->__run()
#5 {WSC}/lib/system/request/Request.class.php(89): wcf\action\AJAXInvokeAction->__run()
#6 {WSC}/lib/system/request/RequestHandler.class.php(119): wcf\system\request\Request->execute()
#7 {WSC}/index.php(11): wcf\system\request\RequestHandler->handle('wcf')
#8 {main}
Display More
Teilcode der Seite:
PHP
<?php
namespace wcf\page;
{...}
class MinecraftIDListPage extends MultipleLinkPage
{
{...}
protected function initObjectList()
{
parent::initObjectList();
$this->objectList->getConditionBuilder()->add('userID = ?', [WCF::getUser()->userID]);
}
}
Display More
HTML
{include file='userMenuSidebar'}
{...}
<script data-relocate="true">
$(function() {
new WCF.Action.Delete('wcf\\data\\user\\minecraft\\MinecraftAction', $('.jsRow'));
});
</script>
{...}
{if $objects|count > 0}
<div class="section tabularBox">
<table class="table">
<thead>
<tr>
<th></th>
{...}
</tr>
</thead>
<tbody>
{foreach from=$objects item=object}
<tr class="jsRow">
<td class="columnIcon">
<a href="#" class="jsDeleteButton jsTooltip" title="{lang}wcf.global.button.delete{/lang}" data-confirm-message-html="{lang __encode=true}wcf.page....{/lang}" dataobject-id="{@$object->ID}"><span class="icon icon24 fa-times"></span></a>
</td>
{...}
</tr>
{/foreach}
</tbody>
</table>
</div>
{else}
<p class="info">{lang}wcf.global.noItems{/lang}</p>
{/if}
{...}
{include file='footer'}
Display More
Zurzeit ist nur ein Eintrag in der Datenbank und diesen Versuche ich zu löschen.
Vielen Dank für eure Zeit.
Mit freundlichen Grüßen
xXSchrandXx