Problem with Wiki Plugin 0.3.8 – Public view does not work

Hi,

can you confirm the problem reported on github “Public links to wiki pages do not work :bug: #101”?

CU

Rainer

Yes. The presence of the wiki link on the public board view is an accident. It should be removed from there.

But it works fine with your patch version. Has the feature “Public wiki link” become removed intended or has it alwayss been accidentally?

For my use the public wiki link is not an important, but a nice feature.

But does it work consistently? No way to add or change anything?

Now I noticed that it was broken by the latest child pages feature.
However, this one-liner solves the issue for you:

diff --git a/Template/wiki/detail.php b/Template/wiki/detail.php
index 8286ae6..4b028ad 100755
--- a/Template/wiki/detail.php
+++ b/Template/wiki/detail.php
@@ -47,7 +47,7 @@
                 <?php else: ?>
                     <?=$this->url->link(t($page['title']), 'WikiController', 'detail_readonly', array('plugin' => 'wiki', 'token' => $project['token'], 'wiki_id' => $page['id']))?>
                 <?php endif ?>
-                 <?php if (count($page['children']) > 0): ?>
+                 <?php if (isset($page['children']) && count($page['children']) > 0): ?>
                     <?=$this->wikiHelper->renderChildren($page['children'], $page['id'], $project, $not_editable)?>
                 <?php endif ?>
             </li>

HTH
abu

Yes, that rocks! Thx a lot! :heart_eyes:

1 Like