[pmwiki-users] Error encountered with upgrade to 2.2 beta 65

Peter & Melodye Bowers pbowers at pobox.com
Sun Mar 23 16:19:12 CDT 2008

> So suddenly none of my websites can post external links (with 
> the string 
> "http://" anywhere in the page), and hundreds if not 
> thousands of pages 
> that have this protocol embedded are suddenly uneditable.

Obviously this is a hosting problem and they should fix it, but a workaround
is possible if the (http:)//www.example.com syntax works.  This WikiSh
script would replace all occurrences of http:// with (http:)// in all pages
in the group Test.

sed -i 's/http:\/\//(http:)\/\//' (grep -l 'http:\/\/' Test.*)

(This would be put directly into the control panel)

Presumably you could do the same with *.*, but you may want to test it out a
bit at a time.  You can do a single file or 2 or 3 like this:

sed -i 's/http:\/\//(http:)\/\//' (grep -l 'http:\/\/' Test.Page1

If you want to do several groups at a time you could do this:

sed -i 's/http:\/\//(http:)\/\//' (grep -l 'http:\/\/' GroupA.* GroupB.*)

If you want to see which files are going to be changed ahead of time you
could do this:

grep -l 'http:\/\/' Test.Page1 Test.Page2

Hopefully that gives enough examples to get things started in the right
direction.  Obviously a search/replace on potentially every page in the
entire site is a *big* deal and whether that's the right move for you is
your decision.  I'm just giving you a way to do it if it works for you...

(As usual the most recent version of WikiSh.php is necessary -- I discovered
some inconsistencies in the way I was handling escaped slashes with
search/replace and so that is fixed only in version 2008-03-23.)


More information about the pmwiki-users mailing list