Loading...
 
Features / Usability

Features / Usability


{maketoc} results in empty page

posts: 7

Hi,

I updated my Tiki installatiopn from 4 to 5.1 today. After this (inclusive UTF8 translation) I always get an empty page, when I try to view a page with a table of content ({maketoc}).
After deleting the {maketoc} in the database, I can view the page. When I edit the page and reinsert {maketoc} I get an blank page again.

In the http access log I get an error 500, but nothing else.

Does anybody know, what to do?

Thx!
Tobias

posts: 289 United States

The only time I've encountered 500 errors that I recall are when there are problems with folder permissions with Tiki itself.

Perhaps the documentation on this page will help you verify the permissions. In particular, pay close attention to the chmod commands, which lists the particular folders that need special permissions beyond the standard. Even if you can't use SSH to run command line commands on your web host, you can still set permissions using an FTP client like Filezilla. I'm not sure if any of these folders would be related to your problem, perhaps the template folders? It certainly wouldn't hurt to check and eliminate any kind of permissions problem.

Clear your Tiki cache too!

posts: 7

Thanks for your suggestion.
I have root access to the server and I ran setup.sh. I verified the permission, they are ok.

And everything is running fine. Only the pages with the {maketoc} results in Empty Page.

Here is the entry in the httpd log:

[26/Aug/2010:09:37:21 +0200] "GET /tikiwiki/5.1/tiki-index.php?page=MyPage HTTP/1.1" 500 26


posts: 7

After activating PHP logging I get the following error message:

PHP Fatal error: Class 'WikiParser_PluginOutput' not found in /path/to/tikiwiki/5.1/lib/tikilib.php on line 5620

posts: 7
hmm, it seems, that the plugin maketoc is missing. But why? And where can I create it?
posts: 7

And {maketoc:box} is working. I am confused.

Any ideas?


posts: 289 United States
Errr.. *shrugs*. Perhaps you have to approve the plugin again since you upgraded? confused (tiki-plugins.php)
posts: 7
The maketoc plugin isn't listed under tiki-plugins.php. And I don't have a file like wikiplugin_maketoc.php under lib/wiki-plugins. But it's the same for the working 4.0 release.

posts: 1
i have the same issue after upgrade, and i am too have not maketoc plugin listed under tiki-plugins.php

posts: 4642 Japan

maketoc isn't a separate plugin, so there isn't a wikiplugin_maketoc.php file and it isn't in the plugins list; it's just wiki syntax that is input by hand. You should see it listed in the edit help popup's wiki syntax section, along with toc, as syntax for "Table of contents". Any parameters (search doc.tiki.org for details) also need to be input by hand.

-- Gary


posts: 6 Australia

Hey guys,
I've got this exact same error. maketoc was working perfectly in Tiki4 but is now borked with Tiki5.2
I upgraded to Tiki5.2 over the top of my existing Tiki4 (backing up of course) and any page that contains {maketoc} simply results in a blank page.

--BeeJay
EDIT: forgot the np


posts: 6 Australia

OK Just did a table dump of tiki_pages, replaced {maketoc} with {maketoc:box title="Contents"} and now all my pages show up.

--BeeJay


posts: 6 Australia
Any updates guys? Maketoc is still borked in 6.0

posts: 6 Australia

BOING!

You have to do {maketoc: }... And it works...

posts: 4642 Japan

The normal maketoc syntax works fine in my Tiki 6 installation (branch 6 dev files). I don't know what would cause it to not work as expected at your site. I'm using the normal wiki editor; are you using this editor, or WYSIWYG?

-- Gary


posts: 6 Australia
Normal editor. WYSIWYG editor is disabled.

posts: 4
I had this same issue until I fixed it. For whatever reason the code at lines 5957-5959 (shown below) in lib/tikilib.php should be moved to line 5800.
if (!$simple_wiki && $options['parsetoc']) {
	$this-parse_data_process_maketoc( $data, $options, $noparsed);
}

This gives the code a chance to parse the maketoc code before other plugins are detected the correct way.
Once I made this change {maketoc} was recognized and parsed correctly.

posts: 4

Sorry! Scratch my last reply. Apparently that broke other plug-ins. Had to make changes in two places in lib/tikilib.php in order to let maketoc plugins pass-through to the 'parse_data_process_maketoc' function.

Change lines 5324(below) in plugin_execute function

if( ! $this->plugin_exists( $name, true ) ) {
     return $this->convert_plugin_output( WikiParser_PluginOutput::internalError( tr('Plugin %0 does not exist.', $name) ), '', $outputFormat, $parseOptions );
}


To this

if( ! $this->plugin_exists( $name, true ) ) {
	if($name != "maketoc") {
		return $this->convert_plugin_output( WikiParser_PluginOutput::internalError( tr('Plugin %0 does not exist.', $name) ), '', $outputFormat, $parseOptions );
	}
	else {
	     return "<maketoc>";
	}
}


And add this above line 5965

$data = str_replace("<maketoc>","{maketoc}",$data);


So after adding the code it looks like this

$data = str_replace("<maketoc>","{maketoc}",$data);
if (!$simple_wiki && $options['parsetoc']) {
      $this->parse_data_process_maketoc( $data, $options, $noparsed);
} // closing if ($simple_wiki)


Upload the file and maketoc will work.


posts: 7

Hi,
it was working for me in a new tiki6 installation, but not after an upgrade.

How it worked for me:

  • New DB installation
  • Upgrade old installation
  • copy new preferences table to the old, migrated db.


Of course, I had to set all my preferences again, but I could generate a toc with { maketoc } without any paramaters.

-- Tobias


posts: 6 Australia

Maybe it has something to do with upgraded Tiki installs. We started on 4.1 -> 4.2 -> 5.2 -> 6

It all started happening on the upgrade to 5.2.