test
Viewing 1 post (of 1 total)
  • Author
    Posts
  • jooservices Friend
    #167458

    Hi,
    I’ve tested and confirmed this bug. So this’s my patch to make this component working well on Joomla 1.7
    File:

    components/com_jacomment/views/comments/view.html.php
    Error on Joomla 1.7


    Fatal error: Cannot access protected property JACommentViewComments::$_charset in /var/www/joodevelopment/joodevelopment.com/j17/libraries/joomla/document/document.php on line 492Call Stack#TimeMemoryFunctionLocation10.0002343696{main}( )../index.php:020.06762700364JSite->dispatch( )../index.php:4330.07102834856JComponentHelper::renderComponent( )../application.php:18740.07663002904require_once( '/var/www/joodevelopment/joodevelopment.com/j17/components/com_jacomment/jacomment.php' )../helper.php:15650.08483424312JController->execute( )../jacomment.php:7960.08483424384JACommentController->display( )../controller.php:67970.08483424384JController->display( )../controller.php:2480.09073964604JACommentViewComments->display( )../controller.php:64590.09073964648JACommentViewComments->displayItems( )../view.html.php:68100.09524022376JDocument->getCharset( )../view.html.php:614

    This bug because in code we are not yet get instance of JDocument. ( stranger, this issue could be trouble on Joomla 1.5 too )
    old code


    if($task != 'preview') {
    $charset = JDocument::getCharset();
    JResponse::setHeader( 'Content-Type', "text/html; charset=$charset", true );
    $body = $this->loadTemplate("block");
    JResponse::setBody ($body);
    echo JResponse::toString();
    exit();
    }

    my patch


    if($task != 'preview') {
    $doc =& JFactory::getDocument();
    $charset = $doc->getCharset();
    JResponse::setHeader( 'Content-Type', "text/html; charset=$charset", true );
    $body = $this->loadTemplate("block");
    JResponse::setBody ($body);
    echo JResponse::toString();
    exit();
    }

    Beside this, i have some notice about jQuery 1.6.2 they are using. I’m not sure our component should work on this. Let’s me try play around and update in soon.
    Thank you
    Viet Vu

Viewing 1 post (of 1 total)

This topic contains 1 reply, has 1 voice, and was last updated by  jooservices 13 years, 3 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum