Plugin

Archived
Forum
(read-only)

Table of Contents

ExpressionEngine 2

Back to this add-on's main page
View Other Add-ons From Mark J. Reeves

     

Error on install

Support Request

Brettro
Brettro

Hi Mark,

I just installed the plugin, renamed the folder from “ee-toc-master” to “toc” and when I go to Add-Ons > Plugins in the CP, I get an error. I pasted it below. The plugin would be *VERY* helpful to me, so if I can figure out what I’m doing wrong here, I’d be thrilled.

Thanks!

- B

Error message:

{embed="embeds/head"}
{embed
="embeds/header-nav"}
{exp
:structure:breadcrumb here_as_title="yes" wrap_each="li"}
{exp
:channel:entries channel="content-pages"}
{title}
Contents
{exp
:toc}{treatise-page-content}{/exp:toc}
{exp
:toc:article}{treatise-page-content}{/exp:toc:article}
Back to Top
Reference
{red
-line}
{reference_material}{title}{
/reference_material}
{exp
:tagstripper:tagsToStrip tags='p' escapeHTMLchars='true'}{annotation}{/exp:tagstripper:tagsToStrip} Posted{reference_material}{entry_date format="%F %d, %Y %h:%i"}{/reference_material}
{reference_material}
Download
{reference-material-file backspace="3"}{filename} {/reference-material-file}
{
/reference_material} {!-- NEED TO REMOVE THIS SPAN DEPENDENCY! --}{/red-line}
·         A link to another page that has a very long title that will go on 
for while
·         A link to another page
Back to Top
How To Materials
·         Drafting Advisory Contracts
·         Drafting Advisory Contracts
·         Drafting Advisory Contracts
Back to Top
{
/exp:channel:entries}
{exp
:structure:nav has_children_class="yes" max_depth="3" show_depth="3" start_from="/{segment_1}/{segment_2}/"}
{embed
="embeds/footer"}
A PHP Error was encountered
Severity
Warning
Message
Cannot modify header information headers already sent by (output started at /var/www/html/mccprodsite/webroot/madagascar/expressionengine/third_party/toc/pi.toc.php:16)
Filenamecore/Common.php
Line Number
412 
Mark J. Reeves
# 1
Developer
Mark J. Reeves

Wow, I’m really sorry about that. I’m maintaining this in the context of a client project and pasted their template code into the separate file for the plugin that you see on Github. I’ve updated Github with the plugin code. Should be all set now.

Brettro
# 2
Brettro

Thanks for the quick response and for making this available! I’m now getting the following error: Fatal error: Class ‘DOMDocument’ not found in /var/www/html/mccprodsite/webroot/madagascar/expressionengine/third_party/toc/pi.toc.php on line 31

Here’s my code:

{exp:channel:entries channel="guidance_documents" status="open" dynamic="yes"}
<div class="row">
                <
div id="nav-document" class="span3">
                
{exp:toc}{guidance_content}{/exp:toc}
                
</div>
                                                               
                <
div class="span9">
                
{exp:toc:article}{guidance_content}{/exp:toc:article}
                
</div>
            </
div>
{/exp:channel:entries} 
Mark J. Reeves
# 3
Developer
Mark J. Reeves

That’s the request I was expecting.

The add-on relies on PHP’s DOMDocument and DOMXpath to find the H3 nodes in the HTML, update them, and return the HTML in its output.

http://www.php.net/DOMDocument

You’ll need to make sure these are enabled in your server’s PHP build.

Brettro
# 4
Brettro

Ohhhhhh. Got it. Thanks so much! I’m all set.