zioth / dokuwiki-autolink4

Dokuwiki plugin which automatically turns specified keywords into links to other wiki pages, similar to the default functionality of MediaWiki.
MIT License
0 stars 2 forks source link

Odd behavior and errors with large number of links #10

Closed auser1287324 closed 2 years ago

auser1287324 commented 2 years ago

I have ~1350 links, and I seem to have hit some sort of limit. If I add even one more, I get an error message at the top of many of my pages "A PCRE internal error occured. This might be caused by a faulty plugin", and even manually-configured (not Autolink) links stop working correctly.

zioth commented 2 years ago

This is a known limitation in DokuWiki that I couldn't easily get around. I might revisit it someday, but it's a very big project, which would either require me to make a custom page parser in my plugin, or update Doku itself. Here's an explanation of the issue: https://stackoverflow.com/questions/8268624/php-preg-match-all-limit

The only thing you can do in the meantime is try to reduce the number of autolink matches you're using. The best thing to look for is multiple matches that go to the same page. You can find ways to combine these. For example, if you want all of these to go to doku:mypage: mypage Mypage MyPage mypages Mypages MyPages

you can create a single rule instead of six: [mM]y[pP]ages?

If you can't figure out how to combine certain rules, feel free to send me a couple examples.