View Issue Details

IDProjectCategoryView StatusLast Update
0000405WackoWikiactionpublic2015-03-08 18:34
Reportertaskoma Assigned ToElar9000  
PriorityhighSeverityminorReproducibilityhave not tried
Status resolvedResolutionfixed 
Product Version5.0.rc 
Target Version5.4.0Fixed in Version5.4.0 
Summary0000405: toc action does not recognize include page structure
DescriptionDuring joint use toc and include actions, we can't get headers from include page
(in WackoWiki 4.3 toc show structure (headers) of included documents)
Steps To Reproduce==Header==
{{toc from="h1" to="h5"}}
===Include===
{{include page="/Doc/Russian/WikiKoncepcii"}}


example:
http://wackowiki.sourceforge.net/doc/Users/taskoma

Testing
http://wackowiki.sourceforge.net/test/Bugs/405
Additional Informationformatters/classes/paragrafica.php -> Forming body_toc

to fix:

"<\!--action:begin-->include\s+[^=]+=([^\xA1 ]+)(\s+notoc=\"?[^0]\"?)?.*?<\!--action:end-->".

for results see body_toc field in page table

see
-> /formatters/post_wacko.php
-> /formatters/classes/paragrafica.php
-> /formatters/classes/post_wacko.php
-> /formatters/classes/wackoformatter.php
TagsNo tags attached.
Attached Files
toc_include.patch (1,199 bytes)   
diff -r 99818fb06412 wacko/formatters/classes/paragrafica.php
--- a/wacko/formatters/classes/paragrafica.php	Tue Jul 24 18:03:48 2012 +0200
+++ b/wacko/formatters/classes/paragrafica.php	Sun Aug 05 14:10:10 2012 +0200
@@ -261,7 +261,7 @@
 									"|".
 		"<\!--action:begin-->include\s+[^=]+=([^\xA1 ]+)(\s+notoc=\"?[^0]\"?)?.*?<\!--action:end-->".
 		// {{include xxxx="TAG" notoc="1"}}
-									"!si", array( &$this, 'add_toc_entry' ), $what );
+									"!i", array( &$this, 'add_toc_entry' ), $what );
 
 		return $what;
 	}
@@ -269,9 +269,12 @@
 	// for further TOC creation routines
 	function add_toc_entry($matches)
 	{
+		if (!isset($matches[6])) $matches[6] = '';
+		if (!isset($matches[8])) $matches[8] = '';
+
 		if ((isset($matches[7])) && $matches[7] != '')
 		{
-			if (isset($matches[8]) && $matches[8] == '')
+			if ($matches[8] == '')
 			{
 				$this->toc[] = array($this->wacko->unwrap_link(trim($matches[7],'"')), '(include)', 99999);
 			}
@@ -279,7 +282,7 @@
 		else
 		{
 			// id, text, depth
-			if ((isset($matches[6])) && $matches[6] != '')
+			if ($matches[6] != '')
 			{
 				$this->toc[] = array($matches[6], '(p)', 77777);
 			}
toc_include.patch (1,199 bytes)   

Relationships

related to 0000452 resolvedadministrator allow and parse missing heading levels 

Activities

administrator

2012-01-02 15:50

administrator   ~0000836

http://regexpal.com/

administrator

2012-08-05 12:56

administrator   ~0000854

Last edited: 2012-08-05 18:32

http://wackowiki.hg.sourceforge.net/hgweb/wackowiki/dev/rev/03a25a90d54f
credit for patch: Vyacheslav Belkin

administrator

2013-03-05 08:40

administrator   ~0000890

I consider this issue as fixed, feel free to reopen the issue at a later time.

administrator

2015-03-08 17:39

administrator   ~0000938

removed obsolete \xA1 from regex
http://wackowiki.hg.sourceforge.net/hgweb/wackowiki/dev/rev/fadabc8ba78d

Issue History

Date Modified Username Field Change
2011-12-08 07:22 taskoma New Issue
2011-12-09 16:15 administrator Assigned To => administrator
2011-12-09 16:15 administrator Status new => confirmed
2011-12-09 16:15 administrator Additional Information Updated
2012-01-02 12:06 administrator Description Updated
2012-01-02 12:06 administrator Steps to Reproduce Updated
2012-01-02 13:28 administrator Additional Information Updated
2012-01-02 14:26 administrator Additional Information Updated
2012-01-02 15:50 administrator Note Added: 0000836
2012-01-02 16:16 administrator Steps to Reproduce Updated
2012-01-02 16:17 administrator Steps to Reproduce Updated
2012-01-02 16:17 administrator Additional Information Updated
2012-03-18 17:27 administrator Target Version => 5.0.0
2012-03-18 17:27 administrator Summary ToC not recognized include page structure => toc action does not recognize include page structure
2012-04-22 17:04 administrator Target Version 5.0.0 => 5.4.0
2012-06-01 18:12 administrator Additional Information Updated
2012-06-01 18:13 administrator Additional Information Updated
2012-07-01 16:50 administrator Priority normal => high
2012-08-05 08:00 administrator Assigned To administrator => Elar9000
2012-08-05 08:00 administrator Target Version 5.4.0 => 5.1.x
2012-08-05 08:00 administrator Steps to Reproduce Updated
2012-08-05 08:00 administrator Status confirmed => assigned
2012-08-05 12:12 administrator File Added: toc_include.diff
2012-08-05 12:13 administrator File Added: toc_include.patch
2012-08-05 12:14 administrator File Deleted: toc_include.diff
2012-08-05 12:56 administrator Note Added: 0000854
2012-08-05 18:32 administrator Note Edited: 0000854
2013-03-05 08:40 administrator Note Added: 0000890
2013-03-05 08:40 administrator Status assigned => resolved
2013-03-05 08:40 administrator Resolution open => fixed
2013-03-05 08:40 administrator Fixed in Version => 5.4.0
2014-03-21 15:35 administrator Target Version 5.1.x => 5.4.0
2015-03-08 17:39 administrator Note Added: 0000938
2015-03-08 18:34 administrator Relationship added related to 0000452