FriendsOfREDAXO / mblock

Beliebig viele Datenblöcke innerhalb eines Moduls, per Drag & Drop verschiebbar.
MIT License
81 stars 10 forks source link

ooops vom Linklist Feld unter xampp #120

Closed dtpop closed 4 years ago

dtpop commented 5 years ago

Dieser Modulcode

<?php
$mform = new MForm();
$mform->addLinklistField("1",array('label'=>'Link list'));
echo  MBlock::show(1, $mform->show()); 
?>

führt unter xampp zu einem nachvollziehbaren ooops:

Error thrown with message "Call to undefined method DOMText::setAttribute()"

Stacktrace:
#22 Error in C:\www\projekt\app\redaxo\src\addons\mblock\lib\MBlock\Replacer\MBlockSystemButtonReplacer.php:415
#21 MBlockSystemButtonReplacer:addLinkSelectOptions in C:\www\projekt\app\redaxo\src\addons\mblock\lib\MBlock\Replacer\MBlockSystemButtonReplacer.php:288
#20 MBlockSystemButtonReplacer:processLinkList in C:\www\projekt\app\redaxo\src\addons\mblock\lib\MBlock\Replacer\MBlockSystemButtonReplacer.php:99
#19 MBlockSystemButtonReplacer:replaceSystemButtons in C:\www\projekt\app\redaxo\src\addons\mblock\lib\MBlock\MBlock.php:221
#18 MBlock:createOutput in C:\www\projekt\app\redaxo\src\addons\mblock\lib\MBlock\MBlock.php:169
#17 MBlock:show in rex:///module/7/input:4
#16 require in C:\www\projekt\app\redaxo\src\addons\structure\plugins\content\lib\article_content_base.php:441
#15 rex_article_content_base:{closure} in C:\www\projekt\app\redaxo\src\addons\structure\plugins\content\lib\article_content_base.php:443
#14 rex_article_content_base:getStreamOutput in C:\www\projekt\app\redaxo\src\addons\structure\plugins\content\lib\article_content_editor.php:459
#13 rex_article_content_editor:editSlice in C:\www\projekt\app\redaxo\src\addons\structure\plugins\content\lib\article_content_editor.php:73
#12 rex_article_content_editor:outputSlice in C:\www\projekt\app\redaxo\src\addons\structure\plugins\content\lib\article_content_base.php:331
#11 rex_article_content_base:getArticle in C:\www\projekt\app\redaxo\src\addons\structure\plugins\content\lib\article_content.php:80
#10 rex_article_content:getArticle in C:\www\projekt\app\redaxo\src\addons\structure\plugins\content\pages\content.edit.php:24
#9 include in C:\www\projekt\app\redaxo\src\core\lib\packages\package.php:228
#8 rex_package:includeFile in C:\www\projekt\app\redaxo\src\core\lib\be\controller.php:474
#7 rex_be_controller:includePath in C:\www\projekt\app\redaxo\src\core\lib\be\controller.php:430
#6 rex_be_controller:includeCurrentPageSubPath in C:\www\projekt\app\redaxo\src\addons\structure\plugins\content\pages\content.php:426
#5 include in C:\www\projekt\app\redaxo\src\core\lib\packages\package.php:228
#4 rex_package:includeFile in C:\www\projekt\app\redaxo\src\core\lib\be\controller.php:474
#3 rex_be_controller:includePath in C:\www\projekt\app\redaxo\src\core\lib\be\controller.php:413
#2 rex_be_controller:includeCurrentPage in C:\www\projekt\app\redaxo\src\core\backend.php:215
#1 require in C:\www\projekt\app\redaxo\src\core\boot.php:135
#0 require in C:\www\projekt\app\redaxo\index.php:9

sobald ein Link in die Linkliste aufgenommen ist und der Block wieder zur Bearbeitung geöffnet wird.

Diese Zeilen vor der Fehlerzeile 415 umgeht das Problem:

if ($child->nodeName != 'option') { // Patch xampp gegen ooops
   continue;
}
dtpop commented 4 years ago

Moin Wolfgang. Danke, dass Du dieses Issue geschrieben hast - das hat mir grade sehr geholfen. Lg. ps - bisschen Spaß muss sein

skerbis commented 4 years ago

@dtpop bitte pack's doch in einen PR. Ich kann es aber nicht in xampp gegenprüfen. Aber wenn es Dir hilft, kommt's ins nächste Release

dtpop commented 4 years ago

Danke Thomas. ich hab das jetzt eingebaut. Schöner wäre natürlich, wenn es möglich wäre die Ursache des Fehlverhaltens zu finden und zu beseitigen. Ist mir leider nicht gelungen - sorry. Ich war nicht einmal der Finder des Bugs - der Bug hat über ein personal Support Ticket zu mir gefunden. Glücklicherweise konnte ich es nachstellen.