Page MenuHomePhabricator

pipe trick [[Project:Xyz|]] vs. importTextFile.php
Closed, ResolvedPublic

Description

Alas, months after using importTextFile.php to maintain a wiki does
one finally find out that e.g., [[Project:Xyz|]] will be a rendering
disaster, as it was expected to be first converted to
[[Project:Xyz|Xyz]] at some intermediate layer before getting stored
into the database.

If it weren't for this, one could maintain 100% back and forth
equality between files imported with importTextFile.php and back out
with action=raw.

So the answer seems to be interpret [[Project:Xyz|]] at XHTML
production time, and not edit time.

I'm not sure how many more of these little bombshells are waiting for
me.

There is no way short of having importTextFile.php return non-zero to
the shell for me to know something is wrong.

No, I don't want to let something else edit my files for me, or have
to check out copies to edit from a black box.

You are 99% of the way to a great system that does not depend on an
interface and even blind users etc. users using pure batch job tools
can operate, if it weren't for this.


Version: 1.7.x
Severity: minor
OS: Linux
Platform: PC

Details

Reference
bz7946

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 9:24 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz7946.
bzimport added a subscriber: Unknown Object (MLST).

I don't understand what you mean.

Do you mean that when you use importTextFile.php to create a page with a given text,
and you text is using the pipe trick ([[Project:Xyz|]] etc), that the input is not
transformed properly? (Should transform to [[Project:Xyz|Xyz]] by running the pre-
save transform at import time, presumably.)

If you do mean this, then I'm confused about your comments about action=raw exports;
since the transformation is done at save time any pages you've created in the wiki
will indeed round-trip properly since they're already transformed.