ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Getting error with XHTML plugin

July 13, 2010 6:28am

Subscribe [5]
  • #1 / Jul 13, 2010 6:28am

    Netstep

    2 posts

    Hi all, I’m getting an error while trying to use the XHTML plugin (The EE 2x ready from here http://expressionengine.com/public_beta/downloads/... though I’ve just noticed this redirects now??)

    Because I was trying to use it with Matrix. I first turned to Mr. Kelly for advice see here but he thinks it’s an Ellislab issue (I have since tried it outside of the Matrix output and it still doesn’t work). What do you think?

    Here is the error

    A PHP Error was encountered
    
    Severity: Notice
    
    Message: Undefined property: Xhtml::$EE
    
    Filename: xhtml/pi.xhtml.php
    
    Line Number: 54
    A PHP Error was encountered
    
    Severity: Notice
    
    Message: Trying to get property of non-object
    
    Filename: xhtml/pi.xhtml.php
    
    Line Number: 54
    A PHP Error was encountered
    
    Severity: Notice
    
    Message: Trying to get property of non-object
    
    Filename: xhtml/pi.xhtml.php
    
    Line Number: 54
    A PHP Error was encountered
    
    Severity: Notice
    
    Message: Undefined property: Xhtml::$EE
    
    Filename: xhtml/pi.xhtml.php
    
    Line Number: 56
    A PHP Error was encountered
    
    Severity: Notice
    
    Message: Trying to get property of non-object
    
    Filename: xhtml/pi.xhtml.php
    
    Line Number: 56
    
    Fatal error: Call to a member function library() on a non-object in C:\Sites\N\Netstep\beta.netstep.co.uk\public\admin\expressionengine\third_party\xhtml\pi.xhtml.php on line 56

    Thanks

  • #2 / Jul 13, 2010 4:07pm

    Ingmar

    29245 posts

    What version and build of EE are you using?

  • #3 / Jul 23, 2010 11:41am

    Andy Harris

    958 posts

    This happens for me also, on EE2.1 Build 20100712.

  • #4 / Jul 23, 2010 4:44pm

    Brandon Jones

    5500 posts

    Hi Netstep, and welcome to the forums.

    Are you referring to the XHTML Typography plugin?

  • #5 / Jul 23, 2010 7:27pm

    Andy Harris

    958 posts

    I can’t speak for Netstep, but that’s the one I’m referring to and the one referred to in Netsteps link to Brandons website which would lead me to assume it is.

  • #6 / Jul 23, 2010 8:09pm

    Brandon Jones

    5500 posts

    Can you give us an example of a simple template that throws the error?

  • #7 / Jul 24, 2010 6:55am

    Andy Harris

    958 posts

    Well mine is done thusly:

    {exp:channel:entries disable="categories|category_fields|member_data|pagination|trackbacks"}
        {embed="includes/_page_header" title="{if page_section_alt_title!="" OR page_alt_title!=""}{page_section_alt_title}{page_alt_title}{if:else}{title}{/if}"}
        {page_sections}
        <div class="left">
        </div>
        <div class="right header">
            <h2>{page_section_title}</h2>
    <p>    </div><br />
        <div class="left"><br />
        </div><br />
        <div class="right"><br />
            {exp:xhtml:full}<br />
            {page_section_content}<br />
            {/exp:xhtml:full}<br />
        </div><br />
        {/page_sections}<br />
    {/exp:channel:entries}

  • #8 / Jul 24, 2010 3:26pm

    Greg Salt

    3988 posts

    Hi Andy,

    As a quick test can you please add:

    $this->EE =& get_instance();

    to the very beginning of the ‘full’ function in pi.xhtml.php. That should be on or around line 54. The ‘full’ function should then be like this:

    function full($str = '')
    {
        $this->EE =& get_instance();
            
        $str = ($str == '') ? $this->EE->TMPL->tagdata : $str;
                    
        $this->EE->load->library('typography');
        return $this->EE->typography->xhtml_typography($str);                       
    }

    Does that fix the issue?

    Cheers

    Greg

  • #9 / Jul 24, 2010 3:43pm

    Andy Harris

    958 posts

    Hi Greg,

    That works like a charm, everything appears as it should do. We have a winner!

    Good stuff, cheers all.

  • #10 / Jul 24, 2010 3:46pm

    Greg Salt

    3988 posts

    Hi Andy,

    Would you mind submitting a report to our Bug Tracker with a link back to this thread?

    Cheers

    Greg

  • #11 / Jul 24, 2010 3:56pm

    Andy Harris

    958 posts

    Of course not - done. Thanks again.

  • #12 / Jul 24, 2010 4:00pm

    Greg Salt

    3988 posts

    Hi Andy,

    Thanks. For reference, the report is here. You should be notified as it is updated.

    @Netstep, I’m going to close this thread out now. Please post again if you have further problems or questions.

    Cheers

    Greg

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases