Loading...
 
Skip to main content

Pages with spaces in their names cannot be accessed from a Wiki dump.

Status
Open
Subject
Pages with spaces in their names cannot be accessed from a Wiki dump.
Version
5.x
Category
  • Conflict of two features (each works well independently)
  • Less than 30-minutes fix
  • Patch
Feature
~Backup
Submitted by
tikiuser32
Lastmod by
Baraka Kinywa
Rating
(0)
Description

If I have a wiki page SomePage that has a link "Page With Space" in it, when I dump the wiki, the generated HTML in SomePage.html doesn't have a correct hyperlink in it to get to Page With Space.html.

The hyperlink contains plus signs instead of spaces (or %20) like Page+With+Space.html, but the target page on disk is called Page With Space.html. Clicking on the link in SomePage.html generates a file not found error.

Solution

In lib/admin/adminlib.php, function dump(), adding the following line:

Copy to clipboard
$pageName = str_replace(" ", "+", $pageName); after the first line in the while loop: $pageName = $res["pageName"] . '.html'; fixes the problem by changing the generated Page With Space.html to be called Page+With+Space.html.
Workaround
Importance
6
Priority
30
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
3504
Created
Wednesday 28 July, 2010 06:56:58 UTC
by tikiuser32
LastModif
Monday 20 October, 2025 12:20:26 UTC


Show PHP error messages