Jump to:

23379 Posts in 18298 Topics by 2867 members

General Questions

SilverStripe Forums » General Questions » DOMDocument::saveHTML() failure after latest 3.1 pull

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 644 Views
  • tazzydemon
    Avatar
    Community Member
    121 Posts

    DOMDocument::saveHTML() failure after latest 3.1 pull Link to this post

    Guys,

    I've posted to trac about this as well but I have just pulled 3.1 which by the looks of it will have 3.1 beta 2 merged in it. I now have a serious failure due, I believe, to my php version which is 5.3.3, the Centos standard release.

    [Warning] DOMDocument::saveHTML() expects exactly 0 parameters, 1 given

    Line 529 of ShortcodeParser.php :

    529:      foreach($html->childNodes as $child) $res .= $doc->saveHTML($child);

    Research suggests that this does not work less than php 5.3.6. See http://www.php.net/manual/en/domdocument.savehtml.php You may wish to revisit version requirements or alter code as

    Many users such as me cannot easily go beyond 5.3.3 so this is an issue.

  • tazzydemon
    Avatar
    Community Member
    121 Posts

    Re: DOMDocument::saveHTML() failure after latest 3.1 pull Link to this post

    Simple fix for now: revert to the old ShortcodeParser file (I dont use shortcodes anyway)

  • tazzydemon
    Avatar
    Community Member
    121 Posts

    Re: DOMDocument::saveHTML() failure after latest 3.1 pull Link to this post

    It has been pointed out by DirtyHam that 3.1.0 beta 2 works with 5.3.3.

    A quick glance shows that 3.1 and 3.1 beta are quite different in this file. The offending php method is still present in 3.1 but not the beta.

    The functions loadHTML() and saveHTML() are added in 3.1. There's a few other differences too. The offender is saveHTML(). The will not work sub php 5.3.6.

    Assuming this is acceptable and deliberate then it should be added that to requirements. I am at present building a copy of my main centos server so I can add the remi repository to it and test upgrading php to (up to) 5.4.x.

    This is available for centos 5x and 6x

    644 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.