Loading...
 
Skip to main content

Development


How to update links after a bulk load to the database?

We stripped and imported several thousand HTML pages into TikiWiki 2.4, basically inserting them into the tiki_pages table from a program running on a workstation. Our stripping program changed the internal links to Wiki format. They work, but TikiWiki doesn't quite know about them.

What would I do to update all the links in the site? Is there a straightforward SQL procedure? Even better, is there a PHP page I can run? Even better than that, is there already an administrative function to do this?

I did read the PHP code for page updates, but I got bogged down on the regex expressions in get_pages.

(reposted from features, where it got no responses)

Hi!

I am glad you are moving from HTML to Wiki (especially Tiki!)

You should never touch the database directly unless

  • You know what you are doing
  • You are ready to live with these problems.


You should use appropriate scripts which re-use existing functions which deal with all these things. (index search engine, etc)

Please see: import

Please report back on progress.

Best regards,

M 😉


Thanks, Marc.

At this point we have almost 5,000 pages at alphafivewiki.com, the site is upgraded to TikiWiki 3.0, and I know how to avoid problems from the fact that the link table is not completely populated. I don't rename a page unless I've either "touched" or regenerated all the other pages that refer to it.

To make the Wiki robust against renaming of pages, I'm planning to write a function that basically does re-use the existing functions to "touch" a list of pages. I was thinking that the most useful way to integrate it would be to make it another selectable operation for page lists, like "Print" and "Remove". Of course, the quick and dirty one-off would "touch" every page on the site and be done with it.

When I get this working, is it something worth contributing, or is it too far off the beaten path to commit to the code base?


By the way, your import link is broken. Did you mean Import?