Skip to:
Content
Pages
Categories
Search
Top
Bottom

Importing from Vanilla fails due to HTML

  • @dansearle

    Participant

    Hi, I’m trying to import a Vanilla forum db into my new BBPress install (2.5.4 on WP 4.0.1) and it silently hangs during the conversion of topics.

    I’ve debugged the code and I suspect it’s getting stuck when it tries to parse the HTML into BBPress. Is this a known issue at all? Is there something I can do to prep the incoming data perhaps?

    I’m open to hacking the core of the importer here, I only need to get it working once.

Viewing 1 replies (of 1 total)
  • @dansearle

    Participant

    I have isolated the exact post content that causes the BBCode::Parse to hang. I can’t post the original content, but I made this version replacing the text with lorem ipsum, and it also hangs:

    $field =<<<EOD
    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla dictum ligula sit amet massa condimentum gravida. Quisque qutris imgdper diet dolor. Nulla quis ante id elit lacinia commodo. Maecenas convallis felis at libero fringilla, feiat.<br><br><br><i><b>[EDIT: Aenean aliquet velit est, ac sodales "tortyor aliquoam vitae" urna sit amet dui rutr "OpenGL Uiot" Tenentis in faucibus orci luctus et ultrices posuere cubilia Curae Donec fringilla velit non too much
    EOD;
    

    If you remove the words “too much” from the end then it parses ok.

    This is the full code that I put into a theme page template to run this test in isolation:

    echo "<h2>Begin the parser test</h2>";
    
    require_once( WP_PLUGIN_DIR . '/bbpress/bbpress.php' );
    
    $field =<<<EOD
    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla dictum ligula sit amet massa condimentum gravida. Quisque qutris imgdper diet dolor. Nulla quis ante id elit lacinia commodo. Maecenas convallis felis at libero fringilla, feiat.<br><br><br><i><b>[EDIT: Aenean aliquet velit est, ac sodales "tortyor aliquoam vitae" urna sit amet dui rutr "OpenGL Uiot" Tenentis in faucibus orci luctus et ultrices posuere cubilia Curae Donec fringilla velit non too much
    EOD;
    
    require_once( bbpress()->includes_dir . 'admin/parser.php' );
    $bbcode = BBCode::getInstance();
    echo  html_entity_decode( $bbcode->Parse( $field ) );
    
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar